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
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.layout_movie_fragment, container, false); //index=getArguments().getInt("position"); movieID = getArguments().getString("movieID"); final String url = MovieDataJson.PHP_SERVER+"movies/id/"+movieID; Log.d("MovieURL", url); new MyDownloadJsonAsynTask(v).execute(url); Log.d("MovieJsonString", movieDataJson.getJsonString()); return v; }
{ "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 return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, 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 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_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 return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n 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,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, 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 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 }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6740675", "0.6725193", "0.67224836", "0.6699259", "0.6691596", "0.668896", "0.6687658", "0.66861755", "0.667755", "0.66756433", "0.6667425", "0.66667783", "0.6665166", "0.66614723", "0.66549766", "0.665031", "0.6643759", "0.6639389", "0.66378653", "0.66345453", "0.6626348", "0.66202056", "0.66176945", "0.66094035", "0.65976113", "0.65937936", "0.6585841", "0.6585124", "0.65741223", "0.65721804", "0.65698904", "0.65695107", "0.6569451", "0.6568099", "0.6565633", "0.6554688", "0.65533894", "0.65447044", "0.65432465", "0.6542017", "0.65385425", "0.6537571", "0.65369105", "0.6535379", "0.6533447", "0.6533258", "0.65316767", "0.6529574", "0.6528449", "0.65262675", "0.6525467", "0.6525181", "0.6524235", "0.6523963", "0.65187466", "0.65138274", "0.65137535", "0.6513218", "0.6513202", "0.65115535", "0.651113", "0.6510943", "0.6510124", "0.65094703", "0.65082514", "0.65038425", "0.65023196", "0.6501983", "0.65014684", "0.64982104", "0.64945936", "0.6492533", "0.6491023", "0.6488248", "0.64879525", "0.6487852", "0.6487744", "0.64873713", "0.6487171", "0.64851", "0.6485003", "0.6483167", "0.6482433", "0.64824027", "0.6481711", "0.6480902", "0.64779234", "0.64767206", "0.6476515", "0.6475657", "0.64747864", "0.64715266", "0.64714354", "0.64711314", "0.6470619", "0.6468112", "0.6466466", "0.64631015", "0.646268", "0.6462456", "0.64620507" ]
0.0
-1
TODO Autogenerated method stub
public List<DocDownloadForm> allActiveUsers(long compid, DataSource dataSource) { return impl.allActiveUsers(compid,dataSource); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public List<DocDownloadForm> allDocList(DataSource dataSource) { return impl.allDocList(dataSource); }
{ "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
checks if item present in db, fetch if not present from catalog
public Future<Map<String, UUID>> checkReqItems(Map<String, List<String>> request, String userId) { Promise<Map<String, UUID>> p = Promise.promise(); if (request.containsKey(RES_SERVER)) { List<String> servers = request.get(RES_SERVER); if (servers.isEmpty()) { p.fail(BAD_REQUEST); return p.future(); } Future<Map<String, UUID>> checkSer = checkResSer(servers, userId); checkSer .onSuccess( obj -> { servers.removeAll(obj.keySet()); if (!servers.isEmpty()) p.fail(SERVER_NOT_PRESENT + servers.toString()); else p.complete(obj); }) .onFailure(failHandler -> p.fail(failHandler.getLocalizedMessage())); } else { Future<Map<String, List<String>>> resources = checkResExist(request); Future<List<JsonObject>> fetchItem = resources.compose( obj -> { if (obj.size() == 0) return Future.succeededFuture(new ArrayList<JsonObject>()); else return fetch(obj); }); Future<Boolean> insertItems = fetchItem.compose( toInsert -> { if (toInsert.size() == 0) return Future.succeededFuture(true); else return insertItemToDb(toInsert); }); Future<Map<String, UUID>> resDetails = insertItems.compose( obj -> { if (request.containsKey(RES)) return getResDetails(request.get(RES)); return Future.succeededFuture(new HashMap<>()); }); Future<Map<String, UUID>> resGrpDetails = insertItems.compose( obj -> { if (request.containsKey(RES_GRP)) return getResGrpDetails(request.get(RES_GRP)); return Future.succeededFuture(new HashMap<>()); }); Map<String, UUID> result = new HashMap<>(); CompositeFuture.all(resDetails, resGrpDetails) .onSuccess( success -> { if (!resDetails.result().isEmpty()) result.putAll(resDetails.result()); if (!resGrpDetails.result().isEmpty()) result.putAll(resGrpDetails.result()); p.complete(result); }) .onFailure(failHandler -> p.fail(failHandler.getLocalizedMessage())); } return p.future(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected boolean itemExists() {\n\t\treturn false;\n\t}", "public boolean isItemExist(String item)\n {\n boolean uExist = true;\n Connection conn = DatabaseConnection.getConnection();\n PreparedStatement pss;\n ResultSet rss;\n \n try {\n pss = conn.prepareStatement(\"SELECT * FROM items WHERE Item_number = ?\");\n \n pss.setString(1, jTextFieldNumber.getText());\n \n rss = pss.executeQuery();\n \n if(rss.next())\n {\n JOptionPane.showMessageDialog(null, \"Item Already Exists!\");\n return false;\n }\n else\n {\n return true;\n }\n \n } \n catch (SQLException ex) {\n Logger.getLogger(ItemQuery.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n finally\n {\n try {\n conn.close();\n } catch (SQLException ex) {\n Logger.getLogger(AddItem.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n \n return uExist;\n }", "protected void checkNotExistingItems() {\n Item actualItem;\n //non existing items\n actualItem = mDaoToTest.getItem(mContext, -123423);\n assertNull(\"Item not null\", actualItem);\n actualItem = mDaoToTest.getItem(mContext, RainbowBaseContentProviderDao.NOT_FOUND);\n assertNull(\"Item not null\", actualItem);\n actualItem = mDaoToTest.getItem(mContext, 345823);\n assertNull(\"Item not null\", actualItem);\n }", "@Override\r\n\tpublic boolean itemExists(String absPath) throws RepositoryException {\n\t\treturn false;\r\n\t}", "public boolean searchItem(Connection conn, int item_no) {\r\n\t\ttry {\r\n\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\tResultSet rset = stmt.executeQuery(\"select item_no, description from item_XXXX where item_no=\" + item_no);\r\n\t\t\tif (rset.isBeforeFirst())\r\n\t\t\t\treturn true;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean has(String itemName);", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "boolean exists(Curso curso) throws BusinessException;", "@Override\n\tpublic Item loadSingleResult(Object itemId) {\n\t\treturn null;\n\t}", "boolean hasItemStorage();", "CatalogItem getItembyId(final Long id);", "@Test\n public void testGetProductsByName() throws Exception {\n System.out.println(\"getProductsByName\");\n for (Product p : products) {\n prs = dao.getProductsByName(p.getName());\n assertTrue(prs.size() == 1);\n assertTrue(prs.contains(p));\n \n }\n prs = dao.getProductsByName(nonExisten.getName());\n assertTrue(prs.isEmpty());\n }", "public static boolean exist(String table, String column, String item){\n Connection connection = dbConnection();\n\n try{\n String sql = \"SELECT * FROM \"+table;\n Statement stmt = connection.createStatement();\n ResultSet rs = stmt.executeQuery(sql);\n while (rs.next()){\n if(rs.getString(column).equals(item))\n return true;\n }\n\n stmt.close();\n rs.close();\n connection.close();\n }catch (Exception e){\n e.printStackTrace();\n }\n return false;\n }", "static void searchProductDB() {\n\n int productID = Validate.readInt(ASK_PRODUCTID); // store product ID of user entry\n\n\n productDB.findProduct(productID); // use user entry as parameter for the findProduct method and if found will print details of product\n\n }", "protected boolean checkExistence(E entity) throws DAOException {\n\t\tString existanceSQL = getEntityExistanceSQL(entity);\n\n\t\ttry (Connection connection = source.getConnection();\n\t\t\t\tStatement st = connection.createStatement();\n\t\t\t\tResultSet rs = st.executeQuery(existanceSQL)) {\n\n\t\t\treturn rs.next();\n\n\t\t} catch (SQLException cause) {\n\t\t\tthrow new DAOException(cause);\n\t\t}\n\t}", "private Optional<Long> idAnyNonExistingCpMenuItem(CwSession cwSession){\n List<Long> sessionCpMenuItemIds = getCpMenuItemIds(cwSession);\n List<Long> existingCpMenuItemIds =\n cpMenuItemRepository.findByIdIn(sessionCpMenuItemIds)\n .stream().map(CpMenuItem::getId)\n .collect(Collectors.toList());\n sessionCpMenuItemIds.removeAll(existingCpMenuItemIds);// Remove all items that exist in the database\n if (sessionCpMenuItemIds.size()>0){\n return Optional.of(sessionCpMenuItemIds.get(0)); //Return first id of CpMenuItem which is never saved to the database.\n }\n return Optional.empty();\n }", "private Future<JsonObject> fetchItem(String id) {\n Promise<JsonObject> p = Promise.promise();\n client\n .get(catPort, catHost, catItemPath)\n .addQueryParam(ID, id)\n .send()\n .onFailure(\n ar -> {\n ar.printStackTrace();\n p.fail(INTERNALERROR);\n })\n .onSuccess(\n obj -> {\n JsonObject res = obj.bodyAsJsonObject();\n if (obj.statusCode() == 200)\n {\n if (res.getString(STATUS).equals(status.SUCCESS.toString().toLowerCase()))\n p.complete(obj.bodyAsJsonObject().getJsonArray(RESULTS).getJsonObject(0));\n }\n else{\n if (obj.statusCode() == 404)\n p.fail(ITEMNOTFOUND + id);\n else{\n LOGGER.error(\"failed fetchItem: \" + res);\n p.fail(INTERNALERROR);\n }\n\n }\n });\n return p.future();\n }", "public Item getVsLoad(){\n\t\tItem item = null;\n\t\tSession session = HibernateUtil.getSession();\n\t\tTransaction tx = null;\n\t\t\n\t\ttry{\n\t\t\ttx = session.beginTransaction();\n\t\t\tSystem.out.println(\"------Get------\");\n\t\t\titem = (Item)session.get(Item.class, 1);\n\t\t\tSystem.out.println(\"yo\");\n\t\t\tSystem.out.println(item);\n\t\t\t\n\t\t\tSystem.out.println(\"----Load----\");\n\t\t\titem = (Item)session.load(Item.class, 1);\n\t\t\tSystem.out.println(\"yo\");\n\t\t\tSystem.out.println(item);\n\t\t\t\n\t\t\tSystem.out.println(\"====getvsload no data=====\");\n\t\t\tSystem.out.println(\"------Get------\");\n\t\t\titem = (Item)session.get(Item.class, 1000);\n\t\t\tSystem.out.println(\"yo\");\n\t\t\tSystem.out.println(item);\n\t\t\t\n\t\t\tSystem.out.println(\"----Load----\");\n\t\t\t//item = (Item)session.load(Item.class, 2000);\n\t\t\tSystem.out.println(\"yo\");\n\t\t\tSystem.out.println(item);\n\t\t\t\n\t\t\tSystem.out.println(\"=====lvl1 caching====\");\n\t\t\titem = (Item)session.load(Item.class, 4);\n\t\t\tSystem.out.println(item);\n\t\t\titem = (Item)session.load(Item.class, 4);\n\t\t\tSystem.out.println(item);\n\t\t\ttx.commit();\n\t\t}catch(HibernateException e){\n\t\t\tif(tx!=null){\n\t\t\t\ttx.rollback();\n\t\t\t}\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\tsession.close(); \n\t\t}\n\t\treturn item;\n\t}", "@Override\n public Item find(Context context, UUID id) throws SQLException\n {\n Item item = itemDAO.findByID(context, Item.class, id);\n if (item == null)\n {\n if (log.isDebugEnabled())\n {\n log.debug(LogManager.getHeader(context, \"find_item\",\n \"not_found,item_id=\" + id));\n }\n return null;\n }\n\n // not null, return item\n if (log.isDebugEnabled())\n {\n log.debug(LogManager.getHeader(context, \"find_item\", \"item_id=\"\n + id));\n }\n\n return item;\n }", "@Override\n public Item retrieveSingleItem(int itemNo) throws VendingMachinePersistenceException {\n loadItemFile();\n return itemMap.get(itemNo);\n }", "public static boolean itemExists(String itemName)\n {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n\n String query = \"SELECT count(*) FROM Item \" +\n \"WHERE itemName\"+ \"=\" + \"'\" + itemName + \"'\";\n try\n {\n ps = connection.prepareStatement(query);\n //ps.setString(1, emailAddress);\n rs = ps.executeQuery();\n if (rs.next()) {\n\t\tif (rs.getInt(1) > 0) {\n\t\t return true;\n\t\t}\n\t }\n }\n catch(SQLException e)\n {\n e.printStackTrace();\n return false;\n }\n finally\n {\n DButil.closeResultSet(rs);\n DButil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n return false;\n }", "@Test\n public void getCatalogItemTest() throws ApiException {\n String asin = null;\n List<String> marketplaceIds = null;\n List<String> includedData = null;\n String locale = null;\n Item response = api.getCatalogItem(asin, marketplaceIds, includedData, locale);\n // TODO: test validations\n }", "public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}", "public Item getItem(long idItem) throws ItemNotFound;", "@Override\n public Item get(long idItem) throws EntityNotFound;", "public boolean searchCertainItem(String itemname, String tableName)\n {\n String selectStr;\n ResultSet rs;\n try{\n\n selectStr=\"SELECT \"+itemname+\" FROM \"+tableName;\n rs = stmt.executeQuery(selectStr);\n\n while (rs.next())\n {\n return true;\n }\n }catch(Exception e){\n System.out.println(\"Error occurred in searchLogin\");\n }\n\n return false;\n\n }", "@Transactional(propagation = Propagation.REQUIRED)\n public Optional<Item> getBySKU(String sku) {\n return itemDao.getBySKU(sku);\n }", "@Override\n public boolean isAlreadyInDb () {\n try {\n load( idDevice );\n } catch ( EntityNotFoundException e ) {\n return false;\n }\n return true;\n }", "public boolean selectItem(Connection conn, String category) {\r\n\t\ttry {\r\n\t\t\tPreparedStatement pstmt = conn.prepareStatement(\"select * from item_XXXX where category=?\");\r\n\t\t\tpstmt.setString(1, category);\r\n\t\t\tResultSet rset = pstmt.executeQuery();\r\n\t\t\tif (!rset.isBeforeFirst())\r\n\t\t\t\treturn true;\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"Item No\\t\\ttDescription\\t\\tCategory\\t\\tPrice\\t\\tQuantity\");\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\"_______________________________________________________________________________________________________\");\r\n\t\t\t\twhile (rset.next()) {\r\n\t\t\t\t\tSystem.out.println(rset.getInt(1) + \"\\t\\t\" + rset.getString(2) + \"\\t\\t\" + rset.getString(3) + \"\\t\\t\"\r\n\t\t\t\t\t\t\t+ rset.getInt(4) + \"\\t\\t\" + rset.getInt(5));\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isItemLocal ();", "@java.lang.Override\n public boolean hasCatalog() {\n return catalog_ != null;\n }", "@Override\r\n\tpublic Item getItem(String absPath) throws PathNotFoundException,\r\n\t\t\tRepositoryException {\n\t\treturn null;\r\n\t}", "void checkInventoryExists() {\n\n MrnInventory[] checkInventory =\n new MrnInventory(survey.getSurveyId()).get();\n inventoryExists = false;\n if (checkInventory.length > 0) {\n inventoryExists = true;\n } // if (checkInventory.length > 0)\n\n\n }", "@Test\r\n public void testGetUUIDItemTypeFromCache() {\n assertEquals(new Long(1), queries.getUUIDItemTypeId(\"patient\"));\r\n getSimpleJdbcTemplate().update(\"delete from uuid_item_type where xml_name like 'patient'\");\r\n //make sure the entry is not in the database\r\n assertEquals(0, (getSimpleJdbcTemplate().queryForList(\" select * from uuid_item_type where xml_name like 'patient'\")).size());\r\n // Read it from cache\r\n assertEquals(new Long(1), queries.getUUIDItemTypeId(\"patient\"));\r\n }", "public boolean searchCertainItem(String itemname, String tableName, String columnName)\n {\n String selectStr;\n ResultSet rs;\n try{\n\n selectStr=\"SELECT \"+itemname+\" FROM \"+tableName+\" WHERE \"+ columnName+\" = \"+quotate(itemname);\n rs = stmt.executeQuery(selectStr);\n\n while (rs.next())\n {\n return true;\n }\n }catch(Exception e){\n System.out.println(\"Error occurred in searchLogin\");\n }\n\n return false;\n\n }", "NewsItem obtainNewsItemById(long id) throws ObjectRetrievalFailureException;", "@Repository\n@Lazy\npublic interface MenuItemRepository extends JpaRepository<MenuItem, Long>\n{\n\t@Query(\"SELECT c FROM MenuCategory c WHERE EXISTS( SELECT i FROM c.items i ) ORDER BY c.order\")\n\tList<MenuCategory> getMenu();\n}", "CatalogItem getCatalogItemByName(String name);", "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 }", "protected HomeItem itemFindCurrentTx(final Site site)\n\t{\n\t\tString sql = \"SELECT ID, PUBLISHED, RELEASE_DATE, SOURCE, TITLE, CONTENT, URL, DIMENSIONS, ALT, CREATED_BY, CREATED_ON, MODIFIED_BY, MODIFIED_ON FROM HOME_ITEM WHERE SITE=?\"\n\t\t\t\t+ \" AND PUBLISHED=1 AND RELEASE_DATE < ? ORDER BY RELEASE_DATE DESC LIMIT 1\";\n\t\tObject[] fields = new Object[2];\n\t\tfields[0] = site.getId();\n\t\tfields[1] = new Date();\n\t\tList<HomeItem> rv = sqlService().select(sql, fields, new SqlService.Reader<HomeItem>()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic HomeItem read(ResultSet result)\n\t\t\t{\n\t\t\t\tHomeItemImpl item = new HomeItemImpl();\n\t\t\t\titem.initSite(site);\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tint i = 1;\n\t\t\t\t\titem.initId(sqlService().readLong(result, i++));\n\t\t\t\t\titem.initPublished(sqlService().readBoolean(result, i++));\n\t\t\t\t\titem.initReleaseDate(sqlService().readDate(result, i++));\n\t\t\t\t\titem.initSource(HomeItem.Source.fromCode(sqlService().readString(result, i++)));\n\t\t\t\t\titem.initTitle(sqlService().readString(result, i++));\n\t\t\t\t\titem.initContentReferenceId(sqlService().readLong(result, i++));\n\t\t\t\t\titem.initUrl(sqlService().readString(result, i++));\n\t\t\t\t\titem.initDimensions(sqlService().readString(result, i++));\n\t\t\t\t\titem.initAlt(sqlService().readString(result, i++));\n\t\t\t\t\titem.initCreatedBy(userService().wrap(sqlService().readLong(result, i++)));\n\t\t\t\t\titem.initCreatedOn(sqlService().readDate(result, i++));\n\t\t\t\t\titem.initModifiedBy(userService().wrap(sqlService().readLong(result, i++)));\n\t\t\t\t\titem.initModifiedOn(sqlService().readDate(result, i++));\n\n\t\t\t\t\titem.initStatus(HomeItem.Status.current);\n\n\t\t\t\t\titem.setLoaded();\n\n\t\t\t\t\treturn item;\n\t\t\t\t}\n\t\t\t\tcatch (SQLException e)\n\t\t\t\t{\n\t\t\t\t\tM_log.warn(\"itemFindCurrentTx: \" + e);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif (rv.size() > 0)\n\t\t{\n\t\t\treturn rv.get(0);\n\t\t}\n\n\t\treturn null;\n\t}", "List<CatalogItem> getAllCatalogItems();", "private boolean inDatabase() {\r\n \t\treturn inDatabase(0, null);\r\n \t}", "public @NotNull Item findItem(@NotNull final Identifier identifier) throws ItemNotFoundException, BazaarException;", "@Test\n\tpublic void getMissingItemReturnsNull() {\n\t\tfor (ApplicationContext context : AppContextSetup.contextList){\n\t\t\tListDao dao = (ListDao)context.getBean(\"testListDao\");\n\t\t\tT2ReferenceImpl r = new T2ReferenceImpl();\n\t\t\tr.setNamespacePart(\"testNamespace1\");\n\t\t\tr.setLocalPart(\"testLocal1\");\n\t\t\tr.setReferenceType(T2ReferenceType.IdentifiedList);\n\t\t\tr.setDepth(0);\n\t\t\tr.setContainsErrors(false);\n\t\t\tT2ReferenceListImpl newList = new T2ReferenceListImpl();\n\t\t\tnewList.setTypedId(r);\n\t\t\tassertNull(dao.get(r));\n\t\t}\n\t}", "@Override\n public boolean existsById(String ticker) {\n String selectSql = \"SELECT * FROM \" + TABLE_NAME + \" WHERE ticker = '\" + ticker + \"'\";\n List<Quote> quotes = jdbcTemplate\n .query(selectSql, BeanPropertyRowMapper.newInstance(Quote.class));\n if(quotes.size()==1) {\n Quote outQuote = quotes.get(0);\n return true;\n } else {\n return false;\n }\n }", "public static ResultSet getItemByCategory(String cat) {\n try {\n PreparedStatement st = conn.prepareStatement(\"SELECT itemID, ownerID, Name, status, description, category, image1,image2,image3,image4 FROM iteminformation WHERE category=?\");\n st.setString(1, cat);\n ResultSet rs = st.executeQuery();\n\n return rs;\n\n } catch (SQLException ex) {\n Logger.getLogger(itemDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "public boolean hasItem() {\n return null != item;\n }", "Item findById(String id);", "public boolean contains(Software item){\n return products.contains (item);\n }", "boolean hasFeedItem();", "private boolean isCatalogPresent(CatalogDefinition catalogDefinition) throws TranslationException\n {\n\ttry\n\t{\n\t String name = \"'\" + catalogDefinition.getName() + \"'\";\n\t String version = \"'\" + catalogDefinition.getVersion() + \"'\";\n\t String releaseDate = \"'\" + catalogDefinition.getReleaseDate().getValueAsString() + \"'\";\n\n\t String sql = \"SELECT * FROM \" + PropertyLookup.getCatalogsTableName() + \" WHERE name = \" + name\n\t\t\t + \" AND version = \" + version + \" AND release_date = \" + releaseDate;\n\n\t sqlConnector.closeConnection();\n\t ResultSet result = sqlConnector.executeQuery(sql);\n\n\t // If we do NOT retrieve any row is because the catalog is not in the DB yet.\n\t return result.first();\n\t}\n\tcatch(SQLException e)\n\t{\n\t throw new TranslationException(\"Error accesing the catalogs table\", e);\n\t}\n\tcatch(IncompatibleTypeException e)\n\t{\n\t throw new TranslationException(\"Error accesing the catalog release date\", e);\n\t}\n\tfinally\n\t{\n\t sqlConnector.closeConnection();\n\t}\n }", "@Test\n\tpublic void testFindProductSkuByGuidWithNullReturn() {\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(getMockPersistenceEngine()).retrieveByNamedQuery(with(any(String.class)), with(any(Object[].class)));\n\t\t\t\twill(returnValue(Collections.emptyList()));\n\t\t\t}\n\t\t});\n\t\tassertNull(this.importGuidHelper.findProductSkuByGuid(NON_EXIST_GUID));\n\t}", "@Test\n\tpublic void testFindProductByGuidWithNullReturn() {\n\t\tstubGetBean(ContextIdNames.PRODUCT, ProductImpl.class);\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\n\t\t\t\tallowing(getMockPersistenceEngine()).retrieveByNamedQuery(with(any(String.class)), with(any(Object[].class)));\n\t\t\t\twill(returnValue(Collections.emptyList()));\n\t\t\t}\n\t\t});\n\t\tassertNull(this.importGuidHelper.findProductByGuid(NON_EXIST_GUID, true, true, true));\n\t}", "@Test\r\n\tpublic void itemRetTest() {\r\n\t\tItem item = new Item();\r\n\t\ttry {\r\n\t\t\tint k = 0;\r\n\t\t\tk = item.getNumberOfItems(SELLER);\r\n\t\t\tassertNotSame(k, 0);\r\n\t\t\tItem tempSet[] = item.getAllForUser(SELLER);\r\n\t\t\tassertEquals(tempSet.length, k);\t\t\t// Retrieves correct number of items\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to get number of items for seller id \" + SELLER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tint k = 0;\r\n\t\t\tk = item.getNumberOfItemsInOrder(ORDER);\r\n\t\t\tassertNotSame(k, 0);\r\n\t\t\tItem tempSet[] = item.getAllByOrder(ORDER);\r\n\t\t\tassertEquals(tempSet.length, k);\t\t\t// Retrieves correct number of items\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to get number of items for order id \" + ORDER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tItem tempSet[] = item.getAllByOrder(ORDER);\r\n\t\t\tfor (int i = 0; i < tempSet.length; i++) {\r\n\t\t\t\tassertNotNull(tempSet[i]);\r\n\t\t\t\tassertNotNull(tempSet[i].getId());\r\n\t\t\t\tassertNotSame(tempSet[i].getId(), 0);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to load items for order id \" + ORDER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t}", "public Item retrieveItem(Connection conn, int item_no) {\r\n\t\ttry {\r\n\t\t\tItem item = new Item();\r\n\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\tResultSet rset = stmt.executeQuery(\"select * from item_XXXX where item_no=\" + item_no);\r\n\t\t\twhile (rset.next()) {\r\n\t\t\t\titem.setItemNo(rset.getInt(1));\r\n\t\t\t\titem.setDescription(rset.getString(2));\r\n\t\t\t\tString category = rset.getString(3);\r\n\t\t\t\titem.setCategory(Category.valueOf(category));\r\n\t\t\t\titem.setPrice(rset.getInt(4));\r\n\t\t\t\titem.setQuantity(rset.getInt(5));\r\n\t\t\t}\r\n\t\t\treturn item;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Order(2)\n\t@Test\n\tpublic void Attempt_GetItemByIdSuccess()\n\t{\n\t\tint iD = 1;\n\t\tboolean owned = false;\n\t\tItem test_Item = is.getItemByID(iD, owned);\n\t\tassertTrue(test_Item != null);\n\t}", "public abstract boolean contains(Object item);", "@RequestMapping(method = RequestMethod.GET, value = \"{sku}\")\n\tpublic ResponseEntity<?> getCatalogItem(@PathVariable String sku) {\n\t\tBraveSpanContext openTracingContext = getTracingContext();\n\t\tio.opentracing.Span span = tracer.buildSpan(\"GetCatalogByIdFromService\").asChildOf(openTracingContext)\n\t\t\t\t.withTag(\"Description\", \"Get Catalog Item\")\n\t\t\t\t.withTag(\"http_request_url\", request.getRequestURI()).start();\n\t\tbrave.Span braveSpan = ((BraveSpan) span).unwrap();\n\t\tbraveSpan.kind(Kind.SERVER);\n\t\tSummary.Timer requestTimer = Prometheus.requestLatency.startTimer();\n\t\ttry {\n\t\t\tPrometheus.getCounters.inc();\n\t\t\tPrometheus.inProgressRequests.inc();\n\t\t\tio.opentracing.Span mongospan = tracer.buildSpan(\"MongoService\").asChildOf(span)\n\t\t\t\t\t.withTag(\"Description\", \"MongoDB Service Call\").start();\n\t\t\tbrave.Span braveMongoSpan = ((BraveSpan) mongospan).unwrap();\n\t\t\tCatalog catalogItem = service.getCatalogItem(sku, mongospan);\n\t\t\tbraveMongoSpan.finish();\n\t\t\tif (catalogItem == null) {\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t\t} else {\n\t\t\t\treturn new ResponseEntity<>(catalogItem, HttpStatus.OK);\n\t\t\t}\n\t\t} catch (Exception exc) {\n\t\t\tPrometheus.requestFailures.inc();\n\t\t\tlog.error(\"Error in getCatalogItem\", exc);\n\t\t\tspan.setTag(\"error\", exc.getMessage());\n\t\t\treturn new ResponseEntity<>(exc.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t} finally {\n\t\t\trequestTimer.observeDuration();\n\t\t\tPrometheus.inProgressRequests.dec();\n\t\t\tspan.finish();\n\t\t}\n\t}", "protected List<HomeItem> itemFindBySiteTx(final Site site)\n\t{\n\t\tString sql = \"SELECT ID, PUBLISHED, RELEASE_DATE, SOURCE, TITLE, CONTENT, URL, DIMENSIONS, ALT, CREATED_BY, CREATED_ON, MODIFIED_BY, MODIFIED_ON FROM HOME_ITEM WHERE SITE=?\"\n\t\t\t\t+ \" ORDER BY PUBLISHED DESC, RELEASE_DATE ASC, TITLE ASC\";\n\t\tObject[] fields = new Object[1];\n\t\tfields[0] = site.getId();\n\t\tList<HomeItem> rv = sqlService().select(sql, fields, new SqlService.Reader<HomeItem>()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic HomeItem read(ResultSet result)\n\t\t\t{\n\t\t\t\tHomeItemImpl item = new HomeItemImpl();\n\t\t\t\titem.initSite(site);\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tint i = 1;\n\t\t\t\t\titem.initId(sqlService().readLong(result, i++));\n\t\t\t\t\titem.initPublished(sqlService().readBoolean(result, i++));\n\t\t\t\t\titem.initReleaseDate(sqlService().readDate(result, i++));\n\t\t\t\t\titem.initSource(HomeItem.Source.fromCode(sqlService().readString(result, i++)));\n\t\t\t\t\titem.initTitle(sqlService().readString(result, i++));\n\t\t\t\t\titem.initContentReferenceId(sqlService().readLong(result, i++));\n\t\t\t\t\titem.initUrl(sqlService().readString(result, i++));\n\t\t\t\t\titem.initDimensions(sqlService().readString(result, i++));\n\t\t\t\t\titem.initAlt(sqlService().readString(result, i++));\n\t\t\t\t\titem.initCreatedBy(userService().wrap(sqlService().readLong(result, i++)));\n\t\t\t\t\titem.initCreatedOn(sqlService().readDate(result, i++));\n\t\t\t\t\titem.initModifiedBy(userService().wrap(sqlService().readLong(result, i++)));\n\t\t\t\t\titem.initModifiedOn(sqlService().readDate(result, i++));\n\t\t\t\t\titem.setLoaded();\n\n\t\t\t\t\treturn item;\n\t\t\t\t}\n\t\t\t\tcatch (SQLException e)\n\t\t\t\t{\n\t\t\t\t\tM_log.warn(\"itemFindBySiteTx: \" + e);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn rv;\n\t}", "ShoppingItem getShoppingItemByGuid(String itemGuid);", "public boolean checkIfBookExists(String title, String author){\n boolean check = false;\n try{\n String query = \"SELECT * FROM testdb.book WHERE title = '\" + title + \"' AND author = '\" + author + \"'\";\n connector = DbConnection.get(query);\n ResultSet r = connector.getResultSet();\n if (r.next()){\n check = true;\n }\n } catch (Exception e){\n e.printStackTrace();\n } finally { connector.close(); }\n return check;\n }", "private void checkExistenceBookItem(HttpServletRequest request, HttpServletResponse response, HttpSession session, RequestDispatcher dispatcher) throws IOException, ServletException {\n\t\t\n\t\tString bookItemCode = (String) session.getAttribute(\"bookCodeFromUserNoRegisterBefore\");\n\t\t//Set name of book to \"\" to check existence\n\t\t\n\t\tthis.bookItem.getValueProperties()[BookItem.BOOK_ITEM_TITLE] = \"\";\n\t\t//Get information about book has Id is bookItemId\n\t\t\n\t\tthis.bookItem.getValueInformations(bookItemCode, BookItem.BOOK_ITEM_CODE);\n\t\t\n\t\tif(!this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_TITLE].equals(\"\")) {\n\t\t\t//Set attributes to display to user\n\t\t\t\n\t\t\tsession.setAttribute(\"codeLendBookNoRegisterLendingBook\", bookItemCode);\n\t\t\tsession.setAttribute(\"requestFromBookItem\", \"checkAvaibleBookItemNoRegisterBefore\");\n\t\t\tsession.setAttribute(\"bookItemIdFromBookItemController\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_ID]);\n\t\t\t//Send redirect to BookTitleController\n\t\t\t\n\t\t\tresponse.sendRedirect(\"BookTitleController\");\n\t\t\t\n\t\t\treturn;\n\t\t} else {\n\t\t\t//Set attributes to display errors to user\n\t\t\t\n\t\t\tsession.setAttribute(\"styleSuccessLendingBookNotRegister\", \"display: none;\");\n\t\t\tsession.setAttribute(\"styleResultNoRegisterLendingBookContent\", \"display: block;\");\n\t\t\tsession.setAttribute(\"styleErrorUserNoRegisterLendingBookContent\", \"display: none;\");\n\t\t\tsession.setAttribute(\"styleNotFoundBookItemIdNoRegisterBeforeLendingBook\", \"display: block;\");\n\t\t\tsession.setAttribute(\"styleErrorNotAvaiableToLendingNoRegister\", \"display: none;\");\n\t\t\tsession.setAttribute(\"styleErrorBookItemNoRegisterLendingBook\", \"display: block;\");\n\t\t\tsession.setAttribute(\"styleInfringeRolesNotRegisterLendingBook\", \"display: none;\");\n\t\t\t//Create dispatcher and forward to main.jsp\n\t\t\t\n\t\t\tdispatcher = getServletContext().getRequestDispatcher(\"/main.jsp\");\n\t\t\tdispatcher.forward(request, response);\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t}", "private Item findItem(String code, int depart, Session session) {\n\t\tQuery<Item> query = session.createQuery(ITEM_QUERY, Item.class);\n\t\tquery.setParameter(CODE, code);\n\t\tquery.setParameter(DEPART, depart);\n\t\tList<Item> list = query.list(); // assert size <= 1\n\t\treturn list.isEmpty() ? null : list.get(0);\n\t}", "private boolean shouldExecuteDbFirst() throws ServiceException {\n DbSearchConstraints.Leaf top = getTopLeafConstraint();\n if (top.convId > 0 || !top.itemIds.isEmpty()) {\n return true;\n }\n\n if (luceneOp != null && luceneOp.shouldExecuteDbFirst()) {\n return true;\n }\n\n return constraints.tryDbFirst(context.getMailbox());\n }", "public Items findByPrimaryKey(ItemsPk pk) throws ItemsDaoException;", "public boolean doesDataExist(String repository,String id){\n boolean result = true;\n\n //Check if the repository is there\n HashMap<String,Data> repositoryData = storage.get(repository);\n\n if(repositoryData!=null){\n\n //Try to get the data with that id\n Data temp = repositoryData.get(id);\n\n if(temp==null){\n //Object doesn't exist\n result = false;\n }\n\n } else {\n //Repository doesn't exist\n result = false;\n }\n\n return result;\n }", "public boolean isExisting() throws Exception\r\n\t\t{\r\n\t\tRouteGroup myR = (RouteGroup) myRouteGroup.get();\r\n\t\tthis.UUID = myR.getUUID();\r\n\t\t\r\n\t\tVariables.getLogger().debug(\"Item \"+this.name+\" already exist in the CUCM\");\r\n\t\treturn true;\r\n\t\t}", "public abstract boolean exists();", "public boolean hasItem() {\n return this.item != null;\n }", "private boolean collectionExist(String id) {\r\n\ttry {\r\n\t contentHostingService.getCollection(id);\r\n\t} catch (Exception e) {\r\n\t return false;\r\n\t}\r\n\treturn true;\r\n }", "public boolean ifExists(Model model)\n\t{\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tCursor cursor = null;\n\t\tString checkQuery = \"SELECT \"+ KEY_NAME + \" FROM \" + TABLE_SHOP + \" WHERE \" + KEY_NAME + \"= '\"+model.getName() + \"'\";\n\t\tcursor= db.rawQuery(checkQuery,null);\n\t\tboolean exists = (cursor.getCount() > 0);\n\t\tcursor.close();\n\t\treturn exists;\n\t}", "public abstract boolean retrieve();", "protected HomeItem itemReadTx(final HomeItemImpl item)\n\t{\n\t\tString sql = \"SELECT SITE, PUBLISHED, RELEASE_DATE, SOURCE, TITLE, CONTENT, URL, DIMENSIONS, ALT, CREATED_BY, CREATED_ON, MODIFIED_BY, MODIFIED_ON FROM HOME_ITEM WHERE ID=?\";\n\t\tObject[] fields = new Object[1];\n\t\tfields[0] = item.getId();\n\t\tList<HomeItem> rv = sqlService().select(sql, fields, new SqlService.Reader<HomeItem>()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic HomeItem read(ResultSet result)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tint i = 1;\n\t\t\t\t\titem.initSite(siteService().wrap(sqlService().readLong(result, i++)));\n\t\t\t\t\titem.initPublished(sqlService().readBoolean(result, i++));\n\t\t\t\t\titem.initReleaseDate(sqlService().readDate(result, i++));\n\t\t\t\t\titem.initSource(HomeItem.Source.fromCode(sqlService().readString(result, i++)));\n\t\t\t\t\titem.initTitle(sqlService().readString(result, i++));\n\t\t\t\t\titem.initContentReferenceId(sqlService().readLong(result, i++));\n\t\t\t\t\titem.initUrl(sqlService().readString(result, i++));\n\t\t\t\t\titem.initDimensions(sqlService().readString(result, i++));\n\t\t\t\t\titem.initAlt(sqlService().readString(result, i++));\n\t\t\t\t\titem.initCreatedBy(userService().wrap(sqlService().readLong(result, i++)));\n\t\t\t\t\titem.initCreatedOn(sqlService().readDate(result, i++));\n\t\t\t\t\titem.initModifiedBy(userService().wrap(sqlService().readLong(result, i++)));\n\t\t\t\t\titem.initModifiedOn(sqlService().readDate(result, i++));\n\t\t\t\t\titem.setLoaded();\n\n\t\t\t\t\treturn item;\n\t\t\t\t}\n\t\t\t\tcatch (SQLException e)\n\t\t\t\t{\n\t\t\t\t\tM_log.warn(\"itemReadTx: \" + e);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif (rv.size() > 0)\n\t\t{\n\t\t\treturn item;\n\t\t}\n\t\treturn null;\n\t}", "private boolean itemListContains(Item item){\r\n\t\treturn items.containsKey(item.getItemIdentifier());\r\n\t}", "private boolean isInDatabase (String url) throws SQLException {\r\n\t\ttry {\r\n\t\t\tpstmt = conn.prepareStatement(\"SELECT * FROM RemoteSite WHERE url = ?\");\r\n\t\t\tpstmt.setString(1, url);\r\n\t\t\trset = pstmt.executeQuery();\r\n\t\t\tboolean inDB = rset.next();\r\n\t\t\treturn inDB;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow e;\r\n\t\t} finally {\r\n\t\t\tDatabaseConnection.closeStmt(pstmt, rset);\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic boolean check(ForgetBean forget) {\r\n\r\n\t\tSession session = factory.openSession();\r\n\r\n\t\tSystem.out.println(\"readched repo\");\r\n\t\tList<Object> list = session.createSQLQuery(\r\n\t\t\t\t\"SELECT account.email FROM account\tINNER JOIN aadhar ON account.aadharNo = aadhar.aadharNo\tWHERE email = '\"\r\n\t\t\t\t\t\t+ forget.getEmail() + \"' AND mobileNo = \" + forget.getMobileNo())\r\n\t\t\t\t.list();\r\n\t\tif (list.size() != 0) {\r\n\r\n\t\t\tSystem.out.println(\"true repo\");\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"false repo\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean containsItem(int par1)\n {\n return this.lookupEntry(par1) != null;\n }", "public static ArrayList<Item> find()\n {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ArrayList<Item> items=new ArrayList<Item>();\n items=null;\n \n String query = \"select * from item\";\n try\n { \n ps = connection.prepareStatement(query);\n ResultSet rs = null;\n\t rs = ps.executeQuery();\n while(rs.next()){\n Item item = new Item();\n\t\titem.setAttribute(rs.getString(2));\n\t\titem.setItemname(rs.getString(3));\n\t\titem.setDescription(rs.getString(4));\n\t\titem.setPrice(rs.getDouble(5));\n items.add(item);\n }\n return items;\n }\n catch(SQLException e)\n {\n e.printStackTrace();\n return null;\n }\n finally\n {\n DButil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n } \n }", "private DiscourseItem getSrcDiscourse(DiscourseItem item) {\r\n if (item == null) { return null; }\r\n\r\n DiscourseDao dao = DiscourseDbDaoFactory.DEFAULT.getDiscourseDao();\r\n DiscourseItem result = dao.findBySourceId((Long)item.getId());\r\n return result;\r\n }", "public LifeCardItem getLifeCardItem(String ctry, int zid, int cid, int pid) {\n LifeCardItem lcItem = null;\n LcMain lcMain;\n //Query query = em.createNamedQuery(\"LcMain.findByNumber\", LcMain.class);\n //Query query = em.createQuery(\"SELECT l FROM LcMain l WHERE UPPER(l.country)=:ctry AND l.zoneid=:zid AND l.centerid=:cid AND l.patid=:pid\", LcMain.class);\n Query query = em.createNativeQuery(\"SELECT l.* FROM Lc_Main l WHERE UPPER(l.country)=:ctry AND l.zoneid=:zid AND l.centerid=:cid AND l.patid=:pid\", LcMain.class);\n query.setParameter(\"ctry\", ctry.toUpperCase());\n query.setParameter(\"zid\", zid);\n query.setParameter(\"cid\", cid);\n query.setParameter(\"pid\", pid);\n try {\n lcMain = (LcMain) JPAUtils.getSingleResult(query.getResultList());\n } catch (PersistenceException pe) {\n Log.warning(LifeCARDAdmin.class.getName() + \":getLifeCardItem():\" + pe.getMessage());\n return null;\n }\n if (lcMain != null) {\n if (lcMain.getItem() != null) {\n try {\n lcItem = (LifeCardItem) DeSerializer.deserialize(lcMain.getItem());\n } catch (ObjectHandlerException ex) {\n Log.warning(LifeCARDAdmin.class.getName() + \":getLifeCardItem():\" + ex.getMessage());\n }\n }\n //try to build item object\n if (lcItem == null) {\n //LcItem not yet stored...? DB record seems to be inconsistent\n LifeCARDProcessor lcProc = LifeCARDProcessor.getInstance(this.sco, this.em.getEntityManagerFactory());\n lcItem = lcProc.createLifeCardItem(lcMain);\n }\n } else {\n String printNumber = \"\";\n try {\n printNumber = LifeCARDObjectHandler.buildNumber(null, ctry, zid, cid, pid);\n } catch (GenericSEHRException ex) {\n //Logger.getLogger(LifeCARDAdmin.class.getName()).log(Level.SEVERE, null, ex);\n }\n Log.warning(LifeCARDAdmin.class.getName() + \":getLifeCardItem():No LcMain record for \" + printNumber);\n }\n return lcItem;\n }", "public boolean itemExists(String code) {\n return cart.containsKey(code);\n }", "@Override\n protected boolean shouldFetch(@Nullable Long articleCount) {\n return articleCount == null || articleCount == 0;\n }", "@Override\n public boolean isItemCached(String groupId, String itemId) {\n File file = new Item(groupId, itemId).getFile();\n deleteIfState(file);\n return file.exists();\n }", "@Test\n public void testCreateAndReadPositive() throws Exception{\n Item item = new Item();\n item.setName(\"item\");\n item.setType(ItemTypes.ALCOHOLIC_BEVERAGE);\n itemDao.create(item);\n Assert.assertNotNull(itemDao.read(item.getName()));\n }", "private void loadItems() {\n try {\n if (ServerIdUtil.isServerId(memberId)) {\n if (ServerIdUtil.containsServerId(memberId)) {\n memberId = ServerIdUtil.getLocalId(memberId);\n } else {\n return;\n }\n }\n List<VideoReference> videoReferences = new Select().from(VideoReference.class).where(VideoReference_Table.userId.is(memberId)).orderBy(OrderBy.fromProperty(VideoReference_Table.date).descending()).queryList();\n List<String> videoIds = new ArrayList<>();\n for (VideoReference videoReference : videoReferences) {\n videoIds.add(videoReference.getId());\n }\n itemList = new Select().from(Video.class).where(Video_Table.id.in(videoIds)).orderBy(OrderBy.fromProperty(Video_Table.date).descending()).queryList();\n } catch (Throwable t) {\n itemList = new ArrayList<>();\n }\n }", "public interface InventoryItemRepository extends JpaRepository<InventoryItem, Long> {\n\n Optional<InventoryItem> findByProductCode(String productCode);\n\n}", "@Test\n\tpublic void testFindBrandByGuidWithNullReturn() {\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(getMockPersistenceEngine()).retrieveByNamedQuery(with(any(String.class)), with(any(Object[].class)));\n\t\t\t\twill(returnValue(Collections.emptyList()));\n\t\t\t}\n\t\t});\n\t\tassertNull(this.importGuidHelper.findBrandByGuidAndCatalogGuid(NON_EXIST_GUID, CATALOG_CODE));\n\t}", "public void testFetch() throws HibernateException{\r\n ItemPriceChange ipc = (ItemPriceChange)session.createQuery(\"select ipc \" +\r\n \"from ItemPriceChange as ipc \" +\r\n \"where ipc.key.style.id = 986628\")\r\n .setMaxResults(1)\r\n .uniqueResult();\r\n assertNotNull(ipc);\r\n }", "@Override\n public List<Item> viewAllItems() {\n // calls List<Item> itemRepo.findCatalog();\n return itemRepo.findCatalog();\n }", "protected BsLocusDetail queryStoredObject(com.poesys.db.pk.NaturalPrimaryKey key)\n throws DelegateException {\n // Clear the caches, then query the saved object and test it.\n clearCaches();\n\n BsLocusDetail queriedObject = delegate.getObject(key);\n assertTrue(\"Object not found\", queriedObject != null);\n return queriedObject;\n }", "public static Item getItem( ) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n \n\tString query = \"select * from Item\";\n\ttry {\n ps = connection.prepareStatement(query);\n\t ResultSet rs = null;\n\t rs = ps.executeQuery();\n \n\t Item item = new Item();\n \n\t if (rs.next()) {\n\t\titem.setAttribute(rs.getString(1));\n\t\titem.setItemname(rs.getString(2));\n\t\titem.setDescription(rs.getString(3));\n\t\titem.setPrice(rs.getDouble(4));\n\t }\n\t rs.close();\n\t ps.close();\n\t return item;\n\t} catch (java.sql.SQLException sql) {\n\t sql.printStackTrace();\n\t return null;\n\t}\n }", "private void grabItem(String item)//Made by Justin\n {\n itemFound = decodeItem(item);\n if (itemFound == null)\n {\n System.out.println(\"I don't know of any \" + item + \".\");\n }\n else\n {\n player.inventoryAdd(itemFound, currentRoom);\n }\n }", "public static void loadIndustrys(){\n //Try to connect to the database\n try {\n\n //Create Database Connection\n Class.forName(Main.database.DRIVER);\n Connection con = DriverManager.getConnection(Main.database.SERVER, Main.database.USERNAME, Main.database.PASSWORD);\n\n String sql = \"SELECT * FROM Industry\";\n\n //Create the java statement\n Statement statement = con.createStatement();\n\n //Execute the query and get the result\n ResultSet row = statement.executeQuery(sql);\n\n //Iterate through the results\n while (row.next()) {\n industrys.addItem(makeItem(row.getString(\"Name\")));\n }\n\n } catch (Exception ex) {\n\n //We got an Exception\n System.err.println(ex.getMessage());\n\n //Alert Error\n JOptionPane.showMessageDialog(Main.frame, \" Error Connecting to Database!\");\n }\n }", "@Override\n public Boolean AdapterCheckIfExistInDB(String subredditName) {\n return checkSubredditSaved(subredditName);\n }", "public boolean filterItems(ArrayList<CaseItem> allItems,\n LinkedList<CaseItem> filteredItems) {\n boolean result = true;\n\n SqlJetDb database ;\n ISqlJetTable casesTable ;\n\n File dbFile = new File(dbFileName) ;\n try {\n database = SqlJetDb.open (dbFile, true);\n casesTable = database.getTable(\"cases\");\n } catch ( SqlJetException e ) {\n errorMessage = e.getClass().getName() + \": \" + e.getMessage() ;\n return false;\n }\n\n try {\n database.beginTransaction(SqlJetTransactionMode.READ_ONLY);\n }\n catch ( SqlJetException e ) {\n errorMessage = e.getClass().getName() + \": \" + e.getMessage() ;\n result=false;\n }\n\n filteredItems.clear();\n\n// Set<String> inms = null;\n// try {\n// inms = casesTable.getIndexesNames();\n// }\n// catch ( SqlJetException e ) {\n// errorMessage = e.getClass().getName() + \": \" + e.getMessage() ;\n// result=false;\n// }\n//\n// for (String inm:inms) {\n// logger.debug(\"Got index \" + inm);\n// }\n\n for (CaseItem caseItem:allItems) {\n logger.debug(\"Testing if we need to add \\\"{}\\\"\", caseItem.getNumber());\n boolean found = false;//\n ISqlJetCursor cursor = null;\n try {\n cursor = casesTable.lookup(\"number_idx\", caseItem.getNumber());\n if (!cursor.eof()) {\n do {\n String dsch = FilenameProcessing.dateToDbFormat(caseItem.getDate());\n\n found = dsch.equals(cursor.getString(\"date_scheduled\")) &&\n caseItem.getJudge().equals( cursor.getString(\"judge\") ) &&\n caseItem.getNumber().equals(cursor.getString(\"number\")) &&\n caseItem.getInvolved().equals(cursor.getString(\"involved\")) &&\n caseItem.getDescription().equals(cursor.getString(\"description\")) &&\n caseItem.getType().equals(cursor.getString(\"type\"));\n\n //TODO: check court id here too\n\n if (found) {\n logger.debug(\"Record for {} already exists in db\", caseItem.getNumber());\n break;\n }\n } while (cursor.next());\n }\n// else {\n// logger.debug(\"Definitely no {} in db\", caseItem.getNumber());\n// }\n } catch (SqlJetException e) {\n errorMessage = e.getClass().getName() + \": \" + e.getMessage();\n result = false;\n break;\n } finally {\n try {\n if (cursor!=null) {\n cursor.close();\n }\n } catch (SqlJetException e) {\n errorMessage = e.getClass().getName() + \": \" + e.getMessage();\n result = false;\n break;\n }\n }\n\n if (!found) {\n filteredItems.add(caseItem);\n }\n }\n\n logger.debug(\"Finally need to add {} items to db\", filteredItems.size());\n\n try {\n database.commit();\n }\n catch (SqlJetException e) {\n errorMessage = e.getClass().getName() + \": \" + e.getMessage();\n result = false;\n }\n\n return result;\n }" ]
[ "0.6277255", "0.5892201", "0.5829589", "0.5817284", "0.5814188", "0.5812649", "0.57595545", "0.57595545", "0.57595545", "0.57595545", "0.57595545", "0.57595545", "0.57595545", "0.5574329", "0.5547966", "0.5543233", "0.55325335", "0.5504644", "0.55042046", "0.54998124", "0.54979604", "0.54758614", "0.544606", "0.54409", "0.54377955", "0.54124045", "0.540924", "0.54014117", "0.539925", "0.53857404", "0.53709215", "0.53704685", "0.53692186", "0.5368981", "0.53614163", "0.53555775", "0.5337767", "0.5332982", "0.530125", "0.52933973", "0.52918905", "0.5288096", "0.52722317", "0.5271983", "0.5259684", "0.5259584", "0.52427644", "0.52406955", "0.5240287", "0.5233866", "0.5231921", "0.5230717", "0.5229284", "0.52199626", "0.5213259", "0.5203062", "0.52014565", "0.5195855", "0.5193801", "0.5174547", "0.5169739", "0.5167232", "0.5150278", "0.51441145", "0.5139545", "0.5131696", "0.513049", "0.5120289", "0.5119793", "0.5116094", "0.5113065", "0.511209", "0.5107795", "0.50973165", "0.50971377", "0.5079977", "0.5070986", "0.5068029", "0.5065827", "0.50637627", "0.50616133", "0.5056609", "0.5049758", "0.50464964", "0.5037916", "0.5035779", "0.5032716", "0.503095", "0.502439", "0.5021913", "0.5019672", "0.50182474", "0.50155544", "0.50085735", "0.50034475", "0.49982765", "0.4997965", "0.4994996", "0.4994987", "0.49927175", "0.4991509" ]
0.0
-1
checks if resource item/ resource groups present in db
public Future<Map<String, List<String>>> checkResExist(Map<String, List<String>> request) { Promise<Map<String, List<String>>> p = Promise.promise(); Future<List<String>> resGrp; Future<List<String>> resItem; if (request.containsKey(RES_GRP)) { List<String> resGrpIds = request.get(RES_GRP); resGrp = checkResGrp(resGrpIds); } else resGrp = Future.succeededFuture(new ArrayList<String>()); if (request.containsKey(RES)) { List<String> resIds = request.get(RES); resItem = checkResource(resIds); } else resItem = Future.succeededFuture(new ArrayList<String>()); CompositeFuture.all(resGrp, resItem) .onSuccess( obj -> { Map<String, List<String>> resp = new HashMap<>(); if (!resGrp.result().isEmpty()) resp.put(RES_GRP, resGrp.result()); if (!resItem.result().isEmpty()) resp.put(RES, resItem.result()); p.complete(resp); }) .onFailure(fail -> p.fail(INTERNALERROR)); return p.future(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean rscInGroup(IResourceGroup group,\n AbstractVizResource<?, ?> resource) {\n\n for (ResourcePair pair : group.getResourceList()) {\n if (pair.getResource() == resource) {\n return true;\n }\n AbstractResourceData resourceData = pair.getResourceData();\n if (resourceData instanceof IResourceGroup) {\n if (rscInGroup((IResourceGroup) resourceData, resource)) {\n return true;\n }\n }\n }\n return false;\n }", "@Test\n void validateUserGroupExist(){\n\n Boolean testing_result = true;\n int issue_id = 0;\n String issue_group = \"\";\n\n ArrayList<String> groups = new ArrayList<>();\n groups.add(\"admin\");\n groups.add(\"concordia\");\n groups.add(\"encs\");\n groups.add(\"comp\");\n groups.add(\"soen\");\n\n UserController uc = new UserController();\n\n LinkedHashMap<Integer, String> db_groups = uc.getAllUserGroups();\n\n for(int key : db_groups.keySet()){\n if(!groups.contains(db_groups.get(key))){\n issue_id = key;\n issue_group = db_groups.get(key);\n testing_result = false;\n }\n }\n\n Assertions.assertTrue(testing_result, \" There is an issue with user(id: \" + issue_id + \") having group as: \" + issue_group);\n\n }", "public boolean doesGroupsTableExist() {\r\n\r\n\t\t// Variable Declarations\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement stmt = null;\r\n\r\n\t\ttry {\r\n\t\t\t// Connect to Database\r\n\t\t\tClass.forName(JDBC_DRIVER);\r\n\t\t\tconn = DriverManager.getConnection(DATABASE, USER, PASS);\r\n\r\n\t\t\t// Create SQL Statement\r\n\t\t\tString sql = \"SELECT name FROM sqlite_master\";\r\n\t\t\tstmt = conn.prepareStatement(sql);\r\n\r\n\t\t\t// Get ResultSet by Column Name\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tString tName = rs.getString(\"name\");\r\n\t\t\t\tif (tName.equals(\"groups\")) {\r\n\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException se) {\r\n\t\t\t// Handle Errors for JDBC\r\n\t\t\tse.printStackTrace();\r\n\t\t} catch (Exception ex) {\r\n\t\t\t// Handle Errors for Class\r\n\t\t\tex.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t// Close Resources\r\n\t\t\ttry {\r\n\t\t\t\tif (stmt != null)\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t} catch (SQLException se2) {\r\n\t\t\t} // Nothing to do\r\n\r\n\t\t\ttry {\r\n\t\t\t\tif (conn != null)\r\n\t\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException se) {\r\n\t\t\t\tse.printStackTrace();\r\n\t\t\t} // End Finally Try/Catch\r\n\t\t} // End Try/Catch\r\n\r\n\t\treturn false;\r\n\t}", "boolean hasMaterialization(Object groupID) throws Exception;", "@Test\n\tpublic void testExistsInGroupSuccess() {\n\n\t\tgrupo.addColaborador(col1);\n\t\tboolean result = grupo.existsInGroup(col1);\n\n\t\tassertTrue(result);\n\t}", "boolean hasAdGroup();", "boolean hasConceptGroup();", "public boolean isExisting() throws Exception\r\n\t\t{\r\n\t\tRouteGroup myR = (RouteGroup) myRouteGroup.get();\r\n\t\tthis.UUID = myR.getUUID();\r\n\t\t\r\n\t\tVariables.getLogger().debug(\"Item \"+this.name+\" already exist in the CUCM\");\r\n\t\treturn true;\r\n\t\t}", "@Override\n\tpublic boolean checkExists(String groupName) throws DataBackendException\n {\n boolean exists = false;\n\n Connection con = null;\n\n try\n {\n con = Transaction.begin();\n\n doSelectByName(groupName, con);\n\n Transaction.commit(con);\n con = null;\n\n exists = true;\n }\n catch (NoRowsException e)\n {\n exists = false;\n }\n catch (TooManyRowsException e)\n {\n throw new DataBackendException(\n \"Multiple groups with same name '\" + groupName + \"'\");\n }\n catch (TorqueException e)\n {\n throw new DataBackendException(\"Error retrieving group information\", e);\n }\n finally\n {\n if (con != null)\n {\n Transaction.safeRollback(con);\n }\n }\n\n return exists;\n }", "boolean isHasResources();", "public boolean hasGroup(String groupName){\n\t\tGuild self = this;\r\n//\t\tSystem.out.println(\"this=\" + name +\" self.groups=\"+ groups);\r\n\t\tif (self.groups == null || self.groups.isEmpty())/// try and get it again from db\r\n\t\t\tself = MysticGuilds.getGuild(this.getName());\r\n\t\tif (self == null || self.groups == null || self.groups.isEmpty())\r\n\t\t\treturn false;\r\n\t\tfor (PermissionGroup group: self.groups){\r\n//\t\t\tSystem.out.println(\"looking at group = \" + group);\r\n\t\t\tif (group.getName().equalsIgnoreCase(groupName))\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public Future<List<String>> checkResGrp(List<String> resGrpList) {\n Promise<List<String>> p = Promise.promise();\n\n Collector<Row, ?, List<String>> catIdCollector =\n Collectors.mapping(row -> row.getString(CAT_ID), Collectors.toList());\n\n try {\n\n if (resGrpList.isEmpty()) {\n p.complete(new ArrayList<>());\n return p.future();\n }\n\n pool.withConnection(\n conn ->\n conn.preparedQuery(CHECKRESGRP)\n .collecting(catIdCollector)\n .execute(Tuple.of(resGrpList.toArray(String[]::new)))\n .onFailure(\n obj -> {\n LOGGER.error(\"checkResGrp db fail :: \" + obj.getLocalizedMessage());\n p.fail(INTERNALERROR);\n })\n .onSuccess(\n success -> {\n List<String> validItems = success.value();\n List<String> invalid =\n resGrpList.stream()\n .filter(item -> !validItems.contains(item))\n .collect(Collectors.toList());\n p.complete(invalid);\n }));\n } catch (Exception e) {\n LOGGER.error(\"Fail checkResGrp : \" + e.toString());\n p.fail(INTERNALERROR);\n }\n return p.future();\n }", "void checkInventoryExists() {\n\n MrnInventory[] checkInventory =\n new MrnInventory(survey.getSurveyId()).get();\n inventoryExists = false;\n if (checkInventory.length > 0) {\n inventoryExists = true;\n } // if (checkInventory.length > 0)\n\n\n }", "boolean isMember(Item item) throws AccessManagementException;", "@Override\n\tprotected boolean itemExists() {\n\t\treturn false;\n\t}", "boolean isSetRequiredResources();", "boolean hasResourceType();", "boolean hasResource();", "public boolean isGroupPossible()\n\t\t{\n\t\t\treturn this.m_allowedAddGroupRefs != null && ! this.m_allowedAddGroupRefs.isEmpty();\n\n\t\t}", "boolean hasProductGroupView();", "boolean isVirtualGroup(Object groupID) throws Exception;", "boolean hasItemStorage();", "@Override\n public boolean existsGroupWithName(String groupName) {\n // \"Feature 'existsGroupWithName in OAuth 2 identity server' is not implemented\"\n return false;\n }", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "@Test\n\tvoid findAllFilteredNonExistingGroup() {\n\t\tinitSpringSecurityContext(\"fdaugan\");\n\t\tfinal TableItem<UserOrgVo> tableItem = resource.findAll(null, \"any\", null, newUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(0, tableItem.getRecordsTotal());\n\t}", "boolean isSetProductGroup();", "@Test(groups = \"wso2.ds.dashboard\", description = \"Check registry resource for customized dashboard\",\n dependsOnMethods = \"testCustomizeButtonDashboard\")\n public void checkRegistrySourceForCustomizeDashboard() {\n Boolean isResourceExist = isResourceExist(\n DSIntegrationTestConstants.DASHBOARD_REGISTRY_PATH_CUSTOM_DASHBOARD_PERUSER + \"/\" + USERNAME_VIEWER\n + \"/\" + DS_DASHBOARDS_CONTEXT + \"/\" + dashboardTitle.toLowerCase());\n assertTrue(isResourceExist,\n \"Registry resource could not be created for personalize dashboard per user due to some errors\");\n }", "@Override\n public boolean isTheTaskGroupAvailable(Integer id) {\n TaskGroup taskGroup = taskGroupMapper.selectById(id);\n\n return taskGroup.getStatus() == 1;\n }", "private boolean existsSubResource()\r\n {\r\n return ((subResource_ != null) && subResource_.exists());\r\n }", "public boolean has(String itemName);", "public Future<List<String>> checkResource(List<String> resourceList) {\n Promise<List<String>> p = Promise.promise();\n\n Collector<Row, ?, List<String>> catIdCollector =\n Collectors.mapping(row -> row.getString(\"cat_id\"), Collectors.toList());\n\n try {\n\n if (resourceList.isEmpty()) {\n p.complete(new ArrayList<>());\n return p.future();\n }\n\n pool.withConnection(\n conn ->\n conn.preparedQuery(GET_RES_DETAILS)\n .collecting(catIdCollector)\n .execute(Tuple.of(resourceList.toArray(String[]::new)))\n .onFailure(\n obj -> {\n LOGGER.error(\"checkResource db fail :: \" + obj.getLocalizedMessage());\n p.fail(\"internal error\");\n })\n .onSuccess(\n success -> {\n List<String> validItems = success.value();\n\n List<String> invalid =\n resourceList.stream()\n .filter(item -> !validItems.contains(item))\n .collect(Collectors.toList());\n\n p.complete(invalid);\n }));\n } catch (Exception e) {\n LOGGER.error(\"Fail: \" + e.toString());\n p.fail(\"internal error\");\n }\n return p.future();\n }", "public boolean hasGroupId() {\n return genClient.cacheHasKey(CacheKey.groupId);\n }", "private boolean contains(Collection<Group> groups, Group group) {\n for (Group g : groups) {\n if (group.getName().equals(g.getName()))\n return true;\n }\n return false;\n }", "public synchronized boolean checkGroup(String groupName) {\n\t\t\tif(groupList.containsKey(groupName)) { \n\t\t\t\treturn true; \n\t\t\t}\n\t\t\telse { \n\t\t\t\treturn false; \n\t\t\t}\n\t\t}", "public boolean checkHumanResourceContentByMember(Member member) {\n\t\tSl = \"SELECT * FROM human_resource_content WHERE memberAccount=?\";\r\n\t\ttry {\r\n\t\t\tconn = dataSource.getConnection();\r\n\t\t\tsmt = conn.prepareStatement(Sl);\r\n\t\t\tsmt.setString(1, member.getAccount());\r\n\t\t\trs = smt.executeQuery();\r\n\t\t\tif(rs.next()){\t\t\t\t\r\n\t\t\t\tsmt.setString(1, member.getAccount());\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tsmt.executeQuery();\t\r\n\t\t\trs.close();\r\n\t\t\tsmt.close();\r\n \r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n \r\n\t\t} finally {\r\n\t\t\tif (conn != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tconn.close();\r\n\t\t\t\t} catch (SQLException e) {}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void checkStorageGroupAlreadySet(PartialPath path) throws StorageGroupAlreadySetException {\n String[] nodeNames = path.getNodes();\n IMNode cur = root;\n if (!nodeNames[0].equals(root.getName())) {\n return;\n }\n for (int i = 1; i < nodeNames.length; i++) {\n if (!cur.hasChild(nodeNames[i])) {\n return;\n }\n cur = cur.getChild(nodeNames[i]);\n if (cur.isStorageGroup()) {\n throw new StorageGroupAlreadySetException(cur.getFullPath());\n }\n }\n throw new StorageGroupAlreadySetException(path.getFullPath(), true);\n }", "boolean groupSupports(Object groupID, int groupConstant) throws Exception;", "private boolean isFormsExistInGroup(String groupName)throws CoeusUIException{\r\n RequesterBean requesterBean = new RequesterBean();\r\n boolean isFormExistsInGroup = false;\r\n requesterBean.setFunctionType(FORM_EXISTS_IN_GROUP);\r\n requesterBean.setDataObject(groupName);\r\n AppletServletCommunicator comm = new AppletServletCommunicator(connect,requesterBean);\r\n comm.send();\r\n ResponderBean responder = comm.getResponse();\r\n if(responder != null){\r\n if(responder.isSuccessfulResponse() && responder.getDataObject() != null){\r\n isFormExistsInGroup = ((Boolean)responder.getDataObject()).booleanValue();\r\n }\r\n }else {\r\n throw new CoeusUIException(coeusMessageResources.parseMessageKey(\"coeusApplet_exceptionCode.1147\"));\r\n }\r\n return isFormExistsInGroup;\r\n }", "boolean containsRequirementFor(AResourceType type);", "public abstract boolean isInGroup(String hostname);", "public boolean canContainItem(String item) {\n boolean badRequirementSet;\n for(List<String> requirementSet : listOfRequirementSets) {\n if(requirementSet.contains(item)) {\n continue; // This requirement set doesn't work; try another one.\n }\n if(item.equals(\"Ankh Jewel\")) {\n badRequirementSet = false;\n for(String requirement : requirementSet) {\n if(requirement.contains(\"Amphisbaena Defeated\") || requirement.contains(\"Sakit Defeated\")\n || requirement.contains(\"Ellmac Defeated\") || requirement.contains(\"Bahamut Defeated\")\n || requirement.contains(\"Viy Defeated\") || requirement.contains(\"Baphomet Defeated\")\n || requirement.contains(\"Palenque Defeated\") || requirement.contains(\"Tiamat Defeated\")) {\n badRequirementSet = true;\n break;\n }\n }\n if(badRequirementSet) {\n continue; // Minimize Ankh Jewel lock.\n }\n }\n return true;\n }\n return false;\n }", "public boolean checkQorder(Connection con)\n throws qdbException, qdbErrMessage\n {\n Vector resCon = dbResourceContent.getChildAss(con,mod_res_id);\n dbResourceContent rcn = new dbResourceContent();\n\n for(int i=1;i<=resCon.size();i++) {\n rcn = (dbResourceContent) resCon.elementAt(i-1);\n if (rcn.rcn_order != i)\n return false;\n }\n\n return true;\n }", "private boolean itemListContains(Item item){\r\n\t\treturn items.containsKey(item.getItemIdentifier());\r\n\t}", "public interface Group extends Item {\n\n /**\n * Gets all parents of this group in no particular order.\n * \n * @return array of parent groups, or empty array if there are no parent groups.\n * @throws AccessManagementException\n */\n Group[] getParents() throws AccessManagementException;\n\n /**\n * Gets all members of this group in no particular order.\n * \n * @return array of members, or empty array if there are no members.\n * @throws AccessManagementException\n */\n Item[] getMembers() throws AccessManagementException;\n\n // TODO: Because of scalability issues We should introduce an iterator for getting all members\n\n /**\n * Adds a member to this group.\n * The group is not saved automatically.\n * \n * @param item\n * @throws AccessManagementException\n * if item already is a member of this group, or if something\n * else goes wrong.\n */\n void addMember(Item item) throws AccessManagementException;\n\n /**\n * Removes item from this group.\n * The group is not saved automatically.\n * \n * @param item\n * @throws AccessManagementException\n * if item is not a member of this group, or if something else\n * goes wrong.\n */\n void removeMember(Item item) throws AccessManagementException;\n\n /**\n * Indicates whether the item is a member of this group.\n * \n * @param item\n * @return true if the item is a member of this group, false otherwise.\n * @throws AccessManagementException\n */\n boolean isMember(Item item) throws AccessManagementException;\n}", "public static boolean isInAppBlackList(ContentResolver cr,String packageName){\n Cursor cursor=null;\n int count=0;\n cursor = cr.query(APP_CONTENT_URI, new String[]{\"package_name\"},\n \" package_name=? \", new String[]{packageName}, null);\n if (cursor!=null) {\n try {\n count = cursor.getCount();\n } finally{\n cursor.close();\n }\n }\n return count > 0;\n }", "private boolean isValid(){\n\n Set<ResourceSingle> checkSet = new HashSet<>();\n return shelves.stream()\n .map(Shelf::getCurrentType)\n .filter(Objects::nonNull)\n .allMatch(checkSet::add);\n }", "@Test\n\tvoid findAllForMySubGroup() {\n\t\tinitSpringSecurityContext(\"mmartin\");\n\t\tfinal TableItem<UserOrgVo> tableItem = resource.findAll(null, \"biz agency\", \"fdoe2\", newUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(1, tableItem.getRecordsTotal());\n\t\tAssertions.assertEquals(1, tableItem.getRecordsFiltered());\n\t\tAssertions.assertEquals(1, tableItem.getData().size());\n\n\t\t// Check the users\n\t\tAssertions.assertEquals(\"fdoe2\", tableItem.getData().get(0).getId());\n\t\tAssertions.assertFalse(tableItem.getData().get(0).isCanWrite());\n\t\tAssertions.assertTrue(tableItem.getData().get(0).isCanWriteGroups());\n\n\t\t// Check the groups\n\t\t// \"Biz Agency\" is visible since \"mmartin\" is in the parent group \"\n\t\tAssertions.assertEquals(2, tableItem.getData().get(0).getGroups().size());\n\t\tAssertions.assertEquals(\"Biz Agency\", tableItem.getData().get(0).getGroups().get(0).getName());\n\t\tAssertions.assertTrue(tableItem.getData().get(0).getGroups().get(0).isCanWrite());\n\t\tAssertions.assertEquals(\"DIG RHA\", tableItem.getData().get(0).getGroups().get(1).getName());\n\t\tAssertions.assertFalse(tableItem.getData().get(0).getGroups().get(1).isCanWrite());\n\t}", "public boolean f(Context ctx, Object obj)\r\n {\n if (groupIds_ == null)\r\n {\r\n new MinorLogMsg(\r\n this,\r\n \"Unable to filter because the contract group ids is unspecified.\",\r\n null).log(ctx);\r\n return true;\r\n }\r\n \r\n ContractGroup group = (ContractGroup) obj;\r\n\r\n if (groupIds_.contains(group.getIdentifier()))\r\n {\r\n return true;\r\n }\r\n \r\n return false;\r\n }", "public boolean isStorageGroupAlreadySet(PartialPath path) {\n String[] nodeNames = path.getNodes();\n IMNode cur = root;\n if (!nodeNames[0].equals(root.getName())) {\n return false;\n }\n for (int i = 1; i < nodeNames.length; i++) {\n if (!cur.hasChild(nodeNames[i])) {\n return false;\n }\n cur = cur.getChild(nodeNames[i]);\n if (cur.isStorageGroup()) {\n return true;\n }\n }\n return true;\n }", "public boolean existsGroup(String groupId) {\n\t\treturn true;\n\t}", "public boolean isSetResources() {\n return this.resources != null;\n }", "public boolean isSetResources() {\n return this.resources != null;\n }", "public boolean haveItem(Items item)\n {\n //boolean haveItem = Inventory.values().contains(item);\n return Inventory.containsValue(item);\n }", "public boolean isGroup(String name) {\n return grouptabs.containsKey(name);\n }", "private boolean findEmptyGroup(){\r\n boolean isEmpty = true;\r\n TreeNode root = (TreeNode)sponsorHierarchyTree.getModel().getRoot();\r\n TreePath result = findEmptyGroup(sponsorHierarchyTree, new TreePath(root));\r\n if( result != null && result.getLastPathComponent() instanceof Integer ){\r\n CoeusOptionPane.showInfoDialog(\r\n coeusMessageResources.parseMessageKey(\"sponsorHierarchyList_exceptionCode.1204\"));\r\n isEmpty = false;\r\n }\r\n return isEmpty;\r\n }", "boolean hasHotelGroupView();", "@Test\n\tvoid addUserToGroup() {\n\t\t// Pre condition\n\t\tAssertions.assertTrue(resource.findById(\"wuser\").getGroups().contains(\"Biz Agency Manager\"));\n\n\t\tresource.addUserToGroup(\"wuser\", \"biz agency manager\");\n\n\t\t// Post condition -> no change\n\t\tAssertions.assertTrue(resource.findById(\"wuser\").getGroups().contains(\"Biz Agency Manager\"));\n\t}", "@Test\n\tpublic void testNameExistsInGroupSuccess() {\n\n\t\tgrupo.addColaborador(col2);\n\t\tcol2.setNome(\"Sergio\");\n\t\tboolean result = grupo.nameExistsInGroup(\"Sergio\");\n\n\t\tassertTrue(result);\n\t}", "public boolean checkEventsAndGroupsLink();", "boolean hasFeedItemSet();", "@Test\n\tpublic void testFindAllGroupsForUser() throws PaaSApplicationException {\n\n\t\tUser user = new User();\n\t\tuser.setName(\"tstsys\");\n\n\t\tList<Group> groups = repo.findAllGroupsForUser(user);\n\n\t\tList<String> names = groups.stream().map(g -> g.getName()).collect(Collectors.toList());\n\n\t\tAssertions.assertEquals(2, groups.size(), \"Find all groups for a given user\");\n\t\tassertThat(names, hasItems(\"tstsys\", \"tstadm\"));\n\t}", "public boolean inGroup(Person p){\n\t return false;\n }", "public static boolean itemExists(String itemName)\n {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n\n String query = \"SELECT count(*) FROM Item \" +\n \"WHERE itemName\"+ \"=\" + \"'\" + itemName + \"'\";\n try\n {\n ps = connection.prepareStatement(query);\n //ps.setString(1, emailAddress);\n rs = ps.executeQuery();\n if (rs.next()) {\n\t\tif (rs.getInt(1) > 0) {\n\t\t return true;\n\t\t}\n\t }\n }\n catch(SQLException e)\n {\n e.printStackTrace();\n return false;\n }\n finally\n {\n DButil.closeResultSet(rs);\n DButil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n return false;\n }", "public static boolean checkResources(){\n for(Instruction i : waitingList){\n if(resourceArr[i.resourceType - 1] >= i.resourceAmount){\n return true;\n }\n }\n for(int i = 0 ; i < taskPointers.length; i ++){\n int pointerIndex = taskPointers[i];\n Task currTask = taskList.get(i);\n if(currTask.terminateTime == - 1 && (currTask.isAborted == false) && Collections.disjoint(waitingList, currTask.instructionList)){\n Instruction currInstruction = currTask.instructionList.get(pointerIndex);\n Type instructionType = currInstruction.instructionType;\n int resourceType = currInstruction.resourceType;\n if(instructionType != Type.request){\n return true;\n }else{\n if(resourceArr[currInstruction.resourceType - 1] >= currInstruction.resourceAmount){\n return true;\n }\n }\n }\n\n }\n return false;\n }", "public boolean isGroupLinkPathPresent() {\r\n\t\treturn isElementPresent(manageVehiclesSideBar.replace(\"Manage Vehicles\", \"Group List\"), SHORTWAIT);\r\n\t}", "public boolean resourceExists(TIdentifiable resource) {\r\n return (m_resources.getIndex(resource) >= 0);\r\n }", "boolean isStoreInGroup(String code) throws ServiceException;", "protected boolean isValid() {\n return COLLECTION.getList().contains(this);\n }", "public boolean isIdExist(int projectId) throws EmployeeManagementException;", "private void checkCollisionGroupInternal() {\n\t\tcheckInternalCollisions();\r\n\t\t\r\n\t\t// for every composite in this Group..\r\n\t\tint clen = _composites.size();\r\n\t\tfor (int j = 0; j < clen; j++) {\r\n\t\t\t\r\n\t\t\tComposite ca = _composites.get(j);\r\n\t\t\t\r\n\t\t\t// .. vs non composite particles and constraints in this group\r\n\t\t\tca.checkCollisionsVsCollection(this);\r\n\t\t\t\r\n\t\t\t// ...vs every other composite in this Group\r\n\t\t\tfor (int i = j + 1; i < clen; i++) {\r\n\t\t\t\tComposite cb = _composites.get(i);\r\n\t\t\t\tca.checkCollisionsVsCollection(cb);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean isNotNullGroupId() {\n return genClient.cacheValueIsNotNull(CacheKey.groupId);\n }", "boolean isXMLGroup(Object groupID) throws Exception;", "public boolean isItemGroup() {\n return itemGroup;\n }", "private boolean canView(final AbstractItem item) throws AccessDeniedException {\n\t\tif (item.isRssAllowed())\n\t\t\treturn true;\n\t\tList<Subscriber> subscribers = Lists.newArrayList(subscriberRepository.findAll(SubscriberPredicates.onCtx(item\n\t\t\t\t.getContextKey())));\n\t\t// TODO we consider that all items have targets directly on\n\t\t// for targets defined only on classification a check will be needed\n\t\tif (subscribers.isEmpty()) {\n\t\t\tlog.trace(\"Subscribers on item {} are empty -> true\", item.getContextKey());\n\t\t\treturn true;\n\t\t}\n\t\tfinal CustomUserDetails user = SecurityUtils.getCurrentUserDetails();\n\t\tif (user == null) {\n\t\t\tlog.trace(\"user is not authenticated -> throw an error to redirect on authentication\");\n\t\t\tthrow new AccessDeniedException(\"Access is denied to anonymous !\");\n\t\t} else if (user.getRoles().contains(AuthoritiesConstants.ADMIN)\n\t\t\t\t|| user.getUser().getLogin().equalsIgnoreCase(item.getCreatedBy().getLogin())\n\t\t\t\t|| user.getUser().getLogin().equalsIgnoreCase(item.getLastModifiedBy().getLogin())) {\n\t\t\treturn true;\n\t\t}\n\n\t\tfinal UserDTO userDTO = user.getUser();\n\t\tif (userDTO != null) {\n\t\t\tList<String> groups = null;\n\t\t\tif (userDTO.getAttributes() != null) {\n\t\t\t\tgroups = userDTO.getAttributes().get(externalUserHelper.getUserGroupAttribute());\n\t\t\t}\n\t\t\tfor (Subscriber subscriber : subscribers) {\n\t\t\t\tlog.trace(\"Check if {} is in {}\", userDTO, subscriber);\n\t\t\t\tfinal SubjectKeyExtended subject = subscriber.getSubjectCtxId().getSubject();\n\t\t\t\tswitch (subject.getKeyType()) {\n\t\t\t\tcase GROUP:\n\t\t\t\t\tif (groups == null || groups.isEmpty()) {\n\t\t\t\t\t\tlog.trace(\"The user doesn't have a group -> break loop\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t// test on startWith as some groups in IsMemberOf has only a part the\n\t\t\t\t\t// real group name.\n\t\t\t\t\tfor (String val : groups) {\n\t\t\t\t\t\tif (val.startsWith(subject.getKeyValue())) {\n\t\t\t\t\t\t\tlog.trace(\"Check if the user group {} match subscriber group {} -> return true\", val,\n\t\t\t\t\t\t\t\t\tsubject.getKeyValue());\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase PERSON:\n\t\t\t\t\tif (subject.getKeyValue().equalsIgnoreCase(userDTO.getLogin())) {\n\t\t\t\t\t\tlog.trace(\"Check if the user key {} match subscriber key {} -> true\", userDTO.getLogin(),\n\t\t\t\t\t\t\t\tsubject.getKeyValue());\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase PERSON_ATTR:\n\t\t\t\t\tif (subject.getKeyAttribute() != null\n\t\t\t\t\t\t\t&& userDTO.getAttributes().containsKey(subject.getKeyAttribute())\n\t\t\t\t\t\t\t&& userDTO.getAttributes().get(subject.getKeyAttribute()).contains(subject.getKeyValue())) {\n\t\t\t\t\t\tlog.trace(\"Check if the user attribute {} with values {} contains value {} -> true\",\n\t\t\t\t\t\t\t\tsubject.getKeyAttribute(), userDTO.getAttributes().get(subject.getKeyAttribute()),\n\t\t\t\t\t\t\t\tsubject.getKeyValue());\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase PERSON_ATTR_REGEX:\n\t\t\t\t\tif (subject.getKeyAttribute() != null\n\t\t\t\t\t\t\t&& userDTO.getAttributes().containsKey(subject.getKeyAttribute())) {\n\t\t\t\t\t\tfor (final String value : userDTO.getAttributes().get(subject.getKeyAttribute())) {\n\t\t\t\t\t\t\tif (value.matches(subject.getKeyValue())) {\n\t\t\t\t\t\t\t\tlog.trace(\"Check if the user attribute {} with values {} match regex {} -> true\",\n\t\t\t\t\t\t\t\t\t\tsubject.getKeyAttribute(),\n\t\t\t\t\t\t\t\t\t\tuserDTO.getAttributes().get(subject.getKeyAttribute()), subject.getKeyValue());\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new IllegalStateException(\"Warning Subject Type '\" + subject.getKeyType()\n\t\t\t\t\t\t\t+ \"' is not managed\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlog.trace(\"End of all checks -> false\");\n\t\treturn false;\n\t}", "boolean hasResMineID();", "protected boolean resourceExists() {\n\t\tIWorkspace workspace = ResourcesPlugin.getWorkspace();\n\t\tif (workspace == null)\n\t\t\treturn false;\n\t\treturn RodinDB.getTarget(workspace.getRoot(), this.getPath()\n\t\t\t\t.makeRelative(), true) != null;\n\t}", "boolean validateUserGroups(SessionState state, String userId, Assignment asn)\n\t{\n\t\tSite site = getSite(asn);\n\n\t\t// finding any of the user's groups is sufficient, if they are in multiple groups the check\n\t\t// will fail no matter which of their groups is used\n\t\tOptional<Group> userGroup = getGroupsWithUser(userId, asn, site).stream().findAny();\n\t\tif (userGroup.isPresent())\n\t\t{\n\t\t\treturn checkSubmissionForUsersInMultipleGroups(asn, userGroup.get(), state, true).isEmpty();\n\t\t}\n\n\t\t// user is not in any assignment groups, if they are an instructor this is probably the Student View feature so let them through\n\t\treturn assignmentService.allowAddAssignment(site.getId()) || assignmentService.allowUpdateAssignmentInContext(site.getId());\n\t}", "boolean hasRegistry();", "@Override\n public boolean isItemCached(String groupId, String itemId) {\n File file = new Item(groupId, itemId).getFile();\n deleteIfState(file);\n return file.exists();\n }", "public boolean isSetComparesource()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(COMPARESOURCE$2) != 0;\r\n }\r\n }", "public void testRequiredRolesMultipleRequiredGroupsOk() {\n User elmer = RoleFactory.createUser(\"elmer\");\n User pepe = RoleFactory.createUser(\"pepe\");\n User bugs = RoleFactory.createUser(\"bugs\");\n User daffy = RoleFactory.createUser(\"daffy\");\n \n Group administrators = RoleFactory.createGroup(\"administrators\");\n administrators.addRequiredMember(m_anyone);\n administrators.addMember(elmer);\n administrators.addMember(pepe);\n administrators.addMember(bugs);\n\n Group family = RoleFactory.createGroup(\"family\");\n family.addRequiredMember(m_anyone);\n family.addMember(elmer);\n family.addMember(pepe);\n family.addMember(daffy);\n\n Group alarmSystemActivation = RoleFactory.createGroup(\"alarmSystemActivation\");\n alarmSystemActivation.addMember(m_anyone);\n alarmSystemActivation.addRequiredMember(administrators);\n alarmSystemActivation.addRequiredMember(family);\n\n assertTrue(m_roleChecker.isImpliedBy(alarmSystemActivation, elmer));\n assertTrue(m_roleChecker.isImpliedBy(alarmSystemActivation, pepe));\n assertFalse(m_roleChecker.isImpliedBy(alarmSystemActivation, bugs));\n assertFalse(m_roleChecker.isImpliedBy(alarmSystemActivation, daffy));\n }", "private boolean dateAvailable(List<DateGroup> dateGroups) {\n final int NOT_AVAILABLE = 0;\n return dateGroups.size() > NOT_AVAILABLE;\n }", "public boolean inGroup(String groupName) {\r\n return true;\r\n }", "boolean hasAdGroupCriterion();", "@Override\r\n\tpublic boolean isSameGroup(EyeTrackerItem element) {\n\t\treturn this.group.items.contains(element);\r\n\t}", "@Test\n\tpublic void testVerifyExistenceOfRoleSeedData() {\n\n\t\tfinal List<Industry> industries = industryDao.getAll();\n\n\t\tAssert.assertTrue(industries.size() == 16);\n\n\t\tboolean otherIndustryFound = false;\n\t\tboolean perimeterIndustryFound = false;\n\n\t\tfor (final Industry industry : industries) {\n\n\t\t\tif (industry.getName().equals(\"Transportation\")) {\n\t\t\t\tperimeterIndustryFound = true;\n\t\t\t} else if (industry.getName().equals(\"Other\")) {\n\t\t\t\totherIndustryFound = true;\n\t\t\t}\n\n\t\t}\n\n\t\tAssert.assertTrue(\"Expected the industry named 'Transportation'. Is seed data populated?\", perimeterIndustryFound);\n\t\tAssert.assertTrue(\"Expected the industry named 'Other'. Is seed data populated?\", otherIndustryFound);\n\n\t}", "public boolean inGroup(String groupName);", "public boolean hasItem() {\n return null != item;\n }", "boolean hasGroupByCategory();", "boolean hasAdGroupAd();", "private boolean hasResourceActionAllowPermissions(Resource resource,\n String action) {\n String whereClause = \"p.resource = :resource AND (\"\n + \"(p.action = :action AND p.type = :typeAllow) OR \"\n + \"(p.type = :typeAllowAll))\";\n Map<String, Object> parameters = new HashMap<String, Object>();\n parameters.put(\"resource\", resource.getIdentifier());\n parameters.put(\"action\", action);\n parameters.put(\"typeAllow\", PermissionType.ALLOW);\n parameters.put(\"typeAllowAll\", PermissionType.ALLOW_ALL);\n\n Long count = FacadeFactory.getFacade().count(PermissionEntity.class,\n whereClause, parameters);\n\n return count > 0 ? true : false;\n }", "@Test\n\tvoid findAllForMyGroup() {\n\t\tinitSpringSecurityContext(\"mmartin\");\n\t\tfinal TableItem<UserOrgVo> tableItem = resource.findAll(null, \"dig as\", null, newUriInfoAsc(\"id\"));\n\n\t\t// 4 users from delegate and 1 from my company\n\t\tAssertions.assertEquals(5, tableItem.getRecordsTotal());\n\t\tAssertions.assertEquals(5, tableItem.getRecordsFiltered());\n\t\tAssertions.assertEquals(5, tableItem.getData().size());\n\n\t\t// Check the users (from delegate)\n\t\tAssertions.assertEquals(\"fdoe2\", tableItem.getData().get(0).getId());\n\t\tAssertions.assertFalse(tableItem.getData().get(0).isCanWrite());\n\t\tAssertions.assertTrue(tableItem.getData().get(0).isCanWriteGroups());\n\t}", "boolean capabilityExist( String id );", "boolean hasAdGroupLabel();" ]
[ "0.60626525", "0.59616303", "0.5848859", "0.57919097", "0.5696038", "0.56718206", "0.56591624", "0.56579536", "0.5597511", "0.5578953", "0.5543021", "0.55429703", "0.553296", "0.55238456", "0.5522965", "0.5521599", "0.5507202", "0.5492875", "0.5488757", "0.54137355", "0.53940845", "0.5391645", "0.53911895", "0.53790057", "0.53790057", "0.53790057", "0.53790057", "0.53790057", "0.53790057", "0.53790057", "0.5375156", "0.53693694", "0.5367212", "0.5359523", "0.5354882", "0.5310439", "0.52888155", "0.5266262", "0.52498263", "0.52366906", "0.5225875", "0.5214672", "0.5210377", "0.52053", "0.5202731", "0.5186403", "0.51643705", "0.5162259", "0.5159613", "0.51566315", "0.5156596", "0.5145272", "0.5124876", "0.5120682", "0.51015145", "0.5098963", "0.5098609", "0.5098609", "0.5092318", "0.5089339", "0.5084799", "0.5081762", "0.50804824", "0.50767225", "0.5066751", "0.50612897", "0.5058891", "0.5047752", "0.5034896", "0.50330836", "0.50188524", "0.5014093", "0.501341", "0.5004735", "0.4992573", "0.49907094", "0.4983253", "0.4981842", "0.49714717", "0.49496818", "0.4939001", "0.49314353", "0.4923405", "0.49207634", "0.4916594", "0.49057114", "0.4903128", "0.49007016", "0.48979825", "0.48853725", "0.48853606", "0.48842174", "0.48774377", "0.48766023", "0.487296", "0.48722562", "0.4868194", "0.48574394", "0.48562118", "0.4855269" ]
0.5328131
35
Verify if resource groups are present in db
public Future<List<String>> checkResGrp(List<String> resGrpList) { Promise<List<String>> p = Promise.promise(); Collector<Row, ?, List<String>> catIdCollector = Collectors.mapping(row -> row.getString(CAT_ID), Collectors.toList()); try { if (resGrpList.isEmpty()) { p.complete(new ArrayList<>()); return p.future(); } pool.withConnection( conn -> conn.preparedQuery(CHECKRESGRP) .collecting(catIdCollector) .execute(Tuple.of(resGrpList.toArray(String[]::new))) .onFailure( obj -> { LOGGER.error("checkResGrp db fail :: " + obj.getLocalizedMessage()); p.fail(INTERNALERROR); }) .onSuccess( success -> { List<String> validItems = success.value(); List<String> invalid = resGrpList.stream() .filter(item -> !validItems.contains(item)) .collect(Collectors.toList()); p.complete(invalid); })); } catch (Exception e) { LOGGER.error("Fail checkResGrp : " + e.toString()); p.fail(INTERNALERROR); } return p.future(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void validateUserGroupExist(){\n\n Boolean testing_result = true;\n int issue_id = 0;\n String issue_group = \"\";\n\n ArrayList<String> groups = new ArrayList<>();\n groups.add(\"admin\");\n groups.add(\"concordia\");\n groups.add(\"encs\");\n groups.add(\"comp\");\n groups.add(\"soen\");\n\n UserController uc = new UserController();\n\n LinkedHashMap<Integer, String> db_groups = uc.getAllUserGroups();\n\n for(int key : db_groups.keySet()){\n if(!groups.contains(db_groups.get(key))){\n issue_id = key;\n issue_group = db_groups.get(key);\n testing_result = false;\n }\n }\n\n Assertions.assertTrue(testing_result, \" There is an issue with user(id: \" + issue_id + \") having group as: \" + issue_group);\n\n }", "public boolean doesGroupsTableExist() {\r\n\r\n\t\t// Variable Declarations\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement stmt = null;\r\n\r\n\t\ttry {\r\n\t\t\t// Connect to Database\r\n\t\t\tClass.forName(JDBC_DRIVER);\r\n\t\t\tconn = DriverManager.getConnection(DATABASE, USER, PASS);\r\n\r\n\t\t\t// Create SQL Statement\r\n\t\t\tString sql = \"SELECT name FROM sqlite_master\";\r\n\t\t\tstmt = conn.prepareStatement(sql);\r\n\r\n\t\t\t// Get ResultSet by Column Name\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tString tName = rs.getString(\"name\");\r\n\t\t\t\tif (tName.equals(\"groups\")) {\r\n\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException se) {\r\n\t\t\t// Handle Errors for JDBC\r\n\t\t\tse.printStackTrace();\r\n\t\t} catch (Exception ex) {\r\n\t\t\t// Handle Errors for Class\r\n\t\t\tex.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t// Close Resources\r\n\t\t\ttry {\r\n\t\t\t\tif (stmt != null)\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t} catch (SQLException se2) {\r\n\t\t\t} // Nothing to do\r\n\r\n\t\t\ttry {\r\n\t\t\t\tif (conn != null)\r\n\t\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException se) {\r\n\t\t\t\tse.printStackTrace();\r\n\t\t\t} // End Finally Try/Catch\r\n\t\t} // End Try/Catch\r\n\r\n\t\treturn false;\r\n\t}", "@Test\n\tpublic void testExistsInGroupSuccess() {\n\n\t\tgrupo.addColaborador(col1);\n\t\tboolean result = grupo.existsInGroup(col1);\n\n\t\tassertTrue(result);\n\t}", "@Override\n public boolean existsGroupWithName(String groupName) {\n // \"Feature 'existsGroupWithName in OAuth 2 identity server' is not implemented\"\n return false;\n }", "boolean hasAdGroup();", "boolean hasConceptGroup();", "@Override\n\tpublic boolean checkExists(String groupName) throws DataBackendException\n {\n boolean exists = false;\n\n Connection con = null;\n\n try\n {\n con = Transaction.begin();\n\n doSelectByName(groupName, con);\n\n Transaction.commit(con);\n con = null;\n\n exists = true;\n }\n catch (NoRowsException e)\n {\n exists = false;\n }\n catch (TooManyRowsException e)\n {\n throw new DataBackendException(\n \"Multiple groups with same name '\" + groupName + \"'\");\n }\n catch (TorqueException e)\n {\n throw new DataBackendException(\"Error retrieving group information\", e);\n }\n finally\n {\n if (con != null)\n {\n Transaction.safeRollback(con);\n }\n }\n\n return exists;\n }", "@Test\n void validateUserGroupCount() {\n LinkedHashMap<Integer, String> groups = new LinkedHashMap<>();\n\n UserManagerFactory uf = new UserManagerFactory();\n\n UserManager obj = uf.getInstance(\"group1\");\n\n groups = obj.getGroups();\n\n Assertions.assertTrue(groups.size() == 5, \"There should only have 5 pre-defined groups\");\n }", "boolean hasMaterialization(Object groupID) throws Exception;", "boolean isVirtualGroup(Object groupID) throws Exception;", "public synchronized boolean checkGroup(String groupName) {\n\t\t\tif(groupList.containsKey(groupName)) { \n\t\t\t\treturn true; \n\t\t\t}\n\t\t\telse { \n\t\t\t\treturn false; \n\t\t\t}\n\t\t}", "public boolean hasGroup(String groupName){\n\t\tGuild self = this;\r\n//\t\tSystem.out.println(\"this=\" + name +\" self.groups=\"+ groups);\r\n\t\tif (self.groups == null || self.groups.isEmpty())/// try and get it again from db\r\n\t\t\tself = MysticGuilds.getGuild(this.getName());\r\n\t\tif (self == null || self.groups == null || self.groups.isEmpty())\r\n\t\t\treturn false;\r\n\t\tfor (PermissionGroup group: self.groups){\r\n//\t\t\tSystem.out.println(\"looking at group = \" + group);\r\n\t\t\tif (group.getName().equalsIgnoreCase(groupName))\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void testRequiredRolesMultipleRequiredGroupsOk() {\n User elmer = RoleFactory.createUser(\"elmer\");\n User pepe = RoleFactory.createUser(\"pepe\");\n User bugs = RoleFactory.createUser(\"bugs\");\n User daffy = RoleFactory.createUser(\"daffy\");\n \n Group administrators = RoleFactory.createGroup(\"administrators\");\n administrators.addRequiredMember(m_anyone);\n administrators.addMember(elmer);\n administrators.addMember(pepe);\n administrators.addMember(bugs);\n\n Group family = RoleFactory.createGroup(\"family\");\n family.addRequiredMember(m_anyone);\n family.addMember(elmer);\n family.addMember(pepe);\n family.addMember(daffy);\n\n Group alarmSystemActivation = RoleFactory.createGroup(\"alarmSystemActivation\");\n alarmSystemActivation.addMember(m_anyone);\n alarmSystemActivation.addRequiredMember(administrators);\n alarmSystemActivation.addRequiredMember(family);\n\n assertTrue(m_roleChecker.isImpliedBy(alarmSystemActivation, elmer));\n assertTrue(m_roleChecker.isImpliedBy(alarmSystemActivation, pepe));\n assertFalse(m_roleChecker.isImpliedBy(alarmSystemActivation, bugs));\n assertFalse(m_roleChecker.isImpliedBy(alarmSystemActivation, daffy));\n }", "public boolean hasGroupId() {\n return genClient.cacheHasKey(CacheKey.groupId);\n }", "public void verifyGroupPage()\n\t{\n\t\t_waitForJStoLoad();\n\t\tString groupPageText= groups.getText();\n\t\tAssert.assertEquals(FileNames.Groups.toString(), groupPageText);\n\t}", "public void testRequiredRolesMultipleGroupsOk() {\n User elmer = RoleFactory.createUser(\"elmer\");\n User pepe = RoleFactory.createUser(\"pepe\");\n User bugs = RoleFactory.createUser(\"bugs\");\n User daffy = RoleFactory.createUser(\"daffy\");\n \n Group administrators = RoleFactory.createGroup(\"administrators\");\n administrators.addRequiredMember(m_anyone);\n administrators.addMember(elmer);\n administrators.addMember(pepe);\n administrators.addMember(bugs);\n\n Group family = RoleFactory.createGroup(\"family\");\n family.addRequiredMember(m_anyone);\n family.addMember(elmer);\n family.addMember(pepe);\n family.addMember(daffy);\n\n Group alarmSystemActivation = RoleFactory.createGroup(\"alarmSystemActivation\");\n alarmSystemActivation.addRequiredMember(m_anyone);\n alarmSystemActivation.addMember(administrators);\n alarmSystemActivation.addMember(family);\n\n assertTrue(m_roleChecker.isImpliedBy(alarmSystemActivation, elmer));\n assertTrue(m_roleChecker.isImpliedBy(alarmSystemActivation, pepe));\n assertTrue(m_roleChecker.isImpliedBy(alarmSystemActivation, bugs));\n assertTrue(m_roleChecker.isImpliedBy(alarmSystemActivation, daffy));\n }", "private static boolean rscInGroup(IResourceGroup group,\n AbstractVizResource<?, ?> resource) {\n\n for (ResourcePair pair : group.getResourceList()) {\n if (pair.getResource() == resource) {\n return true;\n }\n AbstractResourceData resourceData = pair.getResourceData();\n if (resourceData instanceof IResourceGroup) {\n if (rscInGroup((IResourceGroup) resourceData, resource)) {\n return true;\n }\n }\n }\n return false;\n }", "public boolean isGroupPossible()\n\t\t{\n\t\t\treturn this.m_allowedAddGroupRefs != null && ! this.m_allowedAddGroupRefs.isEmpty();\n\n\t\t}", "@Test\n\tpublic void testFindAllGroupsForUser() throws PaaSApplicationException {\n\n\t\tUser user = new User();\n\t\tuser.setName(\"tstsys\");\n\n\t\tList<Group> groups = repo.findAllGroupsForUser(user);\n\n\t\tList<String> names = groups.stream().map(g -> g.getName()).collect(Collectors.toList());\n\n\t\tAssertions.assertEquals(2, groups.size(), \"Find all groups for a given user\");\n\t\tassertThat(names, hasItems(\"tstsys\", \"tstadm\"));\n\t}", "public boolean existsGroup(String groupId) {\n\t\treturn true;\n\t}", "@Test\n\tpublic void testNameExistsInGroupSuccess() {\n\n\t\tgrupo.addColaborador(col2);\n\t\tcol2.setNome(\"Sergio\");\n\t\tboolean result = grupo.nameExistsInGroup(\"Sergio\");\n\n\t\tassertTrue(result);\n\t}", "boolean isSetProductGroup();", "@Test\n void getAllClientIdWithAccess_throwingGroupCheck_stillWorks() {\n when(groupsConnection.isMemberOfGroup(any(), any())).thenThrow(new RuntimeException(\"blah\"));\n AuthenticatedRegistrarAccessor registrarAccessor =\n new AuthenticatedRegistrarAccessor(\n USER, ADMIN_CLIENT_ID, SUPPORT_GROUP, lazyGroupsConnection);\n\n verify(groupsConnection).isMemberOfGroup(\"[email protected]\", SUPPORT_GROUP.get());\n assertThat(registrarAccessor.getAllClientIdWithRoles())\n .containsExactly(CLIENT_ID_WITH_CONTACT, OWNER);\n verify(lazyGroupsConnection).get();\n }", "private boolean isFormsExistInGroup(String groupName)throws CoeusUIException{\r\n RequesterBean requesterBean = new RequesterBean();\r\n boolean isFormExistsInGroup = false;\r\n requesterBean.setFunctionType(FORM_EXISTS_IN_GROUP);\r\n requesterBean.setDataObject(groupName);\r\n AppletServletCommunicator comm = new AppletServletCommunicator(connect,requesterBean);\r\n comm.send();\r\n ResponderBean responder = comm.getResponse();\r\n if(responder != null){\r\n if(responder.isSuccessfulResponse() && responder.getDataObject() != null){\r\n isFormExistsInGroup = ((Boolean)responder.getDataObject()).booleanValue();\r\n }\r\n }else {\r\n throw new CoeusUIException(coeusMessageResources.parseMessageKey(\"coeusApplet_exceptionCode.1147\"));\r\n }\r\n return isFormExistsInGroup;\r\n }", "@Test\n\tvoid addUserToGroup() {\n\t\t// Pre condition\n\t\tAssertions.assertTrue(resource.findById(\"wuser\").getGroups().contains(\"Biz Agency Manager\"));\n\n\t\tresource.addUserToGroup(\"wuser\", \"biz agency manager\");\n\n\t\t// Post condition -> no change\n\t\tAssertions.assertTrue(resource.findById(\"wuser\").getGroups().contains(\"Biz Agency Manager\"));\n\t}", "@Test\n\tvoid findAllFilteredNonExistingGroup() {\n\t\tinitSpringSecurityContext(\"fdaugan\");\n\t\tfinal TableItem<UserOrgVo> tableItem = resource.findAll(null, \"any\", null, newUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(0, tableItem.getRecordsTotal());\n\t}", "public boolean isNotNullGroupId() {\n return genClient.cacheValueIsNotNull(CacheKey.groupId);\n }", "private boolean contains(Collection<Group> groups, Group group) {\n for (Group g : groups) {\n if (group.getName().equals(g.getName()))\n return true;\n }\n return false;\n }", "public void testAclGroupsSupported()\n {\n assertTrue(_ruleSet.addGroup(\"aclgroup\", Arrays.asList(new String[] {\"usera\", \"userb\"}))); \n \n _ruleSet.grant(1, \"aclgroup\", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n assertEquals(1, _ruleSet.getRuleCount());\n\n assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"usera\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"userb\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n assertEquals(Result.DEFER, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"userc\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n }", "public boolean hasGroup(String groupRef)\n\t\t{\n\t\t\tif(m_groups == null)\n\t\t\t{\n\t\t\t\tm_groups = new Vector();\n\t\t\t}\n\t\t\tboolean found = false;\n\t\t\tIterator it = m_groups.iterator();\n\t\t\twhile(it.hasNext() && !found)\n\t\t\t{\n\t\t\t\tGroup gr = (Group) it.next();\n\t\t\t\tfound = gr.getReference().equals(groupRef);\n\t\t\t}\n\t\n\t\t\treturn found;\n\t\t}", "boolean groupSupports(Object groupID, int groupConstant) throws Exception;", "public void testExistingDriverHasGradeGroup() throws MalBusinessException{\n\t\tunallocatedDriverId = ((BigDecimal)em.createNativeQuery(TestQueryConstants.READ_DRIVER_ID_UNALLOCATED).getSingleResult()).longValue();\t\t\n\t\tdriver = driverService.getDriver(unallocatedDriverId);\n\t\tassertNotNull(\"Grade Group does not exist for driver Id \" +unallocatedDriverId, driver.getDgdGradeCode() );\n\t}", "boolean hasAdGroupSimulation();", "public abstract boolean isInGroup(String hostname);", "boolean hasProductGroupView();", "public boolean isSetGroup() {\n return this.group != null;\n }", "@PostConstruct\n\tprivate void InitGroups() {\n\t\tList<Group> groups = identityService.createGroupQuery().groupIdIn(\"READER\", \"BETAREADER\").list();\n\n\t\tif (groups.isEmpty()) {\n\n\t\t\tGroup reader = identityService.newGroup(\"READER\");\n\t\t\tidentityService.saveGroup(reader);\n\n\t\t\tGroup betaReader = identityService.newGroup(\"BETAREADER\");\n\t\t\tidentityService.saveGroup(betaReader);\n\t\t}\n\n\t\tRoles newRole1 = new Roles(\"READER\");\n\t\troleRepository.save(newRole1);\n\t\tRoles newRole2 = new Roles(\"BETAREADER\");\n\t\troleRepository.save(newRole2);\n\t\tRoles newRole3 = new Roles(\"WRITER\");\n\t\troleRepository.save(newRole3);\n\t\tRoles newRole4 = new Roles(\"COMMISSION\");\n\t\troleRepository.save(newRole4);\n\n\t\tBCryptPasswordEncoder encoder = new BCryptPasswordEncoder();\n\n\t\tList<Roles> roles = new ArrayList<Roles>();\n\t\troles.add(newRole4);\n\n\t\tcom.example.app.models.User user1 = new com.example.app.models.User(\"Dejan\", \"Jovanovic\", \"dejan\",\n\t\t\t\tencoder.encode(\"123\").toString(), false, true, roles, \"[email protected]\", \"as2d1as4d5a6s4da6\");\n\t\tuserRepository.save(user1);\n\n\t\tcom.example.app.models.User user2 = new com.example.app.models.User(\"Jovan\", \"Popovic\", \"jovan\",\n\t\t\t\tencoder.encode(\"123\").toString(), false, true, roles, \"[email protected]\", \"as2d1as4d5a6s4da6\");\n\t\tuserRepository.save(user2);\n\t}", "public void testExternalGroupsSupported()\n {\n _ruleSet.grant(1, \"extgroup1\", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n _ruleSet.grant(2, \"extgroup2\", Permission.DENY, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n assertEquals(2, _ruleSet.getRuleCount());\n\n assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"usera\", \"extgroup1\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n assertEquals(Result.DENIED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"userb\", \"extgroup2\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n }", "public boolean isGroup(String name) {\n return grouptabs.containsKey(name);\n }", "public boolean inGroup(String groupName);", "private boolean findEmptyGroup(){\r\n boolean isEmpty = true;\r\n TreeNode root = (TreeNode)sponsorHierarchyTree.getModel().getRoot();\r\n TreePath result = findEmptyGroup(sponsorHierarchyTree, new TreePath(root));\r\n if( result != null && result.getLastPathComponent() instanceof Integer ){\r\n CoeusOptionPane.showInfoDialog(\r\n coeusMessageResources.parseMessageKey(\"sponsorHierarchyList_exceptionCode.1204\"));\r\n isEmpty = false;\r\n }\r\n return isEmpty;\r\n }", "public void testGroupDoesNotImplySameRequiredGroup() {\n User user = RoleFactory.createUser(\"foo\");\n \n Group group = RoleFactory.createGroup(\"bar\");\n group.addRequiredMember(group);\n group.addMember(user);\n \n assertFalse(m_roleChecker.isImpliedBy(group, group));\n }", "public boolean inGroup(String groupName) {\r\n return true;\r\n }", "public boolean isSetGrant_group() {\n return this.grant_group != null;\n }", "boolean hasAdGroupAd();", "@Override\n public boolean isTheTaskGroupAvailable(Integer id) {\n TaskGroup taskGroup = taskGroupMapper.selectById(id);\n\n return taskGroup.getStatus() == 1;\n }", "public void testNestedAclGroupsSupported()\n {\n assertTrue(_ruleSet.addGroup(\"aclgroup1\", Arrays.asList(new String[] {\"userb\"})));\n assertTrue(_ruleSet.addGroup(\"aclgroup2\", Arrays.asList(new String[] {\"usera\", \"aclgroup1\"}))); \n \n _ruleSet.grant(1, \"aclgroup2\", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n assertEquals(1, _ruleSet.getRuleCount());\n\n assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"usera\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"userb\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n }", "public boolean isDuplicateGroup(String groupName) {\n \n Connection con = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n int count = 0;\n \n //retrieve all Groups that match the name\n try {\n\n con = DBUtil.getConnection();\n ps = con.prepareStatement(SQL_SELECT_DUPLICATE_GROUP_COUNT);\n ps.setString(1, groupName);\n \n //get the count\n rs = ps.executeQuery();\n rs.next();\n count = rs.getInt(1);\n if (count != 0)\n return true;\n \n } catch (SQLException e) {\n throw new EJBException(\"Error checking for duplicate groups in MaintainParticipationGroupsBean.isDuplicateGroup()\", e);\n }\n finally {\n DBUtil.cleanup(con, ps, rs);\n }\n \n return false;\n }", "@Test\r\n\tpublic void checkRemoveGroup() {\r\n\r\n\t\tTemplatePlugin.getTemplateGroupRegistry().removeTemplateGroup(\"Test2\");\r\n\t\tint size = TemplatePlugin.getTemplateGroupRegistry()\r\n\t\t\t\t.getTemplateGroups().size();\r\n\t\tassertEquals(1, size);\r\n\t\tITemplateGroup temp = null;\r\n\t\ttry {\r\n\t\t\ttemp = TemplatePlugin.getTemplateGroupRegistry().getTemplateGroup(\r\n\t\t\t\t\t\"Test1\");\r\n\t\t} catch (TemplateException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tTemplatePlugin.getTemplateGroupRegistry().removeTemplateGroup(temp);\r\n\t\tsize = TemplatePlugin.getTemplateGroupRegistry().getTemplateGroups()\r\n\t\t\t\t.size();\r\n\t\tassertEquals(0, size);\r\n\r\n\t\ttry {\r\n\t\t\tTemplatePlugin.getTemplateGroupRegistry().addTemplateGroup(temp);\r\n\t\t} catch (TemplateException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tsize = TemplatePlugin.getTemplateGroupRegistry().getTemplateGroups()\r\n\t\t\t\t.size();\r\n\t\tassertEquals(1, size);\r\n\r\n\t\tTemplatePlugin.getTemplateGroupRegistry().removeTemplateGroup(\"Test1\");\r\n\t\tsize = TemplatePlugin.getTemplateGroupRegistry().getTemplateGroups()\r\n\t\t\t\t.size();\r\n\t\tassertEquals(0, size);\r\n\t}", "boolean validateUserGroups(SessionState state, String userId, Assignment asn)\n\t{\n\t\tSite site = getSite(asn);\n\n\t\t// finding any of the user's groups is sufficient, if they are in multiple groups the check\n\t\t// will fail no matter which of their groups is used\n\t\tOptional<Group> userGroup = getGroupsWithUser(userId, asn, site).stream().findAny();\n\t\tif (userGroup.isPresent())\n\t\t{\n\t\t\treturn checkSubmissionForUsersInMultipleGroups(asn, userGroup.get(), state, true).isEmpty();\n\t\t}\n\n\t\t// user is not in any assignment groups, if they are an instructor this is probably the Student View feature so let them through\n\t\treturn assignmentService.allowAddAssignment(site.getId()) || assignmentService.allowUpdateAssignmentInContext(site.getId());\n\t}", "@Test\r\n\tpublic void checkAddGroup() {\r\n\r\n\t\tITemplateGroup test = null;\r\n\t\ttry {\r\n\t\t\ttest = TemplatePlugin.getTemplateGroupRegistry().getTemplateGroup(\r\n\t\t\t\t\t\"Test1\");\r\n\t\t} catch (TemplateException e) {\r\n\t\t\tfail(\"No exception has thrown.\");\r\n\t\t}\r\n\t\tassertNotNull(test);\r\n\r\n\t\tassertEquals(test.getDisplayName(), \"Test1\");\r\n\t\tassertSame(test, general);\r\n\r\n\t\ttry {\r\n\t\t\ttest = TemplatePlugin.getTemplateGroupRegistry().getTemplateGroup(\r\n\t\t\t\t\t\"Test2\");\r\n\t\t\tfail(\"A excpetion must be thrown.\");\r\n\t\t} catch (TemplateException e) {\r\n\r\n\t\t}\r\n\r\n\t}", "@java.lang.Override\n public boolean hasGroupIndex() {\n return instance.hasGroupIndex();\n }", "boolean hasAdGroupLabel();", "public void checkStorageGroupAlreadySet(PartialPath path) throws StorageGroupAlreadySetException {\n String[] nodeNames = path.getNodes();\n IMNode cur = root;\n if (!nodeNames[0].equals(root.getName())) {\n return;\n }\n for (int i = 1; i < nodeNames.length; i++) {\n if (!cur.hasChild(nodeNames[i])) {\n return;\n }\n cur = cur.getChild(nodeNames[i]);\n if (cur.isStorageGroup()) {\n throw new StorageGroupAlreadySetException(cur.getFullPath());\n }\n }\n throw new StorageGroupAlreadySetException(path.getFullPath(), true);\n }", "@Test\n\tpublic void shouldListStatesByGroupWithRole() {\n\t\tGroup group = createGroupWithUser(app, user);\n\t\t\n\t\t// 2. Asignamos el rol al grupo\n\t\tRoleDTO roleAssignedToGroup = workflowStub.assignRole(app, user, group, formDto);\n\t\t\n\t\t// 3. Creamos un solo estado con el rol asignado al grupo\n\t\tnewState(formDto, \"state1\", roleAssignedToGroup);\n\n\t\tList<State> states = stateService.listStatesForUser(user, formDto);\n\t\tAssert.assertNotNull(\"List of states should NOT be null\", states);\n\t\tAssert.assertEquals(\"List should have the expected size\", 1, states.size());\n\t}", "public void setInValidGroup(boolean inValidGroup){this.inValidGroup = inValidGroup;}", "boolean isSetRequiredResources();", "boolean hasAdGroupCriterion();", "@VisibleForTesting\n void checkGroupDeletions() {\n final String METHOD = \"checkGroupDeletions\";\n LOGGER.entering(CLASS_NAME, METHOD);\n\n NotesView groupView = null;\n ArrayList<Long> groupsToDelete = new ArrayList<Long>();\n Statement stmt = null;\n try {\n groupView = directoryDatabase.getView(NCCONST.DIRVIEW_VIMGROUPS);\n groupView.refresh();\n stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n ResultSet.CONCUR_READ_ONLY);\n ResultSet rs = stmt.executeQuery(\n \"select groupid,groupname,pseudogroup from \" + groupTableName);\n while (rs.next()) {\n long groupId;\n String groupName;\n boolean pseudoGroup = false;\n try {\n groupId = rs.getLong(1);\n groupName = rs.getString(2);\n pseudoGroup = rs.getBoolean(3);\n } catch (SQLException e) {\n LOGGER.log(Level.WARNING, \"Failure reading group table data\", e);\n continue;\n }\n\n if (pseudoGroup) {\n LOGGER.log(Level.FINEST,\n \"Skipping deletion check for pseudo-group: {0}\", groupName);\n continue;\n }\n try {\n if (Util.isCanonical(groupName)) {\n NotesName notesGroupName = notesSession.createName(groupName);\n groupName = notesGroupName.getAbbreviated();\n }\n NotesDocument notesGroupDoc = groupView.getDocumentByKey(groupName);\n if (notesGroupDoc == null) {\n // This group no longer exists.\n LOGGER.log(Level.INFO, \"Group no longer exists in source directory\"\n + \" and will be deleted: {0}\", groupName);\n groupsToDelete.add(groupId);\n }\n Util.recycle(notesGroupDoc);\n } catch (Exception e) {\n LOGGER.log(Level.WARNING,\n \"Error checking deletions for group: \" + groupName, e);\n }\n }\n } catch (Exception e) {\n LOGGER.log(Level.WARNING, \"Error checking deletions\", e);\n } finally {\n Util.recycle(groupView);\n Util.close(stmt);\n }\n\n for (Long groupId : groupsToDelete) {\n try {\n removeGroup(groupId);\n } catch (SQLException e) {\n LOGGER.log(Level.WARNING, \"Error removing group: \" + groupId, e);\n }\n }\n LOGGER.exiting(CLASS_NAME, METHOD);\n }", "private void checkCollisionGroupInternal() {\n\t\tcheckInternalCollisions();\r\n\t\t\r\n\t\t// for every composite in this Group..\r\n\t\tint clen = _composites.size();\r\n\t\tfor (int j = 0; j < clen; j++) {\r\n\t\t\t\r\n\t\t\tComposite ca = _composites.get(j);\r\n\t\t\t\r\n\t\t\t// .. vs non composite particles and constraints in this group\r\n\t\t\tca.checkCollisionsVsCollection(this);\r\n\t\t\t\r\n\t\t\t// ...vs every other composite in this Group\r\n\t\t\tfor (int i = j + 1; i < clen; i++) {\r\n\t\t\t\tComposite cb = _composites.get(i);\r\n\t\t\t\tca.checkCollisionsVsCollection(cb);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean inGroup(Person p){\n\t return false;\n }", "boolean isXMLGroup(Object groupID) throws Exception;", "public boolean getInValidGroup(){return this.inValidGroup;}", "boolean hasHotelGroupView();", "public boolean checkEventsAndGroupsLink();", "@Test\n\tpublic void testVerifyExistenceOfRoleSeedData() {\n\n\t\tfinal List<Industry> industries = industryDao.getAll();\n\n\t\tAssert.assertTrue(industries.size() == 16);\n\n\t\tboolean otherIndustryFound = false;\n\t\tboolean perimeterIndustryFound = false;\n\n\t\tfor (final Industry industry : industries) {\n\n\t\t\tif (industry.getName().equals(\"Transportation\")) {\n\t\t\t\tperimeterIndustryFound = true;\n\t\t\t} else if (industry.getName().equals(\"Other\")) {\n\t\t\t\totherIndustryFound = true;\n\t\t\t}\n\n\t\t}\n\n\t\tAssert.assertTrue(\"Expected the industry named 'Transportation'. Is seed data populated?\", perimeterIndustryFound);\n\t\tAssert.assertTrue(\"Expected the industry named 'Other'. Is seed data populated?\", otherIndustryFound);\n\n\t}", "@Test\n\tvoid updateUserAddGroup() {\n\t\t// Pre condition, check the user \"wuser\", has not yet the group \"DIG\n\t\t// RHA\" we want to be added by \"fdaugan\"\n\t\tinitSpringSecurityContext(\"fdaugan\");\n\t\tfinal TableItem<UserOrgVo> initialResultsFromUpdater = resource.findAll(null, null, \"wuser\",\n\t\t\t\tnewUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(1, initialResultsFromUpdater.getRecordsTotal());\n\t\tAssertions.assertEquals(1, initialResultsFromUpdater.getData().get(0).getGroups().size());\n\t\tAssertions.assertEquals(\"Biz Agency Manager\",\n\t\t\t\tinitialResultsFromUpdater.getData().get(0).getGroups().get(0).getName());\n\n\t\t// Pre condition, check the user \"wuser\", has no group visible by\n\t\t// \"assist\"\n\t\tinitSpringSecurityContext(\"assist\");\n\t\tfinal TableItem<UserOrgVo> assisteResult = resource.findAll(null, null, \"wuser\", newUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(1, assisteResult.getRecordsTotal());\n\t\tAssertions.assertEquals(0, assisteResult.getData().get(0).getGroups().size());\n\n\t\t// Pre condition, check the user \"wuser\", \"Biz Agency Manager\" is not\n\t\t// visible by \"mtuyer\"\n\t\tinitSpringSecurityContext(\"mtuyer\");\n\t\tfinal TableItem<UserOrgVo> usersFromOtherGroupManager = resource.findAll(null, null, \"wuser\",\n\t\t\t\tnewUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(1, usersFromOtherGroupManager.getRecordsTotal());\n\t\tAssertions.assertEquals(0, usersFromOtherGroupManager.getData().get(0).getGroups().size());\n\n\t\t// Add a new valid group \"DIG RHA\" to \"wuser\" by \"fdaugan\"\n\t\tinitSpringSecurityContext(\"fdaugan\");\n\t\tfinal UserOrgEditionVo user = new UserOrgEditionVo();\n\t\tuser.setId(\"wuser\");\n\t\tuser.setFirstName(\"William\");\n\t\tuser.setLastName(\"User\");\n\t\tuser.setCompany(\"ing\");\n\t\tuser.setMail(\"[email protected]\");\n\t\tfinal List<String> groups = new ArrayList<>();\n\t\tgroups.add(\"DIG RHA\");\n\t\tgroups.add(\"Biz Agency Manager\");\n\t\tuser.setGroups(groups);\n\t\tresource.update(user);\n\n\t\t// Check the group \"DIG RHA\" is added and\n\t\tfinal TableItem<UserOrgVo> tableItem = resource.findAll(null, null, \"wuser\", newUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(1, tableItem.getRecordsTotal());\n\t\tAssertions.assertEquals(1, tableItem.getRecordsFiltered());\n\t\tAssertions.assertEquals(1, tableItem.getData().size());\n\t\tAssertions.assertEquals(2, tableItem.getData().get(0).getGroups().size());\n\t\tAssertions.assertEquals(\"Biz Agency Manager\", tableItem.getData().get(0).getGroups().get(0).getName());\n\t\tAssertions.assertEquals(\"DIG RHA\", tableItem.getData().get(0).getGroups().get(1).getName());\n\n\t\t// Check the user \"wuser\", still has no group visible by \"assist\"\n\t\tinitSpringSecurityContext(\"assist\");\n\t\tfinal TableItem<UserOrgVo> assisteResult2 = resource.findAll(null, null, \"wuser\", newUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(1, assisteResult2.getRecordsTotal());\n\t\tAssertions.assertEquals(0, assisteResult2.getData().get(0).getGroups().size());\n\n\t\t// Check the user \"wuser\", still has the group \"DIG RHA\" visible by\n\t\t// \"mtuyer\"\n\t\tinitSpringSecurityContext(\"mtuyer\");\n\t\tfinal TableItem<UserOrgVo> usersFromOtherGroupManager2 = resource.findAll(null, null, \"wuser\",\n\t\t\t\tnewUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(1, usersFromOtherGroupManager2.getRecordsTotal());\n\t\tAssertions.assertEquals(\"DIG RHA\", usersFromOtherGroupManager2.getData().get(0).getGroups().get(0).getName());\n\n\t\t// Restore the old state\n\t\tinitSpringSecurityContext(\"fdaugan\");\n\t\tfinal UserOrgEditionVo user2 = new UserOrgEditionVo();\n\t\tuser2.setId(\"wuser\");\n\t\tuser2.setFirstName(\"William\");\n\t\tuser2.setLastName(\"User\");\n\t\tuser2.setCompany(\"ing\");\n\t\tuser2.setMail(\"[email protected]\");\n\t\tfinal List<String> groups2 = new ArrayList<>();\n\t\tgroups2.add(\"Biz Agency Manager\");\n\t\tuser.setGroups(groups2);\n\t\tresource.update(user);\n\t\tfinal TableItem<UserOrgVo> initialResultsFromUpdater2 = resource.findAll(null, null, \"wuser\",\n\t\t\t\tnewUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(1, initialResultsFromUpdater2.getRecordsTotal());\n\t\tAssertions.assertEquals(1, initialResultsFromUpdater2.getData().get(0).getGroups().size());\n\t\tAssertions.assertEquals(\"Biz Agency Manager\",\n\t\t\t\tinitialResultsFromUpdater2.getData().get(0).getGroups().get(0).getName());\n\t}", "public boolean isUserInGroup(long idUser, long idGroup);", "private void loadAllGroups() {\n ParseUser user = ParseUser.getCurrentUser();\n List<Group> groups = user.getList(\"groups\");\n groupList.clear();\n if (groups != null) {\n for (int i = 0; i < groups.size(); i++) {\n try {\n Group group = groups.get(i).fetchIfNeeded();\n groupList.add(group);\n groupAdapter.notifyItemInserted(groupList.size() - 1);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }\n }\n }", "public boolean isGroupLinkPathPresent() {\r\n\t\treturn isElementPresent(manageVehiclesSideBar.replace(\"Manage Vehicles\", \"Group List\"), SHORTWAIT);\r\n\t}", "public boolean groupSpecified() {\n return group != null && !group.isEmpty();\n }", "@Test\n void testGetRegistrarForUser_doesntExist_isAdmin() {\n expectGetRegistrarFailure(\n \"BadClientId\",\n GAE_ADMIN,\n \"Registrar BadClientId does not exist\");\n verifyNoInteractions(lazyGroupsConnection);\n }", "public boolean isVehiclesGroupFieldPresent() {\r\n\t\treturn isElementPresent(addVehiclesHeader.replace(\"Add Vehicle\", \"Select Vehicle Group\"), SHORTWAIT);\r\n\t}", "public boolean createGroups(int assignmentToGroup, int otherAssignment,\n String repoPrefix) {\n \ttry{\n\n\t\t}catch (Exception se){\n\t\t\t\tSystem.err.println(\"SQL Exception.\" +\n\t\t\t\t\t\t\"<Message>: \" + se.getMessage());\n\t\t}\n // Replace this return statement with an implementation of this method!\n return false;\n }", "@Test\n\tvoid synchGroups() {\n\t\tassumeWritable(c);\n\t\ttry (var u1 = c.update(GROUP_SYNC_MAKE_TEMP_TABLE)) {\n\t\t\tassertEquals(List.of(), u1.getParameters());\n\t\t\tc.transaction(() -> {\n\t\t\t\tu1.call();\n\t\t\t\ttry (var u2 = c.update(GROUP_SYNC_INSERT_TEMP_ROW);\n\t\t\t\t\t\tvar u3 = c.update(GROUP_SYNC_ADD_GROUPS);\n\t\t\t\t\t\tvar u4 = c.update(GROUP_SYNC_REMOVE_GROUPS);\n\t\t\t\t\t\tvar u5 = c.update(GROUP_SYNC_DROP_TEMP_TABLE)) {\n\t\t\t\t\tassertEquals(List.of(\"group_name\", \"group_type\"),\n\t\t\t\t\t\t\tu2.getParameters());\n\t\t\t\t\tassertEquals(0, u2.call(NO_NAME, INTERNAL));\n\t\t\t\t\tassertEquals(List.of(\"user_id\"), u3.getParameters());\n\t\t\t\t\tassertEquals(0, u3.call(NO_USER));\n\t\t\t\t\tassertEquals(List.of(\"user_id\"), u4.getParameters());\n\t\t\t\t\tassertEquals(0, u4.call(NO_USER));\n\t\t\t\t\tassertEquals(List.of(), u5.getParameters());\n\t\t\t\t\tu5.call();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "@Test(groups = \"wso2.ds.dashboard\", description = \"Check registry resource for customized dashboard\",\n dependsOnMethods = \"testCustomizeButtonDashboard\")\n public void checkRegistrySourceForCustomizeDashboard() {\n Boolean isResourceExist = isResourceExist(\n DSIntegrationTestConstants.DASHBOARD_REGISTRY_PATH_CUSTOM_DASHBOARD_PERUSER + \"/\" + USERNAME_VIEWER\n + \"/\" + DS_DASHBOARDS_CONTEXT + \"/\" + dashboardTitle.toLowerCase());\n assertTrue(isResourceExist,\n \"Registry resource could not be created for personalize dashboard per user due to some errors\");\n }", "@Test\n public void checkValidEntity() {\n cleanEntity0();\n entity0 = EntityUtil.getSampleRole();\n final Set<ConstraintViolation<Object>> cv = PersistenceValidation.validate(entity0);\n assertTrue(cv.isEmpty());\n }", "public com.hps.july.persistence.Group getGroups() throws Exception {\n\tGroupAccessBean bean = constructGroups();\n\tif (bean != null)\n\t return (Group)bean.getEJBRef();\n\telse\n\t return null;\n\n}", "@Override\r\n public boolean doIsModified() {\r\n return this.updatedGroups.isEmpty();\r\n }", "boolean hasGroupPlacementView();", "@XmlTransient\n\tpublic boolean isConfirmGroupMemberships() {\n\t\treturn (WizardState.confirmGroupMemberships.equals(getWizardState()));\n\t}", "@Test\n public void testGetUserGroups() throws Exception {\n\n // p4 groups -o p4jtestsuper\n List<IUserGroup> userGroups = server.getUserGroups(superUser, new GetUserGroupsOptions().setOwnerName(true));\n assertThat(\"null user group list\", userGroups, notNullValue());\n assertThat(\"too few user groups in list\", userGroups.size() >= 1, is(true));\n\n // p4 groups -u p4jtestuser\n userGroups = server.getUserGroups(user, new GetUserGroupsOptions().setUserName(true));\n assertThat(\"null user group list\", userGroups, notNullValue());\n assertThat(\"too few user groups in list\", userGroups.size() >= 1);\n\n // p4 groups -g p4users\n userGroups = server.getUserGroups(superUserGroupName, new GetUserGroupsOptions().setGroupName(true));\n assertThat(\"null user group list\", userGroups, notNullValue());\n assertThat(userGroups.size() == 0, is(true));\n\n }", "private boolean existeDatosGrupoPuestos(ConcursoPuestoAgr concursoPuestoAgr) {\r\n\t\tString query =\r\n\t\t\t\"SELECT * FROM seleccion.datos_grupo_puesto where id_concurso_puesto_agr = \"\r\n\t\t\t\t+ concursoPuestoAgr.getIdConcursoPuestoAgr();\r\n\t\treturn seleccionUtilFormController.existeNative(query);\r\n\t}", "private boolean checkMembers(ArrayList <String> group1, ArrayList <String> group2) {\n\t\tCollections.sort(group1);\n\t\tCollections.sort(group2);\n\t\treturn(group1.equals(group2));\n\t}", "@Test\n\tpublic void testVerifyExistenceOfRoleSeedData() {\n\n\t\tfinal List<Role> roles = roleDao.getAll();\n\n\t\tboolean managerRoleFound = false;\n\t\tboolean adminRoleFound = false;\n\n\t\tfor (final Role role : roles) {\n\n\t\t\tif (Roles.ADMIN.name().equals(role.getName())) {\n\t\t\t\tadminRoleFound = true;\n\t\t\t} else if (Roles.MANAGER.name().equals(role.getName())) {\n\t\t\t\tmanagerRoleFound = true;\n\t\t\t}\n\n\t\t}\n\n\t\tAssert.assertTrue(\"Expected the manager role. Is seed data populated?\", managerRoleFound);\n\t\tAssert.assertTrue(\"Expected the admin role. Is seed data populated?\", adminRoleFound);\n\t}", "boolean hasPublisherGroupID();", "public void testGroupDoesNotImplySameGroup() {\n User user = RoleFactory.createUser(\"foo\");\n \n Group group = RoleFactory.createGroup(\"bar\");\n group.addMember(group);\n group.addMember(user);\n \n assertFalse(m_roleChecker.isImpliedBy(group, group));\n }", "@Test public void modifySecretGroups_success() throws Exception {\n createGroup(\"group8a\");\n createGroup(\"group8b\");\n createGroup(\"group8c\");\n create(CreateSecretRequestV2.builder()\n .name(\"secret8\")\n .content(encoder.encodeToString(\"supa secret8\".getBytes(UTF_8)))\n .groups(\"group8a\", \"group8b\")\n .build());\n\n // Modify secret\n ModifyGroupsRequestV2 request = ModifyGroupsRequestV2.builder()\n .addGroups(\"group8c\", \"non-existent1\")\n .removeGroups(\"group8a\", \"non-existent2\")\n .build();\n List<String> groups = modifyGroups(\"secret8\", request);\n assertThat(groups).containsOnly(\"group8b\", \"group8c\");\n }", "@Override\n public void testOneRequiredGroup() {\n }", "@Override\n public void testOneRequiredGroup() {\n }", "public Collection getGroups() throws Exception\r\n {\r\n // TODO Auto-generated method stub\r\n return null;\r\n }", "public static boolean validateGroup(String name, String project){\n \n boolean r = true;\n\t\t\t \n for(int i= 0; i < groups.length; i++){\n for(int j = 0; j < groups[i].length; j++){\n\tif(j == 0 ){\n\t if(groups[i][j].equals(project)){\n\t System.out.println(\"Found a project \" +groups[i][j]);\n\t try{\n\t String[] tempArray = groups[i];\n\t duplicateCheckLoop:\n\t\tfor( String s : tempArray) {\n\t\t if(s.equals(name)){\n\t\t r = false;\n\t\t break duplicateCheckLoop;\n\t\t } r = true;\n\t }\n\t }catch (Exception e) {\n\t String error = e.getMessage();\n\t logger.writeLog(\"validateGroup Method : \", error);\n\t } \n\t }\n }\n }\n }\n \n return r;\n }", "public boolean isStorageGroupAlreadySet(PartialPath path) {\n String[] nodeNames = path.getNodes();\n IMNode cur = root;\n if (!nodeNames[0].equals(root.getName())) {\n return false;\n }\n for (int i = 1; i < nodeNames.length; i++) {\n if (!cur.hasChild(nodeNames[i])) {\n return false;\n }\n cur = cur.getChild(nodeNames[i]);\n if (cur.isStorageGroup()) {\n return true;\n }\n }\n return true;\n }", "public void checkInit() {\r\n super.checkInit();\r\n ValidationUtility.checkNotNull(groupService, \"groupService\",\r\n SecurityGroupsActionConfigurationException.class);\r\n }", "public void ensureInitialized() {\r\n\t\ttry {\r\n\t\t\tif (this.getGroup() != null)\r\n\t\t\t\t// Success\r\n\t\t\t\treturn;\r\n\t\t} catch (EJBException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tUtil.redirectToRoot();\r\n\t}", "boolean exists(PortPairGroupId portPairGroupId);", "@Test\n\tpublic void testFindBy() throws PaaSApplicationException {\n\t\tList<String> members = getMembers();\n\n\t\tGroup expected = new Group();\n\t\texpected.setGid(1);\n\t\texpected.setName(\"tstdaemon\");\n\t\texpected.setMembers(members);\n\n\t\tGroup actual = repo.findBy(1);\n\t\tAssertions.assertEquals(expected, actual, \"Find group by Id\");\n\t}", "public boolean createGroup(GroupsGen group) {\n \n super.create(group);\n return true;\n }", "private void validateLocalityGroups(ConnectorTableMetadata meta)\n {\n // Validate any configured locality groups\n Optional<Map<String, Set<String>>> groups =\n AccumuloTableProperties.getLocalityGroups(meta.getProperties());\n if (!groups.isPresent()) {\n return;\n }\n\n String rowIdColumn = getRowIdColumn(meta);\n\n // For each locality group\n for (Map.Entry<String, Set<String>> g : groups.get().entrySet()) {\n // For each column in the group\n for (String col : g.getValue()) {\n // If the column was not found, throw exception\n List<ColumnMetadata> matched = meta.getColumns().stream()\n .filter(x -> x.getName().equalsIgnoreCase(col)).collect(Collectors.toList());\n\n if (matched.size() != 1) {\n throw new PrestoException(VALIDATION, \"Unknown column in locality group: \" + col);\n }\n\n if (matched.get(0).getName().equalsIgnoreCase(rowIdColumn)) {\n throw new PrestoException(VALIDATION, \"Row ID column cannot be in a locality group\");\n }\n }\n }\n }", "public void verifyCreatedGroupOnGroupPage(String expectedGroupName) {\n\t\tString groupName = newlyCreatedGroup.getText();\n\t\tAssert.assertEquals(groupName, expectedGroupName);\n\t}" ]
[ "0.6716173", "0.65076673", "0.64064324", "0.6294142", "0.61625236", "0.60891527", "0.60532147", "0.5938953", "0.58909625", "0.5887874", "0.58204275", "0.5818385", "0.5788526", "0.57744944", "0.5764792", "0.57500714", "0.5745722", "0.5728841", "0.5715754", "0.57116264", "0.569372", "0.56728244", "0.56485933", "0.5636314", "0.5625422", "0.5558492", "0.55212164", "0.55011886", "0.5494381", "0.54908615", "0.5485585", "0.54716766", "0.5440589", "0.5410745", "0.53972274", "0.53784084", "0.53459054", "0.5343981", "0.53264016", "0.53190964", "0.5315381", "0.5312682", "0.53116167", "0.52924085", "0.52801716", "0.5265183", "0.5262224", "0.5260117", "0.5248536", "0.5233952", "0.523075", "0.5230165", "0.5225866", "0.5224295", "0.5214456", "0.5203489", "0.52005064", "0.5187776", "0.5185327", "0.51842767", "0.5181126", "0.51761806", "0.5167072", "0.5162403", "0.51490396", "0.5142337", "0.5141349", "0.5141043", "0.51353854", "0.5132827", "0.51278096", "0.5104585", "0.51041526", "0.5094041", "0.50876206", "0.50693935", "0.5067143", "0.5046663", "0.50460434", "0.50428265", "0.50413394", "0.50368726", "0.50355154", "0.50335836", "0.5033116", "0.50304925", "0.5021939", "0.50201946", "0.5016851", "0.5016851", "0.5005186", "0.499737", "0.4990843", "0.49799493", "0.49715886", "0.49694207", "0.4961812", "0.4953679", "0.49517593", "0.4943582" ]
0.5845058
10
Verify if resource items are present in db
public Future<List<String>> checkResource(List<String> resourceList) { Promise<List<String>> p = Promise.promise(); Collector<Row, ?, List<String>> catIdCollector = Collectors.mapping(row -> row.getString("cat_id"), Collectors.toList()); try { if (resourceList.isEmpty()) { p.complete(new ArrayList<>()); return p.future(); } pool.withConnection( conn -> conn.preparedQuery(GET_RES_DETAILS) .collecting(catIdCollector) .execute(Tuple.of(resourceList.toArray(String[]::new))) .onFailure( obj -> { LOGGER.error("checkResource db fail :: " + obj.getLocalizedMessage()); p.fail("internal error"); }) .onSuccess( success -> { List<String> validItems = success.value(); List<String> invalid = resourceList.stream() .filter(item -> !validItems.contains(item)) .collect(Collectors.toList()); p.complete(invalid); })); } catch (Exception e) { LOGGER.error("Fail: " + e.toString()); p.fail("internal error"); } return p.future(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void checkNotExistingItems() {\n Item actualItem;\n //non existing items\n actualItem = mDaoToTest.getItem(mContext, -123423);\n assertNull(\"Item not null\", actualItem);\n actualItem = mDaoToTest.getItem(mContext, RainbowBaseContentProviderDao.NOT_FOUND);\n assertNull(\"Item not null\", actualItem);\n actualItem = mDaoToTest.getItem(mContext, 345823);\n assertNull(\"Item not null\", actualItem);\n }", "void checkInventoryExists() {\n\n MrnInventory[] checkInventory =\n new MrnInventory(survey.getSurveyId()).get();\n inventoryExists = false;\n if (checkInventory.length > 0) {\n inventoryExists = true;\n } // if (checkInventory.length > 0)\n\n\n }", "@Override\n\tprotected boolean itemExists() {\n\t\treturn false;\n\t}", "@Test\n public void rowExists(){\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n timeListDAO.createTimeList(new TimeList(\"dummy\", 1990, 0, 60, 0, 0));\n\n assertTrue(timeListResource.rowExists(\"dummy\",1990,0));\n\n //clean up\n timeListDAO.removeTimeList(1990,0, \"dummy\");\n userDAO.removeUser(\"dummy\");\n }", "boolean hasItemStorage();", "boolean hasResource();", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "@Test\r\n\tpublic void testGetAllGuidances() {\n\t\tthis.checklistDAO.saveOrUpdateCheckList(this.checklist);\r\n\r\n\t\t// Look if this checklist is also into the database and look if the size\r\n\t\t// of the set is >= 1.\r\n\t\tList<CheckList> checklists = this.checklistDAO.getAllCheckList();\r\n\t\tassertNotNull(checklists);\r\n\t\tassertTrue(checklists.size() >= 1);\r\n\t}", "@Override\r\n\tpublic boolean itemExists(String absPath) throws RepositoryException {\n\t\treturn false;\r\n\t}", "private boolean existsSubResource()\r\n {\r\n return ((subResource_ != null) && subResource_.exists());\r\n }", "@Test\n public void readAll_UserExists_Authorized() {\n given(userExists(), permissionValidationSuccess());\n Collection<User> retrievedUsers = userService.readAll(SOME_AUTH_ATTRIBUTES);\n assertEquals(1, retrievedUsers.size());\n assertEquals(USER_THAT_EXISTS, retrievedUsers.iterator().next());\n }", "public boolean isExisting() throws Exception\r\n\t\t{\r\n\t\tRouteGroup myR = (RouteGroup) myRouteGroup.get();\r\n\t\tthis.UUID = myR.getUUID();\r\n\t\t\r\n\t\tVariables.getLogger().debug(\"Item \"+this.name+\" already exist in the CUCM\");\r\n\t\treturn true;\r\n\t\t}", "private boolean isValid(){\n\n Set<ResourceSingle> checkSet = new HashSet<>();\n return shelves.stream()\n .map(Shelf::getCurrentType)\n .filter(Objects::nonNull)\n .allMatch(checkSet::add);\n }", "public boolean list_exists(Context context) {\n File file = context.getFileStreamPath(\"ingredientes\");\n if (file == null || !file.exists()) {\n return false;\n }\n return true;\n }", "public void verifyBugerList()\n\t{\n\t\t\n\t}", "public static boolean itemExists(String itemName)\n {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n\n String query = \"SELECT count(*) FROM Item \" +\n \"WHERE itemName\"+ \"=\" + \"'\" + itemName + \"'\";\n try\n {\n ps = connection.prepareStatement(query);\n //ps.setString(1, emailAddress);\n rs = ps.executeQuery();\n if (rs.next()) {\n\t\tif (rs.getInt(1) > 0) {\n\t\t return true;\n\t\t}\n\t }\n }\n catch(SQLException e)\n {\n e.printStackTrace();\n return false;\n }\n finally\n {\n DButil.closeResultSet(rs);\n DButil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n return false;\n }", "@Test\n\tpublic void testVerifyExistenceOfRoleSeedData() {\n\n\t\tfinal List<Industry> industries = industryDao.getAll();\n\n\t\tAssert.assertTrue(industries.size() == 16);\n\n\t\tboolean otherIndustryFound = false;\n\t\tboolean perimeterIndustryFound = false;\n\n\t\tfor (final Industry industry : industries) {\n\n\t\t\tif (industry.getName().equals(\"Transportation\")) {\n\t\t\t\tperimeterIndustryFound = true;\n\t\t\t} else if (industry.getName().equals(\"Other\")) {\n\t\t\t\totherIndustryFound = true;\n\t\t\t}\n\n\t\t}\n\n\t\tAssert.assertTrue(\"Expected the industry named 'Transportation'. Is seed data populated?\", perimeterIndustryFound);\n\t\tAssert.assertTrue(\"Expected the industry named 'Other'. Is seed data populated?\", otherIndustryFound);\n\n\t}", "protected boolean resourceExists() {\n\t\tIWorkspace workspace = ResourcesPlugin.getWorkspace();\n\t\tif (workspace == null)\n\t\t\treturn false;\n\t\treturn RodinDB.getTarget(workspace.getRoot(), this.getPath()\n\t\t\t\t.makeRelative(), true) != null;\n\t}", "public boolean has(String itemName);", "boolean canRead(ItemState itemState) throws ItemNotFoundException, RepositoryException;", "boolean isHasResources();", "@Override\n public boolean isAlreadyInDb () {\n try {\n load( idDevice );\n } catch ( EntityNotFoundException e ) {\n return false;\n }\n return true;\n }", "boolean hasExists();", "private boolean inDatabase() {\r\n \t\treturn inDatabase(0, null);\r\n \t}", "public boolean resourceExists(TIdentifiable resource) {\r\n return (m_resources.getIndex(resource) >= 0);\r\n }", "public static boolean checkTaskInDb() {\n\n List<Task> taskList = new ArrayList<>();\n try {\n // taskList = Task.listAll(Task.class);\n taskList= Select.from(Task.class).orderBy(\"due_date Desc\").where(\"status=?\", new String[] {\"0\"}).list();\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n if(taskList!=null && taskList.size()>0)\n return true;\n return false;\n }", "void checkItemForDelete(Object item, java.sql.Statement stmt) throws PrismsRecordException;", "@Test\n void isShelfAvailability(){\n Shelf shelf=new Shelf(3);\n\n shelf.addResources(Resource.SHIELD);\n shelf.addResources(Resource.SHIELD);\n assertTrue(shelf.isShelfAvailability());\n }", "public abstract boolean exists() throws AccessException;", "public boolean hasItem() {\n return null != item;\n }", "public void testGetSelectedItemsCountWithNoItemsInDb()\n\t{\n\t\t// arrange\n\t\t// let's add a new list, category, and a few items to the new list\n\t\tUri listUri = helper.insertNewList(\"testlist\");\n\t\tint listId = Integer.parseInt(listUri.getPathSegments().get(1));\n\t\tassertEquals(2, listId);\n\n\t\t// Act & Assert\n\t\tint selectedItemsCount = service.getSelectedItemsCount();\n\t\tassertEquals(0, selectedItemsCount);\n\t}", "@Override\n\tpublic boolean resourceExist(URI uri) throws StorageSecuirtyException {\n\t\treturn false;\n\t}", "boolean isValidForBasket(Collection<Item> items);", "private static void checkMetadataRecords(final ContentModelCreate item) throws InvalidContentException {\r\n \r\n final List<MdRecordCreate> mdRecords = item.getMetadataRecords();\r\n \r\n if (!(mdRecords == null || mdRecords.size() < 1)) {\r\n final Collection<String> mdRecordNames = new ArrayList<String>();\r\n for (final MdRecordCreate mdRecord : mdRecords) {\r\n \r\n final String name = mdRecord.getName();\r\n \r\n // check uniqueness of names\r\n if (mdRecordNames.contains(name)) {\r\n throw new InvalidContentException(\"Metadata 'md-record' with name='\" + name\r\n + \"' exists multiple times.\");\r\n }\r\n \r\n mdRecordNames.add(name);\r\n }\r\n }\r\n }", "@Test\n public void checkValidEntity() {\n cleanEntity0();\n entity0 = EntityUtil.getSampleRole();\n final Set<ConstraintViolation<Object>> cv = PersistenceValidation.validate(entity0);\n assertTrue(cv.isEmpty());\n }", "@Test\n\tpublic void checkIfThereIsRecords() {\n\n\t\tfinal HandlingRecords handlingRecords = new HandlingRecords(entityManagerFactory.createEntityManager());\n\n\t\t// there should be a least 3 because of the import of data.\n\t\tfinal List<Record> sampleOfEntities = handlingRecords.findASampleOfEntities(3);\n\n\t\tassertTrue(sampleOfEntities != null && sampleOfEntities.size() == 3);\n\n\t}", "protected boolean isValid() {\n return COLLECTION.getList().contains(this);\n }", "public void verifyEntrySet() {\n }", "@Override\r\n\tpublic boolean exists() {\n\t\treturn false;\r\n\t}", "@Override\n public boolean hasUploadedFiles(Item item) throws SQLException\n {\n List<Bundle> bundles = getBundles(item, \"ORIGINAL\");\n for (Bundle bundle : bundles) {\n if (CollectionUtils.isNotEmpty(bundle.getBitstreams())) {\n return true;\n }\n }\n return false;\n }", "public boolean checkQorder(Connection con)\n throws qdbException, qdbErrMessage\n {\n Vector resCon = dbResourceContent.getChildAss(con,mod_res_id);\n dbResourceContent rcn = new dbResourceContent();\n\n for(int i=1;i<=resCon.size();i++) {\n rcn = (dbResourceContent) resCon.elementAt(i-1);\n if (rcn.rcn_order != i)\n return false;\n }\n\n return true;\n }", "boolean hasResMineID();", "public abstract boolean exists();", "@Test\n public void testSqlExistsNoForeignRestriction() {\n Query<Car> carsQuery = and(\n in(Car.FEATURES, \"sunroof\", \"convertible\"),\n existsIn(garages,\n Car.NAME,\n Garage.BRANDS_SERVICED\n )\n );\n\n Set<Car> results = asSet(cars.retrieve(carsQuery));\n\n assertEquals(\"should have 3 results\", 3, results.size());\n assertTrue(\"results should contain car1\", results.contains(car1));\n assertTrue(\"results should contain car4\", results.contains(car4));\n assertTrue(\"results should contain car5\", results.contains(car5));\n }", "boolean isSetRequiredResources();", "public boolean validateMenuItems(CwSession cwSession){\n idAnyNonExistingCpMenuItem(cwSession)\n .ifPresent(id -> {throw new RecordNotFoundException(String.format(MENU_ITEM_NOT_FOUND_WITH_ID,id));});\n return true;\n }", "public boolean isItemExist(String item)\n {\n boolean uExist = true;\n Connection conn = DatabaseConnection.getConnection();\n PreparedStatement pss;\n ResultSet rss;\n \n try {\n pss = conn.prepareStatement(\"SELECT * FROM items WHERE Item_number = ?\");\n \n pss.setString(1, jTextFieldNumber.getText());\n \n rss = pss.executeQuery();\n \n if(rss.next())\n {\n JOptionPane.showMessageDialog(null, \"Item Already Exists!\");\n return false;\n }\n else\n {\n return true;\n }\n \n } \n catch (SQLException ex) {\n Logger.getLogger(ItemQuery.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n finally\n {\n try {\n conn.close();\n } catch (SQLException ex) {\n Logger.getLogger(AddItem.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n \n return uExist;\n }", "public boolean exists() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry { return myData.record.exists(background.getClient()); }\n\t\tcatch (LDBException e) { setStatus(e); }\n\t\treturn false;\n\t}", "@Test\n public void testSqlExistsWithForeignRestriction() {\n Query<Car> carsQuery = and(\n in(Car.FEATURES, \"sunroof\", \"convertible\"),\n existsIn(garages,\n Car.NAME,\n Garage.BRANDS_SERVICED,\n equal(Garage.LOCATION, \"Dublin\")\n )\n );\n\n Set<Car> results = asSet(cars.retrieve(carsQuery));\n\n assertEquals(\"should have 2 results\", 2, results.size());\n assertTrue(\"results should contain car1\", results.contains(car1));\n assertTrue(\"results should contain car4\", results.contains(car4));\n }", "boolean exists(Curso curso) throws BusinessException;", "@Test\r\n public void testGetUsuarios() throws Exception \r\n {\r\n List<UsuarioEntity> list;\r\n list = usuarioLogic.getUsuarios();\r\n Assert.assertEquals(dataUs.size(), list.size()); \r\n for(UsuarioEntity entity : list)\r\n {\r\n boolean found = false;\r\n for(UsuarioEntity storedEntity : dataUs)\r\n {\r\n if(entity.getId().equals(storedEntity.getId()))\r\n {\r\n found=true;\r\n }\r\n }\r\n Assert.assertTrue(found);\r\n }\r\n }", "@Test\n public void getTimeListsByIdCatch(){\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n timeListDAO.createTimeList(new TimeList(\"dummy\", 1990, 0, 60, 0, 0));\n\n assertTrue(timeListResource.getTimeListById(\"notdummy\").isEmpty());\n\n //clean up\n timeListDAO.removeTimeList(1990,0, \"dummy\");\n userDAO.removeUser(\"dummy\");\n }", "@Test\n public void getPerrosTest() {\n List<PerroEntity> list = perroLogic.getPerros();\n Assert.assertEquals(Perrodata.size(), list.size());\n for (PerroEntity entity : list) {\n boolean found = false;\n for (PerroEntity storedEntity : Perrodata) {\n if (entity.getId().equals(storedEntity.getId())) {\n found = true;\n }\n }\n Assert.assertTrue(found);\n }\n }", "@Test\n\tpublic void testVerifyExistenceOfRoleSeedData() {\n\n\t\tfinal List<Role> roles = roleDao.getAll();\n\n\t\tboolean managerRoleFound = false;\n\t\tboolean adminRoleFound = false;\n\n\t\tfor (final Role role : roles) {\n\n\t\t\tif (Roles.ADMIN.name().equals(role.getName())) {\n\t\t\t\tadminRoleFound = true;\n\t\t\t} else if (Roles.MANAGER.name().equals(role.getName())) {\n\t\t\t\tmanagerRoleFound = true;\n\t\t\t}\n\n\t\t}\n\n\t\tAssert.assertTrue(\"Expected the manager role. Is seed data populated?\", managerRoleFound);\n\t\tAssert.assertTrue(\"Expected the admin role. Is seed data populated?\", adminRoleFound);\n\t}", "@Test\n public void testGetProductsByName() throws Exception {\n System.out.println(\"getProductsByName\");\n for (Product p : products) {\n prs = dao.getProductsByName(p.getName());\n assertTrue(prs.size() == 1);\n assertTrue(prs.contains(p));\n \n }\n prs = dao.getProductsByName(nonExisten.getName());\n assertTrue(prs.isEmpty());\n }", "@Override\n\tpublic boolean exists() {\n\t\treturn false;\n\t}", "@Test\n public void testCreateAndReadPositive() throws Exception{\n Item item = new Item();\n item.setName(\"item\");\n item.setType(ItemTypes.ALCOHOLIC_BEVERAGE);\n itemDao.create(item);\n Assert.assertNotNull(itemDao.read(item.getName()));\n }", "@Test\n public void testGetAllItems() throws Exception {\n Item firstItem = new Item(\"Snickers\");\n firstItem.setItemPrice(new BigDecimal(\"2.75\"));\n firstItem.setItemStock(10);\n\n Item secondItem = new Item(\"Kit-Kat\");\n secondItem.setItemPrice(new BigDecimal(\"3.00\"));\n secondItem.setItemStock(12);\n\n // ACT - add/get all items from the DAO\n testDao.addItem(firstItem.getItemName(), firstItem);\n testDao.addItem(secondItem.getItemName(), secondItem);\n\n List<Item> allItems = testDao.getAllItems();\n\n // Check in general\n assertNotNull(allItems, \"The list of items must not be null\");\n assertEquals(2, allItems.size(), \"Inventory should have two items\");\n\n // Check specifics\n assertTrue(testDao.getAllItems().contains(firstItem),\n \"The inventory shoudl include Snickers\");\n assertTrue(testDao.getAllItems().contains(secondItem),\n \"The inventory should include Kit-Kat\");\n // Need to include hashcose/equals/toString methods/additions to Item Class \n }", "public boolean checkHumanResourceContentByMember(Member member) {\n\t\tSl = \"SELECT * FROM human_resource_content WHERE memberAccount=?\";\r\n\t\ttry {\r\n\t\t\tconn = dataSource.getConnection();\r\n\t\t\tsmt = conn.prepareStatement(Sl);\r\n\t\t\tsmt.setString(1, member.getAccount());\r\n\t\t\trs = smt.executeQuery();\r\n\t\t\tif(rs.next()){\t\t\t\t\r\n\t\t\t\tsmt.setString(1, member.getAccount());\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tsmt.executeQuery();\t\r\n\t\t\trs.close();\r\n\t\t\tsmt.close();\r\n \r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n \r\n\t\t} finally {\r\n\t\t\tif (conn != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tconn.close();\r\n\t\t\t\t} catch (SQLException e) {}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private static void checkResourceInConn(Connection conn) throws ServiceException {\n // Check weather OverlayVpn exist\n ResultRsp<OverlayVpn> overlayVpnRsp =\n new InventoryDao<OverlayVpn>().query(OverlayVpn.class, conn.getCompositeVpnId(), null);\n if(!overlayVpnRsp.isValid()) {\n ThrowOverlayVpnExcpt.throwResNotExistAsBadReq(\"OverlayVpn\", conn.getCompositeVpnId());\n }\n\n BaseMappingPolicy mappingPolicy = getMappingPolicy(conn.getTechnology(), conn.getMappingPolicyId());\n\n if(null != mappingPolicy) {\n validateTypeConsistency(conn.getTechnology(), mappingPolicy.getType());\n }\n }", "public boolean isEveryIdValid()\n {\n return(idValidation.size()==0);\n }", "private boolean itemListContains(Item item){\r\n\t\treturn items.containsKey(item.getItemIdentifier());\r\n\t}", "public void testInsertGetUpdateAndDeleteItem() {\n Item actualItem;\n int affected;\n \n checkNotExistingItems();\n \n //inserts first item\n Item item1 = createTestItem1();\n long itemId1 = insertAndVerifyItem(item1);\n \n //compares first item\n actualItem = mDaoToTest.getItem(mContext, itemId1);\n compareItem(item1, actualItem);\n checkNotExistingItems();\n \n //inserts second item\n Item item2 = createTestItem2();\n long itemId2 = insertAndVerifyItem(item2);\n //compares first item\n actualItem = mDaoToTest.getItem(mContext, itemId1);\n compareItem(item1, actualItem);\n //compares second item\n actualItem = mDaoToTest.getItem(mContext, itemId2);\n compareItem(item2, actualItem);\n checkNotExistingItems();\n \n //inserts third item\n Item item3 = createTestItem3();\n long itemId3 = insertAndVerifyItem(item3);\n //compares first item\n actualItem = mDaoToTest.getItem(mContext, itemId1);\n compareItem(item1, actualItem);\n //compares second item\n actualItem = mDaoToTest.getItem(mContext, itemId2);\n compareItem(item2, actualItem);\n //compares third item\n actualItem = mDaoToTest.getItem(mContext, itemId3);\n compareItem(item3, actualItem);\n checkNotExistingItems();\n \n //deletes not existing item\n affected = mDaoToTest.deleteItem(mContext, 234234);\n assertEquals(\"Wrong affected items\", 0, affected);\n affected = mDaoToTest.deleteItem(mContext, -3024);\n assertEquals(\"Wrong affected items\", 0, affected);\n affected = mDaoToTest.deleteItem(mContext, RainbowBaseContentProviderDao.NOT_FOUND);\n assertEquals(\"Wrong affected items\", 0, affected);\n \n //deletes first item\n deleteAndVerifyItem(itemId1);\n actualItem = mDaoToTest.getItem(mContext, itemId1);\n assertNull(\"Item not null\", actualItem);\n //compares second item\n actualItem = mDaoToTest.getItem(mContext, itemId2);\n compareItem(item2, actualItem);\n //compares third item\n actualItem = mDaoToTest.getItem(mContext, itemId3);\n compareItem(item3, actualItem);\n checkNotExistingItems();\n \n //deletes second item\n deleteAndVerifyItem(itemId2);\n actualItem = mDaoToTest.getItem(mContext, itemId1);\n assertNull(\"Item not null\", actualItem);\n actualItem = mDaoToTest.getItem(mContext, itemId2);\n assertNull(\"Item not null\", actualItem);\n //compare third item\n actualItem = mDaoToTest.getItem(mContext, itemId3);\n compareItem(item3, actualItem);\n checkNotExistingItems();\n \n //updates not-existing items\n affected = mDaoToTest.updateItem(mContext, item1);\n assertEquals(\"Wrong affected items\", 0, affected);\n affected = mDaoToTest.updateItem(mContext, item2);\n assertEquals(\"Wrong affected items\", 0, affected);\n \n //re-add first item\n itemId1 = insertAndVerifyItem(item1);\n actualItem = mDaoToTest.getItem(mContext, itemId1);\n compareItem(item1, actualItem);\n \n //update first item\n item1 = createTestItem2();\n item1.setId(itemId1);\n updateAndVerifyItem(item1);\n actualItem = mDaoToTest.getItem(mContext, itemId1);\n compareItem(item1, actualItem);\n actualItem = mDaoToTest.getItem(mContext, itemId3);\n compareItem(item3, actualItem);\n \n //update third item\n item3 = createTestItem1();\n item3.setId(itemId3);\n updateAndVerifyItem(item3);\n actualItem = mDaoToTest.getItem(mContext, itemId3);\n compareItem(item3, actualItem);\n actualItem = mDaoToTest.getItem(mContext, itemId1);\n compareItem(item1, actualItem);\n }", "boolean hasEntity();", "boolean hasEntity();", "public static boolean checkResources(){\n for(Instruction i : waitingList){\n if(resourceArr[i.resourceType - 1] >= i.resourceAmount){\n return true;\n }\n }\n for(int i = 0 ; i < taskPointers.length; i ++){\n int pointerIndex = taskPointers[i];\n Task currTask = taskList.get(i);\n if(currTask.terminateTime == - 1 && (currTask.isAborted == false) && Collections.disjoint(waitingList, currTask.instructionList)){\n Instruction currInstruction = currTask.instructionList.get(pointerIndex);\n Type instructionType = currInstruction.instructionType;\n int resourceType = currInstruction.resourceType;\n if(instructionType != Type.request){\n return true;\n }else{\n if(resourceArr[currInstruction.resourceType - 1] >= currInstruction.resourceAmount){\n return true;\n }\n }\n }\n\n }\n return false;\n }", "public boolean checkItem () {\r\n\t\tfor (Entity e : getLocation().getWorld().getEntities())\r\n\t\t{\r\n\t\t\tdouble x = e.getLocation().getX();\r\n\t\t\tdouble z = e.getLocation().getZ();\r\n\t\t\tdouble yDiff = getSpawnLocation().getY() - e.getLocation().getY();\r\n \r\n\t\t\tif (yDiff < 0)\r\n\t\t\t\tyDiff *= -1;\r\n\r\n\t\t\tif (x == getSpawnLocation().getX() && yDiff <= 1.5 && z == getSpawnLocation().getZ()) {\r\n \r\n ShowCaseStandalone.slog(Level.FINEST, \"Potential hit on checkItem()\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tItem itemE = (Item)e;\r\n\t\t\t\t\tif (ItemStackHandler.itemsEqual(itemE.getItemStack(), getItemStack(), true)) {\r\n ShowCaseStandalone.slog(Level.FINEST, \"Existing stack: \" + itemE.getItemStack().toString());\r\n itemE.getItemStack().setAmount(1); //Removes duped items, which can occur.\r\n\t\t\t\t\t\tthis.item = itemE;\r\n\t\t\t\t\t\tscs.log(Level.FINER, \"Attaching to existing item.\");\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Exception ex) {}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private void checkRecipes() {\n\n for (Recipe recipe : this.recipeItems.values()) {\n List<String> requiredItems = new ArrayList<>(recipe.getRequiredItems());\n\n for (Item item : this.commonItems.values()) {\n requiredItems.remove(item.getName());\n }\n if (requiredItems.isEmpty()) {\n this.combineRecipe(recipe);\n break;\n }\n }\n }", "private void checkExistenceBookItem(HttpServletRequest request, HttpServletResponse response, HttpSession session, RequestDispatcher dispatcher) throws IOException, ServletException {\n\t\t\n\t\tString bookItemCode = (String) session.getAttribute(\"bookCodeFromUserNoRegisterBefore\");\n\t\t//Set name of book to \"\" to check existence\n\t\t\n\t\tthis.bookItem.getValueProperties()[BookItem.BOOK_ITEM_TITLE] = \"\";\n\t\t//Get information about book has Id is bookItemId\n\t\t\n\t\tthis.bookItem.getValueInformations(bookItemCode, BookItem.BOOK_ITEM_CODE);\n\t\t\n\t\tif(!this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_TITLE].equals(\"\")) {\n\t\t\t//Set attributes to display to user\n\t\t\t\n\t\t\tsession.setAttribute(\"codeLendBookNoRegisterLendingBook\", bookItemCode);\n\t\t\tsession.setAttribute(\"requestFromBookItem\", \"checkAvaibleBookItemNoRegisterBefore\");\n\t\t\tsession.setAttribute(\"bookItemIdFromBookItemController\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_ID]);\n\t\t\t//Send redirect to BookTitleController\n\t\t\t\n\t\t\tresponse.sendRedirect(\"BookTitleController\");\n\t\t\t\n\t\t\treturn;\n\t\t} else {\n\t\t\t//Set attributes to display errors to user\n\t\t\t\n\t\t\tsession.setAttribute(\"styleSuccessLendingBookNotRegister\", \"display: none;\");\n\t\t\tsession.setAttribute(\"styleResultNoRegisterLendingBookContent\", \"display: block;\");\n\t\t\tsession.setAttribute(\"styleErrorUserNoRegisterLendingBookContent\", \"display: none;\");\n\t\t\tsession.setAttribute(\"styleNotFoundBookItemIdNoRegisterBeforeLendingBook\", \"display: block;\");\n\t\t\tsession.setAttribute(\"styleErrorNotAvaiableToLendingNoRegister\", \"display: none;\");\n\t\t\tsession.setAttribute(\"styleErrorBookItemNoRegisterLendingBook\", \"display: block;\");\n\t\t\tsession.setAttribute(\"styleInfringeRolesNotRegisterLendingBook\", \"display: none;\");\n\t\t\t//Create dispatcher and forward to main.jsp\n\t\t\t\n\t\t\tdispatcher = getServletContext().getRequestDispatcher(\"/main.jsp\");\n\t\t\tdispatcher.forward(request, response);\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t}", "private void verifyExistIp(String ip){\n List ips = logRepositoy.findByIp(ip);\n if(ips.isEmpty()){\n throw new ResourceNotFoundException(\"Ip address not found\");\n }\n }", "boolean hasItemIndex();", "boolean hasItemIndex();", "boolean hasItemIndex();", "public boolean hasItem() {\n return this.item != null;\n }", "@Test\n public void testSqlExistsMultiValuedNoForeignRestriction() {\n Query<Garage> garagesQuery = not(\n existsIn(cars,\n Garage.BRANDS_SERVICED,\n Car.NAME\n )\n );\n\n Set<Garage> results = asSet(garages.retrieve(garagesQuery));\n\n assertEquals(\"should have 1 result\", 1, results.size());\n assertTrue(\"results should contain garage6\", results.contains(garage6));\n }", "boolean hasRewardResource();", "public void check() {\r\n logger.info(\"ADIT monitor - Checking database and application.\");\r\n\r\n checkApplication();\r\n\r\n checkDBConnection();\r\n checkDBRead(this.getMonitorConfiguration().getTestDocumentId());\r\n }", "@Test\n void createOrderItemWithExistingId() throws Exception {\n orderItem.setId(1L);\n\n int databaseSizeBeforeCreate = orderItemRepository.findAll().collectList().block().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n webTestClient\n .post()\n .uri(ENTITY_API_URL)\n .contentType(MediaType.APPLICATION_JSON)\n .bodyValue(TestUtil.convertObjectToJsonBytes(orderItem))\n .exchange()\n .expectStatus()\n .isBadRequest();\n\n // Validate the OrderItem in the database\n List<OrderItem> orderItemList = orderItemRepository.findAll().collectList().block();\n assertThat(orderItemList).hasSize(databaseSizeBeforeCreate);\n }", "@Test\n\tvoid findAllNoWrite() {\n\t\tinitSpringSecurityContext(\"mlavoine\");\n\t\tfinal TableItem<UserOrgVo> tableItem = resource.findAll(null, null, \"fdoe2\", newUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(1, tableItem.getRecordsTotal());\n\t\tAssertions.assertEquals(1, tableItem.getRecordsFiltered());\n\t\tAssertions.assertEquals(1, tableItem.getData().size());\n\n\t\t// Check the users\n\t\tAssertions.assertEquals(\"fdoe2\", tableItem.getData().get(0).getId());\n\t\tAssertions.assertFalse(tableItem.getData().get(0).isCanWrite());\n\n\t\t// Check the groups\n\t\tAssertions.assertEquals(1, tableItem.getData().get(0).getGroups().size());\n\t\tAssertions.assertEquals(\"Biz Agency\", tableItem.getData().get(0).getGroups().get(0).getName());\n\t\tAssertions.assertFalse(tableItem.getData().get(0).getGroups().get(0).isCanWrite());\n\t}", "public boolean isSetComparesource()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(COMPARESOURCE$2) != 0;\r\n }\r\n }", "boolean hasCompleteStore();", "public boolean haveItem(Items item)\n {\n //boolean haveItem = Inventory.values().contains(item);\n return Inventory.containsValue(item);\n }", "private void validateITResource() {\n // TODO Auto-generated method stub\n \n }", "boolean authorExists(UUID uuid) throws PersistenceException, IllegalArgumentException;", "@Override\n\tpublic void exist() {\n\t\t\n\t}", "public boolean checkIfDatabaseExists() {\r\n return database.exists();\r\n }", "@Test\n public void searchAllPostsByUserAndValidatePostIDs(){\n List <String> postIds = searchForPosts();\n if (postIds == null){\n Assert.assertFalse(postIds == null);\n }\n if(postIds.isEmpty()){\n //This ensures that the test does NOT fail for a user without any post - simply print a message\n System.out.println(\"User has no posts yet!.... PostIds: \" + postIds);\n Assert.assertTrue(postIds.isEmpty());\n }\n }", "@Test\n\tpublic void testDeleteResource()\n\t{\n\t\tLocalDate resDate = null;\n\t\t\n\t\tCategory cat = new Category();\n\t\tcat.setCatId(10);\n\t\tcat.setCatName(\"Clothing\");\n\t\t\n\t\tResource res = new Resource();\n\t\tres.setResId(10);\n\t\tres.setResDate(resDate);\n\t\tres.setCategory(cat);\n\t\tres.setResDescription(\"100% Cotton\");\n\t\tres.setResTitle(\"Shirt\");\n\t\tres.setResPrice(1000);\t\t\n\t\t\n\t\t\n\t\t\n\t\tMockito.when(resourceRepository.existsById(res.getResId())).thenReturn(false);\n\t assertFalse(resourceRepository.existsById(res.getResId()));\n\t}", "public abstract boolean exists() throws VlException;", "@Test\r\n public void testGetUUIDItemTypeFromCache() {\n assertEquals(new Long(1), queries.getUUIDItemTypeId(\"patient\"));\r\n getSimpleJdbcTemplate().update(\"delete from uuid_item_type where xml_name like 'patient'\");\r\n //make sure the entry is not in the database\r\n assertEquals(0, (getSimpleJdbcTemplate().queryForList(\" select * from uuid_item_type where xml_name like 'patient'\")).size());\r\n // Read it from cache\r\n assertEquals(new Long(1), queries.getUUIDItemTypeId(\"patient\"));\r\n }", "public boolean isExist(int conId) throws AppException;", "boolean hasFeedItemSet();", "@Order(2)\n\t@Test\n\tpublic void Attempt_GetItemByIdSuccess()\n\t{\n\t\tint iD = 1;\n\t\tboolean owned = false;\n\t\tItem test_Item = is.getItemByID(iD, owned);\n\t\tassertTrue(test_Item != null);\n\t}", "@Test(expected = BadEntry.class)\r\n\tpublic void testConsultItemWithNullTitle() throws BadEntry{\r\n\t\tsn.consultItems(null);\r\n\t}" ]
[ "0.64944136", "0.6417384", "0.63076454", "0.6195153", "0.60966116", "0.608772", "0.5997309", "0.5997309", "0.5997309", "0.5997309", "0.5997309", "0.5997309", "0.5997309", "0.58828646", "0.5778598", "0.5777361", "0.5775327", "0.57699203", "0.5765151", "0.5746788", "0.57415587", "0.5736463", "0.57318395", "0.57316035", "0.56935567", "0.5691559", "0.5672664", "0.56475985", "0.5628893", "0.5605813", "0.55900365", "0.55770665", "0.5540621", "0.55365765", "0.5523231", "0.55122864", "0.54966843", "0.5493339", "0.5490699", "0.54883873", "0.54817325", "0.5474729", "0.5473807", "0.5455531", "0.5450944", "0.5449193", "0.5441911", "0.5440945", "0.54407847", "0.5439596", "0.5437148", "0.54343575", "0.54335684", "0.54268664", "0.54035157", "0.5400276", "0.5397681", "0.5397219", "0.5389298", "0.5388023", "0.53879166", "0.5369911", "0.5361039", "0.5359633", "0.5358314", "0.53570074", "0.53509295", "0.5349279", "0.5348611", "0.5343792", "0.5343792", "0.53424764", "0.53388655", "0.53313345", "0.5316813", "0.53154385", "0.53137153", "0.53137153", "0.53137153", "0.5312328", "0.5311881", "0.5310502", "0.53076345", "0.5298825", "0.529571", "0.529488", "0.52859014", "0.5283652", "0.528332", "0.52790403", "0.5274117", "0.5270138", "0.526365", "0.52559626", "0.525158", "0.5245687", "0.52456844", "0.5244199", "0.52421826", "0.5239912" ]
0.5816128
14
Verify if server present in db
public Future<Map<String, UUID>> checkResSer(List<String> req, String userId) { Promise<Map<String, UUID>> p = Promise.promise(); if (req.isEmpty()) { p.complete(new HashMap<>()); return p.future(); } Collector<Row, ?, Map<String, UUID>> nameCollector = Collectors.toMap(row -> row.getString(CAT_ID), row -> row.getUUID(ID)); pool.withConnection( conn -> conn.preparedQuery(CHECK_RES_SER) .collecting(nameCollector) .execute( Tuple.of(UUID.fromString(userId)).addArrayOfString(req.toArray(String[]::new))) .onFailure( obj -> { LOGGER.error("checkResSer db fail :: " + obj.getLocalizedMessage()); p.fail(INTERNALERROR); }) .onSuccess( success -> { Map<String, UUID> servers = success.value(); if (servers.isEmpty()) p.fail(SERVER_NOT_PRESENT + req.get(0)); else p.complete(servers); })); return p.future(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasServer();", "boolean hasServerId();", "public boolean hasServer(Identity identity);", "private boolean checkServer(Context mContext) {\n\t\t\t\tConnectivityManager cm = (ConnectivityManager) mContext\n\t\t\t\t\t\t.getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\t\t\tNetworkInfo netInfo = cm.getActiveNetworkInfo();\n\t\t\t\tif (netInfo != null && netInfo.isConnectedOrConnecting()) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}", "boolean hasServerState();", "public DoesBatchExistServer() {\r\n\t\tsuper();\r\n\t}", "boolean hasHost();", "boolean hasHost();", "boolean hasDatabase();", "private boolean isInDatabase (String url) throws SQLException {\r\n\t\ttry {\r\n\t\t\tpstmt = conn.prepareStatement(\"SELECT * FROM RemoteSite WHERE url = ?\");\r\n\t\t\tpstmt.setString(1, url);\r\n\t\t\trset = pstmt.executeQuery();\r\n\t\t\tboolean inDB = rset.next();\r\n\t\t\treturn inDB;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow e;\r\n\t\t} finally {\r\n\t\t\tDatabaseConnection.closeStmt(pstmt, rset);\r\n\t\t}\r\n\t}", "public boolean hasServer() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "boolean dbExists(String dbName);", "public boolean testDatabaseExists()\r\n {\r\n try {\r\n myStmt = myConn.createStatement();\r\n myRs = myStmt.executeQuery(\"show databases like '\" + dbname + \"'\");\r\n if (myRs.next())\r\n return true;\r\n return false;\r\n } catch (SQLException ex) {\r\n Logger.getLogger(SQLConnector.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return false;\r\n }", "public boolean hasServer() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "boolean hasMasterKey();", "public void verifyServerCn(boolean yesno);", "public boolean checkServer() {\n boolean result = false;\n \n int url = 195885416; //Using www.vg.no for now. There might be a problem in the ip-format, but we'll know more after testing.\n if(isNetworkAvailable()) {\n ConnectivityManager cm = (ConnectivityManager)ctx.getSystemService(Context.CONNECTIVITY_SERVICE);\n \n if(cm.requestRouteToHost(ConnectivityManager.TYPE_WIFI, url)) {\n result = true;\n } else if(cm.requestRouteToHost(ConnectivityManager.TYPE_MOBILE, url)) {\n result = true;\n }\n }\n \n return result;\n }", "public boolean findServerByHostName() {\n\t\tboolean success = false;\n\t\tthis.serverName = textUI.getString(\"What is the hostname of the server?\");\n\t\t\n\t\ttry {\n\t\t\tthis.serverAddress = NetworkLayer.getAdressByName(this.serverName); \n\t\t\tsuccess = true;\n\t\t} catch (UnknownHostException e) {\n\t\t\ttextUI.showError(\"Something went wrong while searching for host \" + this.serverName \n\t\t\t\t\t+ \": \" + e.getLocalizedMessage());\n\t\t} \n\t\t\n\t\treturn success;\n\t}", "public boolean databaseExists(String dbName) throws Exception;", "@Override\n public boolean verifyJobDatabase() {\n try (Connection conn = getConnection()) {\n } catch (Exception e) {\n LOG.error(\"Failed to verify connection to the Job Database. \", e);\n return false;\n }\n return true;\n }", "private void checkDB() {\n\t\tif (couchDB_ip == null) {\n\t\t\tsetCouchDB_ip();\n\t\t}\n\n\t\tif (!databaseExist) {\n\n\t\t\tsynchronized (databaseExist) {\n\n\t\t\t\tif (!databaseExist) {\n\n\t\t\t\t\tif (couchDB_USERNAME != null\n\t\t\t\t\t\t\t&& !couchDB_USERNAME.trim().isEmpty()\n\t\t\t\t\t\t\t&& couchDB_PASSWORD != null\n\t\t\t\t\t\t\t&& !couchDB_PASSWORD.trim().isEmpty()) {\n\t\t\t\t\t\tUsernamePasswordCredentials creds = new UsernamePasswordCredentials(\n\t\t\t\t\t\t\t\tcouchDB_USERNAME, couchDB_PASSWORD);\n\t\t\t\t\t\tauthentication = BasicScheme.authenticate(creds,\n\t\t\t\t\t\t\t\t\"US-ASCII\", false).toString();\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (CouchDBUtil.checkDB(getCouchDB_ip(), couchDB_NAME,\n\t\t\t\t\t\t\t\tauthentication)) {\n\n\t\t\t\t\t\t\tdatabaseExist = true;\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tCouchDBUtil.createDb(getCouchDB_ip(), couchDB_NAME,\n\t\t\t\t\t\t\t\t\tauthentication);\n\t\t\t\t\t\t\tdatabaseExist = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\t\tlogger.info(\"Impossible to access CouchDB\", e);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "boolean hasLoopbackDbfs();", "private static void checkDatabaseConnectivity() throws IOException {\r\n\r\n Properties serverProperties = new Properties();\r\n FileInputStream input = new FileInputStream(SERVER_PROPERTIES_PATH);\r\n serverProperties.load(input);\r\n int port = Integer.valueOf(serverProperties.getProperty(\"server.port\"));\r\n\r\n if (!MongoDB.isConnected()) {\r\n System.err.println(\"No MongoDB running on localhost:\" + port);\r\n System.err.println(\"Application is shut down.\");\r\n System.exit(-1);\r\n }\r\n\r\n }", "public boolean isRunning(){\r\n try{\r\n List<String> dbNames = mongo.getDatabaseNames();\r\n if(!dbNames.isEmpty()){\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n } catch (MongoException e){\r\n// e.printStackTrace();\r\n return false;\r\n }\r\n }", "private boolean mAsServer(String sRemoteDeviceName) {\n if (oBTServer==null ) return false;\n String s = oBTServer.sClientName;\n return sRemoteDeviceName.equals(s);\n }", "boolean hasServerHello();", "public static boolean testConn() {\r\n\t\tboolean bool = false;\r\n\t\ttry (Connection conn = DataSource.getConnection()) {\r\n\t\t\tbool = conn.isValid(0);\r\n\t\t\tif (bool == true){\r\n\t\t\t\tdbStatus = \"ONLINE\";\r\n\t\t\t}\r\n\t\t\telse dbStatus = \"OFFLINE\";\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\treturn bool;\r\n\t}", "boolean hasRemoteHost();", "public boolean hasServerId() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean isVerifyHost(Env env) {\n return client.isVerifyHost();\n }", "private boolean isConnected() {\n\t\treturn (this.serverConnection!=null); \n }", "public boolean hasServerId() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "boolean hasSock();", "public boolean checkIfDatabaseExists() {\r\n return database.exists();\r\n }", "private boolean serverBelongsToSite(IPSGuid siteGuid, IPSPubServer pubServer) throws Exception\n {\n List<PSPubServer> servers = pubServerDao.findPubServersBySite(siteGuid);\n for (PSPubServer server : servers)\n {\n if(server.getServerId() == pubServer.getServerId()) {\n return true;\n }\n }\n return false;\n }", "private static boolean isServerReachable() {\n\t\treturn new PingRpcExample().pingServer();\n\t}", "public boolean isPentahoServer( final BiServerConnection connection ) {\n if ( !isBiServerUrlProvided( connection ) ) {\n return false;\n }\n\n ClientResponse response = httpGet( connection, PENTAHO_WEBCONTEXT_PATH, false );\n if ( response != null ) {\n String content = response.getEntity( String.class );\n return ( content != null ) && ( content.contains( PENTAHO_WEBCONTEXT_MATCH ) );\n }\n\n return false;\n }", "public boolean isServer() {\n return getVM().invoke(\"isServer\",\n () -> ClusterStartupRule.memberStarter instanceof ServerStarterRule);\n }", "public boolean isServer() {\n\t\treturn true;\n\t}", "boolean hasDatabaseSpec();", "public static boolean isServer() {\n return FMLCommonHandler.instance().getEffectiveSide().isServer();\n }", "private void verifyAuthWithServer() {\n mRegisterModel.connect(binding.personFirstName.getText().toString(),\n binding.personLastName.getText().toString(),\n binding.registerEmail.getText().toString(),\n binding.registerPassword.getText().toString());\n //this is an Asynchronous call no statements after should rely on the result of connect\n }", "public boolean availableServer(){\n for(int i = 0; i < cntServer; i++){\n if(serverArray[i].busy == false){return true;}\n }\n return false;\n }", "public String getDatabaseConnectionPoolShouldValidate(){\n \t\treturn getProperty(\"org.sagebionetworks.pool.connection.validate\");\n \t}", "private boolean canStartServer() {\n\n\t\tfinal ConnectivityManager connMgr = (ConnectivityManager) this\n\t\t\t\t.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n\t\tfinal android.net.NetworkInfo wifi =\n\n\t\tconnMgr.getNetworkInfo(ConnectivityManager.TYPE_WIFI);\n\n\t\tfinal android.net.NetworkInfo mobile = connMgr\n\t\t\t\t.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);\n\n\t\treturn wifi.isAvailable() || mobile.isAvailable();\n\t}", "private boolean updateServerTableStatus(Context ctx) {\n if(ctx == null)\n return false;\n\n //Check if network connection is available\n ConnectivityManager connMgr = (ConnectivityManager) ctx.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n if (networkInfo != null && networkInfo.isConnected()) {\n UpdateTableStatusTask updateTask = new UpdateTableStatusTask(ctx);\n updateTask.execute(this);\n }\n\n return true;\n\n }", "boolean verifyJobDatabase();", "public boolean checkConnection() {\n\treturn getBoolean(ATTR_CONNECTION, false);\n }", "public final boolean isServer() {\n\t\treturn !world.isRemote;\n\t}", "public boolean hasServerState() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }", "private boolean checkBackend() {\n \ttry{\n \t\tif(sendRequest(generateURL(0,\"1\")) == null ||\n \tsendRequest(generateURL(1,\"1\")) == null)\n \t\treturn true;\n \t} catch (Exception ex) {\n \t\tSystem.out.println(\"Exception is \" + ex);\n\t\t\treturn true;\n \t}\n\n \treturn false;\n \t}", "@Transient\n public boolean isCorrupted(){\n return serverNode == null;\n }", "public void CheckConnection() {\n\t\tconn = SqlConnection.DbConnector();\n\t\tif (conn == null) {\n\t\t\tSystem.out.println(\"Connection Not Successful\");\n\t\t\tSystem.exit(1);\n\t\t} else {\n\t\t\tSystem.out.println(\"Connection Successful\");\n\t\t}\n\t}", "public boolean hasServerState() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkNTPServer() {\n\t\tboolean flag = oTest.checkNTPServer();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "public void checkContainer() {\n // http://stackoverflow.com/questions/2976884/detect-if-running-in-servlet-container-or-standalone\n try {\n new InitialContext().lookup(\"java:comp/env\");\n log.info(\"Running inside servlet container. Explicit server creation skipped\");\n return;\n } catch (NamingException ex) {\n // Outside of container\n }\n\n }", "@Override\n\tprotected boolean isRegisterServerConnect()\n\t{\n\t\treturn false;\n\t}", "private boolean isConnected() {\n try {\n return (conn != null) && conn.isValid(0);\n } catch (SQLException ex) {\n Logger.getLogger(DB.class.getName()).log(Level.SEVERE, null, ex);\n }\n return false;\n }", "public boolean databaseExists() {\n return defaultDatabaseExists();\n }", "public boolean isSetDb()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(DB$2) != 0;\r\n }\r\n }", "public long insertIntoServers(ServerBean serverBean){\n\t\t\n\t\tif(!isTableExist(LicLiteData.TABLE_SERVERS)){\n\t\t\tcreateTableServers();\n\t\t\tSystem.out.println(\"create table serves...\");\n\t\t}\n\t\t\n\t\tContentValues values = new ContentValues();\n\t\t\n\t\tvalues.put(LicLiteData.SERVER_NAME, serverBean.getServerName());\n\t\tvalues.put(LicLiteData.SERVER_CMD, serverBean.getServerCmd());\n\t\tvalues.put(LicLiteData.SERVER_PORT, serverBean.getServerPort());\n\t\tvalues.put(LicLiteData.SERVER_LOC, serverBean.getServerLoc());\n\t\tvalues.put(LicLiteData.SERVER_TIME_ZONE, serverBean.getServerTimeZone());\n\t\tvalues.put(LicLiteData.SERVER_TIME_OUT, serverBean.getTimeOut());\n\t\tvalues.put(LicLiteData.SERVER_RETRY_TIMES, serverBean.getRetryTimes());\n\t\tvalues.put(LicLiteData.TIME_STAMP, serverBean.getTimeStamp());\n\t\t\n\t\tlong isInserted = dbWritable.insert(LicLiteData.TABLE_SERVERS, null, values);\n\t\treturn isInserted;\n\t}", "public boolean databaseExists() {\n\t\treturn defaultDatabaseExists();\n\t}", "boolean shouldPrecreateServerService(EffectiveServerSpec server) {\n if (Boolean.TRUE.equals(server.isPrecreateServerService())) {\n // skip pre-create if admin server and managed server are both shutting down\n return ! (domain.getAdminServerSpec().isShuttingDown() && server.isShuttingDown());\n }\n return false;\n }", "boolean runsServer();", "private boolean exists() {\n try {\n DatabaseMetaData md = conn.getMetaData();\n ResultSet rs = md.getTables(null, null, \"settings\", null);\n return rs.next();\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n return false;\n }\n }", "boolean hasSysID();", "public static void checkDBAvailable(Configuration conf)\n throws MasterNotRunningException {\n Configuration copyOfConf = ConfigurationFactory.create(conf);\n copyOfConf.setInt(\"bigdb.client.retries.number\", 1);\n new DBAdmin(copyOfConf);\n }", "public static boolean isServerRunning() {\n\t\treturn serverSettings.getBoolean(isServerRunning, false);\n\n\t}", "public boolean isPublicServer() {\n return publicServer;\n }", "public static boolean containsDatabase(String dbName){\n return DATABASES.containsKey(dbName);\n }", "boolean hasSsn();", "public boolean isRunning ()\n {\n return server == null ? false : true;\n }", "public static boolean isConfigured(String database) {\n return instance.dataSources.containsKey(database);\n }", "public static boolean hasConnection() {\n \t\treturn connPool.getConnectionCount() > 0;\n \t}", "public static void getStatus() {\n\t\ttry {\n\t\t\tint i = 1;\n\t\t\tList<Object[]>serverDetails = ServerStatus.getServerDetails();\n\t\t\tfor (Object[] servers:serverDetails){\n\t\t\t\tServerStatus.verifyServerStatus(i,(String)servers[0], (String)servers[1], (String)servers[2]);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch (Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "private boolean inDatabase() {\r\n \t\treturn inDatabase(0, null);\r\n \t}", "boolean hasAvailableConnection();", "private boolean checkTableExists(String plate){\n //there is no need to close or start connection\n //function is only used in the context of an already created connection\n \n try {\n rs = stmt.executeQuery(\"SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'PUBLIC'\");\n \n while(rs.next()){\n if(plate.equalsIgnoreCase(rs.getString(\"TABLE_NAME\"))){\n return true;\n }\n }\n \n rs.close();\n \n } catch (SQLException ex) {\n Logger.getLogger(DBHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return false;\n }", "boolean hasResMineInstanceID();", "private void checkDataBase() {\n final Config dbConfig = config.getConfig(\"db\");\n\n checkArgument(!isNullOrEmpty(dbConfig.getString(\"driver\")), \"db.driver is not set!\");\n checkArgument(!isNullOrEmpty(dbConfig.getString(\"url\")), \"db.url is not set!\");\n\n dbConfig.getString(\"user\");\n dbConfig.getString(\"password\");\n dbConfig.getObject(\"additional\");\n }", "public boolean dnsSrvEnabled();", "public boolean isSetTServerInfo() {\n return this.tServerInfo != null;\n }", "@Override\n\tpublic boolean checkdbconfig() {\n\t\t// get path\n\t\tString path = context.getRealPath(\"/\");\n\t\tString dbpath = path + Utility.DB_PATH;\n\t\tString dbconfig = \"\";\n\t\tFileInputStream fileInputStreamSystemSettings = null;\n\t\tProperties prop = new Properties();\n\t\ttry {\n\t\t\tfileInputStreamSystemSettings = new FileInputStream(dbpath);\n\t\t\ttry {\n\t\t\t\tprop.load(fileInputStreamSystemSettings);\n\t\t\t\tdbconfig = prop.getProperty(\"jdbc.dbconfig\");\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tfileInputStreamSystemSettings.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tif (dbconfig.equalsIgnoreCase(\"Y\")) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean setServer(String server)\n\t{\n\t\tboolean validServer = false;\n\t\tif(server.length() > 0)\n\t\t{\n\t\t\tSocket toServer;\n\t\t\ttry {\n\t\t\t\tthis.server = server;\n\t\t\t\tSystem.out.println(\"Connecting to: \" + server);\n\t\t\t\ttoServer = new Socket(server,directorySocket);\n\t\t\t\tObjectOutputStream outToServer = new ObjectOutputStream(toServer.getOutputStream());\n\t\t\t\tServerMessage m = new ServerMessage();\n\t\t\t\tm.setCommand(TEST);\n\t\t\t\t\n\t\t\t\toutToServer.writeObject(m);\n\t\t\t\t\n\t\t\t\tObjectInputStream serverInput = new ObjectInputStream(toServer.getInputStream());\n\t\t\t\tString reply = (String) serverInput.readObject();\n\t\t\t\tif(reply.equals(\"ACTIVE\"))\n\t\t\t\t{\n\t\t\t\t\tvalidServer = true;\n\t\t\t\t\tSystem.out.println(\"Server replied; valid server\");\n\t\t\t\t}\n\t\t\t\ttoServer.close();\n\t\t\t} catch (UnknownHostException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\te.printStackTrace(); \n\t\t\t}\n\t\t}\n\t\treturn validServer;\n\t}", "boolean hasConnProps();", "boolean hasMachineId();", "public boolean getPersistentServerIdInitialized() {\n/* 276 */ return this.persistentServerIdInitialized;\n/* */ }", "private boolean isIgnored(ServerDetail serverDetail){\n for (ServerDetail toCheck: ignoredServerDetails){\n if ((toCheck.getName().equals(serverDetail.getName())) &&\n (toCheck.getCore().equals(serverDetail.getCore())) &&\n (toCheck.getPool().equals(serverDetail.getPool())) &&\n (toCheck.getPort().equals(serverDetail.getPort()))){\n return true;\n }\n }\n return false;\n }", "@Override\n public boolean isAlreadyInDb () {\n try {\n load( idDevice );\n } catch ( EntityNotFoundException e ) {\n return false;\n }\n return true;\n }", "public abstract boolean isDatabaseSet();", "private void verifyAuthWithServer() {\n mResetModel.connect(\n myBinding.editResetEmail.getText().toString());\n //This is an Asynchronous call. No statements after should rely on the\n //result of connect().\n }", "protected boolean masterFailoverWithDNS() throws Throwable {\n return (pingFromMaster(hostname) &&\n masterFailover() &&\n pingFromMaster(hostname));\n }", "public boolean isViableSeed(Entity member) {\n boolean managed = Entities.isManaged(member);\n String hostname = member.getAttribute(Attributes.HOSTNAME);\n boolean serviceUp = Boolean.TRUE.equals(member.getAttribute(Attributes.SERVICE_UP));\n Lifecycle serviceState = member.getAttribute(Attributes.SERVICE_STATE);\n boolean hasFailed = !managed || (serviceState == Lifecycle.ON_FIRE) || (serviceState == Lifecycle.RUNNING && !serviceUp) || (serviceState == Lifecycle.STOPPED);\n boolean result = (hostname != null && !hasFailed);\n if (log.isTraceEnabled()) log.trace(\"Node {} in Cluster {}: viableSeed={}; hostname={}; serviceUp={}; serviceState={}; hasFailed={}\", new Object[] {member, this, result, hostname, serviceUp, serviceState, hasFailed});\n return result;\n }", "public boolean isSetHost() {\r\n return this.host != null;\r\n }", "public boolean isSetHost() {\r\n return this.host != null;\r\n }", "public boolean isSetHost() {\r\n return this.host != null;\r\n }", "public boolean isSetHost() {\r\n return this.host != null;\r\n }", "public boolean isSetHost() {\r\n return this.host != null;\r\n }", "public static boolean DBExists() {\n File edb = new File(path + \"/turtlenet.db.aes\");\n File db = new File(path + \"/turtlenet.db\");\n return db.exists() || edb.exists();\n }", "private static boolean isNotConnected(ProxiedPlayer player, ServerInfo server) {\n for (ProxiedPlayer serverPlayer : server.getPlayers()) {\n if (player.getUniqueId().equals(serverPlayer.getUniqueId())) {\n return false;\n }\n }\n\n return true;\n }", "public boolean isSetDatabase() {\r\n return this.database != null;\r\n }" ]
[ "0.7505142", "0.7073974", "0.70469725", "0.68158144", "0.6697003", "0.6352134", "0.63238007", "0.63238007", "0.6230169", "0.62173325", "0.61491495", "0.614818", "0.61319596", "0.6109171", "0.61074334", "0.61071384", "0.6106", "0.6094537", "0.6091442", "0.6080411", "0.6019", "0.6014802", "0.60073036", "0.6000258", "0.59795046", "0.5927365", "0.58761466", "0.5875762", "0.5875423", "0.5874725", "0.5860701", "0.5848993", "0.5822524", "0.5795924", "0.5786349", "0.57838494", "0.5781716", "0.5762887", "0.5752997", "0.5738289", "0.5734525", "0.572468", "0.5723981", "0.57198423", "0.5708698", "0.56701756", "0.5669574", "0.56597674", "0.5653239", "0.564753", "0.5645268", "0.56337893", "0.5632151", "0.56246495", "0.56086004", "0.5600415", "0.5597592", "0.55948776", "0.5592047", "0.55909824", "0.5587886", "0.5586232", "0.5585584", "0.55513316", "0.55437696", "0.55416554", "0.5538475", "0.5535711", "0.5512871", "0.55069774", "0.5497916", "0.54932666", "0.548632", "0.5468995", "0.54683954", "0.5465552", "0.54528004", "0.54489595", "0.54370904", "0.54335546", "0.54318774", "0.5430193", "0.542761", "0.54274076", "0.54231167", "0.54223585", "0.54188854", "0.54138637", "0.54078233", "0.5398673", "0.5395474", "0.53935456", "0.5376438", "0.53740823", "0.53740823", "0.53740823", "0.53740823", "0.53740823", "0.5364975", "0.53643125", "0.5362558" ]
0.0
-1
get itemid for list of cat_ids
public Future<Map<String, UUID>> getResDetails(List<String> resourceList) { Promise<Map<String, UUID>> p = Promise.promise(); Collector<Row, ?, Map<String, UUID>> catIdCollector = Collectors.toMap(row -> row.getString(CAT_ID), row -> row.getUUID(ID)); try { if (resourceList.isEmpty()) { p.complete(new HashMap<>()); return p.future(); } else { pool.withConnection( conn -> conn.preparedQuery(GET_RES_DETAILS) .collecting(catIdCollector) .execute(Tuple.of(resourceList.toArray(String[]::new))) .onFailure( obj -> { LOGGER.error("checkResource db fail :: " + obj.getLocalizedMessage()); p.fail(INTERNALERROR); }) .onSuccess( success -> { p.complete(success.value()); })); } } catch (Exception e) { LOGGER.error("Fail getResDetails: "); p.fail(INTERNALERROR); } return p.future(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long getID(Object item);", "int getCategoryID(Vector<Integer> categoryIDs, Vector<String> categoryCodes,String cellValue);", "public ArrayList<String> getCourseIdsByCat(String category) {\n ArrayList<String> courseIdsByCat = new ArrayList<>(); \r\n for(int i=0; i < courses.size(); i++) {\r\n if (courses.get(i).getCategory().equals(category)) \r\n courseIdsByCat.add(courses.get(i).getId());\r\n }\r\n \r\n return courseIdsByCat; \r\n }", "static ItemsIconId retrieveItemsIconId(ComprehensionTlv ctlv) throws ResultException {\n CatLog.d(\"ValueParser\", \"retrieveItemsIconId:\");\n ItemsIconId id = new ItemsIconId();\n byte[] rawValue = ctlv.getRawValue();\n int valueIndex = ctlv.getValueIndex();\n boolean z = true;\n int numOfItems = ctlv.getLength() - 1;\n id.recordNumbers = new int[numOfItems];\n int valueIndex2 = valueIndex + 1;\n try {\n if ((rawValue[valueIndex] & 255) != 0) {\n z = false;\n }\n id.selfExplanatory = z;\n int index = 0;\n while (index < numOfItems) {\n int index2 = index + 1;\n int valueIndex3 = valueIndex2 + 1;\n try {\n id.recordNumbers[index] = rawValue[valueIndex2];\n index = index2;\n valueIndex2 = valueIndex3;\n } catch (IndexOutOfBoundsException e) {\n throw new ResultException(ResultCode.CMD_DATA_NOT_UNDERSTOOD);\n }\n }\n return id;\n } catch (IndexOutOfBoundsException e2) {\n throw new ResultException(ResultCode.CMD_DATA_NOT_UNDERSTOOD);\n }\n }", "public static ItemsIconId retrieveItemsIconId(ComprehensionTlv ctlv) throws ResultException {\r\n CatLog.d(\"ValueParser\", \"retrieveItemsIconId:\");\r\n ItemsIconId id = new ItemsIconId();\r\n byte[] rawValue = ctlv.getRawValue();\r\n int valueIndex = ctlv.getValueIndex();\r\n int numOfItems = ctlv.getLength() - 1;\r\n id.recordNumbers = new int[numOfItems];\r\n int valueIndex2 = valueIndex + 1;\r\n try {\r\n id.selfExplanatory = (rawValue[valueIndex] & 255) == 0;\r\n int index = 0;\r\n while (index < numOfItems) {\r\n int index2 = index + 1;\r\n int valueIndex3 = valueIndex2 + 1;\r\n try {\r\n id.recordNumbers[index] = rawValue[valueIndex2];\r\n index = index2;\r\n valueIndex2 = valueIndex3;\r\n } catch (IndexOutOfBoundsException e) {\r\n throw new ResultException(ResultCode.CMD_DATA_NOT_UNDERSTOOD);\r\n }\r\n }\r\n return id;\r\n } catch (IndexOutOfBoundsException e2) {\r\n }\r\n }", "int getItemID();", "public int getId(String name)\n {\n List<Category> list = c.list();\n for(int i = 0; i < list.size(); ++i)\n {\n if(list.get(i).getName().equals(name))\n {\n return list.get(i).getId();\n }\n }\n return 0;\n }", "private int getItemID(String item) {\n\t\titem = item.replace(\" \", \"%20\");\n\t\t//log(\"Item: \" + item);\n \ttry {\n \tString webPage = \"http://\" + serverIP + \"/getid.php?i=\" + item;\n \t//log(\"Webpage: '\" +webPage+\"'\");\n \tURL url = new URL(webPage);\n \tURLConnection urlConnection = url.openConnection();\n \tInputStream is = urlConnection.getInputStream();\n \tInputStreamReader isr = new InputStreamReader(is);\n\n \tint numCharsRead;\n \tchar[] charArray = new char[1024];\n \tStringBuffer sb = new StringBuffer();\n \twhile ((numCharsRead = isr.read(charArray)) > 0) {\n \tsb.append(charArray, 0, numCharsRead);\n \t}\n \tString result = sb.toString();\n \t//log(\"ItemID: \" + result);\n \t//window.status.setText(\"Ready\");\n\n \treturn Integer.parseInt(result);\n \t} catch (Exception e) {\n \tlog(\"Exception occurred at getID.\" + e);\n \t}\n\n \treturn 0;\n \t}", "private int getIndexIfItemObjAlreadyExists(String itemId, List<Item> itemList) {\n for (int i = 0; i < itemList.size(); i++) {\n Item item = itemList.get(i);\n String id = item.getItemId();\n if (!TextUtils.isEmpty(id) && id.equalsIgnoreCase(itemId))\n return i;\n }\n return -1;\n }", "@Override\n public long getItemId(int itemId) {\n return itemId;\n }", "public Object getId(String key) {\n return ids.get(key);\n }", "private synchronized int generateItemID(){\r\n\t\tint i;\r\n\t\tfor(i = 1; items.containsKey(i) || finishedItems.containsKey(i);i++);\r\n\t\treturn i;\r\n\t}", "public void setCatId(int value) {\n this.catId = value;\n }", "public abstract long getItemId(int position);", "@java.lang.Override\n public long getItemId() {\n return itemId_;\n }", "public String[] getItemIDs() {\n String[] IDs = new String[this.size()];\n for (int i = 0; i < IDs.length; i++) {\n IDs[i] = this.get(i).getItemId();\n }\n return IDs;\n }", "abstract int getItemID(int level);", "public int getItemId()\r\n {\r\n return _itemId;\r\n }", "public long getItemShopBasketId();", "private List<Integer> determineItemIds() {\n List<Integer> ids = null;\n try {\n ids = mDatabaseAccess.itemsDAO().selectAllItemIds();\n } catch (Exception ex) {\n Log.e(TAG, \"A general failure has occurred while trying to determine all item IDs.\",\n ex);\n }\n return ids;\n }", "ItemCategory selectByPrimaryKey(Integer id);", "int getListSnId(int index);", "@java.lang.Override\n public long getItemId() {\n return itemId_;\n }", "public static int getID(ArrayList<ContactImpl> list) {\n\n\t\tint randomInt;\n\t\tRandom randomGenerator = new Random();\n\n\t\tif (list == null) {\n\t\t\trandomInt = randomGenerator.nextInt();\n\t\t} \n\t\telse\n\t\t{\n\t\t\tSet<Integer> setOfIds = new HashSet<Integer>();\n\t\t\tSet<Integer> setOfNum = new HashSet<Integer>();\n\t\t\t\n\t\t\tfor (ContactImpl contact : list) \n\t\t\t{\n\t\t\t\tsetOfIds.add(contact.getId());\n\t\t\t\tsetOfNum.add(contact.getId());\t\n\t\t\t}\n\t\t\t\n\t\t\tdo {\n\t\t\t\trandomInt = randomGenerator.nextInt();\n\t\t\t\tsetOfNum.add(randomInt);\n\t\t\t} while (setOfNum.size() == setOfIds.size());\n\t\t}\n\n\t\treturn randomInt;\n\n\t}", "@Override\n public long getItemId(int i) {\n return (getItem(i)).getId();\n }", "public int getItemId() {\n return itemId;\n }", "public abstract ArrayList<Integer> getIdList();", "@Override\n\tpublic Collection<Object> getItemIds() {\n\t\tHashSet<Object> filteredItemIds = new HashSet<Object>(super.getItemIds()),\n\t\t\t\titemIds = new HashSet<Object>(filteredItemIds);\n\t\tFilter filter = getAppliedFiltersAsConjunction();\n\t\tItem item = null;\n\t\tfor (Object itemId : itemIds) {\n\t\t\tif (itemId instanceof UUID) {\n\t\t\t\titem = getItem(itemId);\n\t\t\t\tif (item != null) {\n\t\t\t\t\tif (!filter.passesFilter(itemId, item)) {\n\t\t\t\t\t\tfilteredItemIds.remove(itemId);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfilteredItemIds.remove(itemId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn filteredItemIds;\n\t}", "CatalogItem getItembyId(final Long id);", "public Integer getItemid() {\n return itemid;\n }", "public Integer getItemid() {\n return itemid;\n }", "public Integer getId() {\n\t\treturn wishlistItemId;\n\t}", "public Integer getCatId() {\n return catId;\n }", "int getItemId() {\n return m_itemId;\n }", "public List<String> getPlanItemIds();", "long getIds(int index);", "public void setCatId(long value) {\n this.catId = value;\n }", "public long getItemId(int arg0) {\n\t\treturn arg0;\r\n\t}", "public Long getItemId() {\r\n return itemId;\r\n }", "@Override\r\n public int getItemId() {\n return this.itemId;\r\n }", "@Override\n\tprotected Set<Integer> getItemIds() {\n\t\t\n\t\tBnetDistributedKB bdKb = (BnetDistributedKB)kb;\n\t\t\n\t\treturn bdKb.itemIds;\n\t}", "@Override\n\tprotected Set<Integer> getItemIds() {\n\t\t\n\t\tBnetDistributedKB bdKb = (BnetDistributedKB)kb;\n\t\t\n\t\treturn bdKb.itemIds;\n\t}", "public String getItemId() {\r\n return itemId;\r\n }", "public List<ItemCategory> getByCat(int id) {\n return repository.findByCategoryId(id);\n }", "protected abstract int getItemLayoutId();", "public int getCatId() {\n return catId;\n }", "public Vector getItemIds()\n {\n return mItemIds;\n }", "public String getId(String s){\n for (int i = 0; i<length; i++){\n if(wallList.get(i).getName().equalsIgnoreCase(s))\n id = wallList.get(i).getId();\n }\n return id;\n }", "IdListRule createIdListRule();", "public String getItemId() {\n return itemId;\n }", "public void setItemIdList(List<String> itemIdList) {\r\n this.itemIdList = itemIdList;\r\n }", "ProductCategory find(int id)throws IllegalArgumentException;", "public int[] getItemIDs() {\n\t\treturn itemIDs;\n\t}", "public ArrayList<String> get_non_deleted_product_id(String selected_ln, String agentID, int list_incr){\n\n // set url to query for Lists table in local DB\n String URL = \"content://app.admin.pressfit.provider/List_Items\";\n // parse url\n Uri LI_uri = Uri.parse(URL);\n ArrayList<String> non_deleted_prod_id = new ArrayList<String>();\n\n /* firing query to get product ids from local db */\n Cursor li_cursor = getContentResolver().query(LI_uri, new String[]{GlobalProvider.LI_Product_ID},\n GlobalProvider.LI_List_Name + \" =? AND \" + GlobalProvider.LI_Login_User_Id + \" =? AND \" +\n GlobalProvider.LI_Increment + \" =? AND \" + GlobalProvider.LI_deleted + \" =? \",\n new String[]{selected_ln,agentID,String.valueOf(list_incr),\"0\"}, null);\n\n /* checking null factor */\n if(null != li_cursor && li_cursor.moveToFirst()) {\n do {\n String prod_id = li_cursor.getString(li_cursor.getColumnIndex(GlobalProvider.LI_Product_ID));\n non_deleted_prod_id.add(prod_id);\n } while (li_cursor.moveToNext());\n }\n return non_deleted_prod_id;\n }", "@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1,\n int index, long arg3) {\n if (index != 0) {\n categoryId = arrCategory.get(index).getId() + \"\";\n } else {\n categoryId = \"\";\n }\n }", "public String getItemIdentifier();", "int getOtherIds(int index);", "public long getSuburItemId();", "public int getItemID()\n {\n return itemID;\n }", "public int getItemId() {\n\t\treturn id;\n\t}", "public List<Integer> getIds(int conId, int type, int state) throws AppException;", "public Object getKey(Movie item) {\n\t return (item == null) ? null : item.getId();\r\n\t }", "public String getItemId(){\r\n\t\treturn \"\";\r\n\t}", "public int getSlotForId(int itemId) {\n\t\tif (summonedFamiliar.familiarType == FamiliarType.BOB) {\n\t\t\tfor (int i = 0; i < burdenedItems.length; i++) {\n\t\t\t\tif ((burdenedItems[i] + 1) == itemId)\n\t\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "void setItemId(String itemId);", "private static <T extends AbstractApiIdentifiableDTO> List<Long> generateIdList(List<T> idList) {\n List<Long> results = new ArrayList<>(idList.size());\n\n for (T idSingle : idList) {\n results.add(idSingle.getId());\n }\n\n return results;\n }", "int getStoreID(Vector<Integer> storeIDs, Vector<String> storeCodes, String cellValue);", "@Override\n public long getItemId(int arg0) {\n return arg0;\n }", "@Override\n public long getItemId(int arg0) {\n return arg0;\n }", "@Override\n public long getItemId(int arg0) {\n return arg0;\n }", "public long getCatId() {\n return catId;\n }", "protected List<?> keysToIds (List<Key<T>> keys){\n \tArrayList ids = new ArrayList(keys.size()*2);\n \tfor(Key<T> key : keys)\n \t\tids.add(key.getId());\n \treturn ids;\n }", "public int getR_Category_ID();", "private Item findItemById(String curId, Inventory invent){\n\t\tif (invent == null) return null;\n\t\tfor (Item item : invent){\n\t\t\tif (item.getId().equals(curId)){\n\t\t\t\treturn item;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\t\tpublic long getItemId(int arg0) {\n\t\t\treturn arg0;\n\t\t}", "@Override\n\t\tpublic long getItemId(int arg0) {\n\t\t\treturn arg0;\n\t\t}", "@Override\n\t\tpublic long getItemId(int arg0) {\n\t\t\treturn arg0;\n\t\t}", "@Override\n\t\tpublic long getItemId(int arg0) {\n\t\t\treturn arg0;\n\t\t}", "@Override\n\t\tpublic long getItemId(int arg0) {\n\t\t\treturn arg0;\n\t\t}", "@Override\n\t\tpublic long getItemId(int arg0) {\n\t\t\treturn arg0;\n\t\t}", "@Override\n public long getItemId(int position) {\n return listInfoList.get(position).id;\n }", "public static <T extends Entidad> List<Long> buildIdList(Collection<T> entityList) {\r\n\t\tList<Long> ids = new ArrayList<Long>();\r\n\t\tif (!ObjectUtils.isEmpty(entityList)) {\r\n\t\t\tfor (T entity: entityList) {\r\n\t\t\t\tids.add(entity.getId());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ids;\r\n\t}", "@Override\n\tpublic Item getItemByID(String itemId) {\n\n\t\treturn actionOnItem(itemId).get(0);\n\t}", "@Override\n\tpublic Item getItemByID(String itemId) {\n\n\t\treturn actionOnItem(itemId).get(0);\n\t}", "@Override\n public long getItemId(int position) {\n return getItem(position).id;\n }", "public String getCatId() {\r\n\t\treturn catId;\r\n\t}", "@Override\r\n\t\tpublic long getItemId(int arg0) {\n\t\t\treturn arg0;\r\n\t\t}", "public Integer getMenuItemTag(MenuItem item) {\n return folderIds.get(item);\n }", "@Override\n public long getItemId(int arg0) {\n return arg0;\n }", "int getIDS(String ids) throws IOException {\n String lines=\"\";\n String aux;\n int i = 0, j = 0, k = 0;\n\n BufferedReader br = new BufferedReader(new FileReader(ids)); /* Read all file adding to string */\n try {\n StringBuilder sb = new StringBuilder();\n String line = br.readLine();\n while (line != null) {\n sb.append(line);\n sb.append(System.lineSeparator());\n line = br.readLine();\n }\n lines = sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n br.close();\n }\n\n /* Add each each id to array and get the number of ids */\n i = lines.indexOf(\"id#:[\");\n k = lines.indexOf(\"]\");\n while (i >= 0) {\n /* AllPos[j] = Integer.parseInt(lines.substring(i+5,k));*/\n attrib_int(j, Integer.parseInt(lines.substring(i+5,k)));\n lines = lines.substring(k+1);\n i = lines.indexOf(\"id#:[\");\n if (i>=0)\n {\n aux = lines.substring(i);\n k = aux.indexOf(\"]\") + i;\n }\n j++;\n\n }\n ids_quantity=j;\n return (0);\n }", "public void setCatId(Integer catId) {\n this.catId = catId;\n }", "@Override\n public long getItemId(int position) {\n return contacts.get(position).getContactid();\n }", "private ArrayList<String> obtenerIds(ArrayList<String> values){\n\t\tArrayList<String> ids = new ArrayList<>();\n\t\tfor(String valor : values){\n\t\t\tids.add(postresId.get(valor));\n\t\t}\n\t\treturn ids;\n\t}", "@Override\n public long getItemId(int arg0) {\n return arg0;\n }", "public static int getIdentifier(){\n\t\tif(index > ids.size() - 1){\n\t\t\tindex = 0;\n\t\t}\n\t\t// Post increment is used here, returns index then increments index\n\t\treturn ids.get(index++);\n\t}", "public static ArrayList<Long> searchKeywordEntryId(ArrayList<String> queryKeywords) {\n ArrayList<Long> keywordIdList = new ArrayList<Long>();\n List<Keywords> idList = new ArrayList<>();\n\n for(String qk : queryKeywords){\n List<Keywords> idListt =\n Keywords.find()\n .select(\"keywordEntryId\")\n .where()\n //.in(\"keyword\", queryKeywords)\n .like(\"keyword\", \"%\"+qk+\"%\")\n .findList();\n idList.addAll(idListt);\n }\n\n for (Keywords keywords : idList) {\n keywordIdList.add(keywords.getKeywordEntryId());\n }\n System.out.println(\"keywordIdList---\" + keywordIdList);\n return keywordIdList;\n }", "public Integer getPollItemId() {\n final List<BwXproperty> props = getXproperties(BwXproperty.pollItemId);\n\n if (Util.isEmpty(props)) {\n return null;\n }\n\n if (props.size() > 1) {\n return null;\n }\n\n final BwXproperty p = props.get(0);\n final PollItmId pid = new PollItmId(p.getValue());\n\n return pid.getId();\n }", "@Override\n List<RefCertificationLevel> getItemsFromIds( List<Integer> listIds )\n {\n List<RefCertificationLevel> listRefCertificationLevel = RefCertificationLevelHome.getRefCertificationLevelsListByIds( listIds );\n\n // keep original order\n return listRefCertificationLevel.stream( ).sorted( Comparator.comparingInt( notif -> listIds.indexOf( notif.getId( ) ) ) )\n .collect( Collectors.toList( ) );\n }", "public final ItemId getId() {\r\n return null;\r\n }", "@Override\n public long getItemId(int arg0) {\n return arg0;\n }", "@Override\n public long getItemId(int arg0) {\n return arg0;\n }" ]
[ "0.61532", "0.6012077", "0.5901066", "0.576373", "0.5618612", "0.5602608", "0.534485", "0.5336802", "0.53153735", "0.5285608", "0.5234747", "0.52323383", "0.5199333", "0.51838773", "0.517396", "0.5162501", "0.5154596", "0.51438004", "0.5132456", "0.5117986", "0.5115537", "0.51051986", "0.50966716", "0.507215", "0.5047924", "0.50476545", "0.50475544", "0.5045719", "0.5043681", "0.5035792", "0.5035792", "0.50344056", "0.50285923", "0.50251114", "0.5024614", "0.50219715", "0.50181437", "0.50165665", "0.50037813", "0.49912456", "0.49910188", "0.49910188", "0.49910048", "0.49896115", "0.49855807", "0.49578127", "0.49312827", "0.49292496", "0.49273664", "0.49208856", "0.49163246", "0.49112225", "0.490173", "0.4892421", "0.48846185", "0.48759088", "0.4873964", "0.4873169", "0.4871278", "0.48624212", "0.48516983", "0.4843891", "0.48437852", "0.48425594", "0.48410645", "0.48323378", "0.48224333", "0.48198012", "0.48198012", "0.48198012", "0.48142278", "0.4804369", "0.480168", "0.48015457", "0.47955894", "0.47955894", "0.47955894", "0.47955894", "0.47955894", "0.47955894", "0.47950083", "0.47890693", "0.47886163", "0.47886163", "0.47875288", "0.4787231", "0.47870803", "0.4784973", "0.47818336", "0.4781081", "0.47797465", "0.47774315", "0.47756103", "0.4772163", "0.4759586", "0.47533932", "0.4746203", "0.47424647", "0.47401145", "0.47372323", "0.47372323" ]
0.0
-1
get itemid for list of cat_ids
public Future<Map<String, UUID>> getResGrpDetails(List<String> resGrpList) { Promise<Map<String, UUID>> p = Promise.promise(); Collector<Row, ?, Map<String, UUID>> catIdCollector = Collectors.toMap(row -> row.getString("cat_id"), row -> row.getUUID("id")); try { if (resGrpList.isEmpty()) { p.complete(new HashMap<>()); return p.future(); } pool.withConnection( conn -> conn.preparedQuery(GET_RES_GRP_DETAILS) .collecting(catIdCollector) .execute(Tuple.of(resGrpList.toArray(String[]::new))) .onFailure( obj -> { LOGGER.error("getResGrpDetails db fail :: " + obj.getLocalizedMessage()); p.fail("internal error"); }) .onSuccess( success -> { p.complete(success.value()); })); } catch (Exception e) { LOGGER.error("Fail: " + e.toString()); p.fail("internal error"); } return p.future(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long getID(Object item);", "int getCategoryID(Vector<Integer> categoryIDs, Vector<String> categoryCodes,String cellValue);", "public ArrayList<String> getCourseIdsByCat(String category) {\n ArrayList<String> courseIdsByCat = new ArrayList<>(); \r\n for(int i=0; i < courses.size(); i++) {\r\n if (courses.get(i).getCategory().equals(category)) \r\n courseIdsByCat.add(courses.get(i).getId());\r\n }\r\n \r\n return courseIdsByCat; \r\n }", "static ItemsIconId retrieveItemsIconId(ComprehensionTlv ctlv) throws ResultException {\n CatLog.d(\"ValueParser\", \"retrieveItemsIconId:\");\n ItemsIconId id = new ItemsIconId();\n byte[] rawValue = ctlv.getRawValue();\n int valueIndex = ctlv.getValueIndex();\n boolean z = true;\n int numOfItems = ctlv.getLength() - 1;\n id.recordNumbers = new int[numOfItems];\n int valueIndex2 = valueIndex + 1;\n try {\n if ((rawValue[valueIndex] & 255) != 0) {\n z = false;\n }\n id.selfExplanatory = z;\n int index = 0;\n while (index < numOfItems) {\n int index2 = index + 1;\n int valueIndex3 = valueIndex2 + 1;\n try {\n id.recordNumbers[index] = rawValue[valueIndex2];\n index = index2;\n valueIndex2 = valueIndex3;\n } catch (IndexOutOfBoundsException e) {\n throw new ResultException(ResultCode.CMD_DATA_NOT_UNDERSTOOD);\n }\n }\n return id;\n } catch (IndexOutOfBoundsException e2) {\n throw new ResultException(ResultCode.CMD_DATA_NOT_UNDERSTOOD);\n }\n }", "public static ItemsIconId retrieveItemsIconId(ComprehensionTlv ctlv) throws ResultException {\r\n CatLog.d(\"ValueParser\", \"retrieveItemsIconId:\");\r\n ItemsIconId id = new ItemsIconId();\r\n byte[] rawValue = ctlv.getRawValue();\r\n int valueIndex = ctlv.getValueIndex();\r\n int numOfItems = ctlv.getLength() - 1;\r\n id.recordNumbers = new int[numOfItems];\r\n int valueIndex2 = valueIndex + 1;\r\n try {\r\n id.selfExplanatory = (rawValue[valueIndex] & 255) == 0;\r\n int index = 0;\r\n while (index < numOfItems) {\r\n int index2 = index + 1;\r\n int valueIndex3 = valueIndex2 + 1;\r\n try {\r\n id.recordNumbers[index] = rawValue[valueIndex2];\r\n index = index2;\r\n valueIndex2 = valueIndex3;\r\n } catch (IndexOutOfBoundsException e) {\r\n throw new ResultException(ResultCode.CMD_DATA_NOT_UNDERSTOOD);\r\n }\r\n }\r\n return id;\r\n } catch (IndexOutOfBoundsException e2) {\r\n }\r\n }", "int getItemID();", "public int getId(String name)\n {\n List<Category> list = c.list();\n for(int i = 0; i < list.size(); ++i)\n {\n if(list.get(i).getName().equals(name))\n {\n return list.get(i).getId();\n }\n }\n return 0;\n }", "private int getItemID(String item) {\n\t\titem = item.replace(\" \", \"%20\");\n\t\t//log(\"Item: \" + item);\n \ttry {\n \tString webPage = \"http://\" + serverIP + \"/getid.php?i=\" + item;\n \t//log(\"Webpage: '\" +webPage+\"'\");\n \tURL url = new URL(webPage);\n \tURLConnection urlConnection = url.openConnection();\n \tInputStream is = urlConnection.getInputStream();\n \tInputStreamReader isr = new InputStreamReader(is);\n\n \tint numCharsRead;\n \tchar[] charArray = new char[1024];\n \tStringBuffer sb = new StringBuffer();\n \twhile ((numCharsRead = isr.read(charArray)) > 0) {\n \tsb.append(charArray, 0, numCharsRead);\n \t}\n \tString result = sb.toString();\n \t//log(\"ItemID: \" + result);\n \t//window.status.setText(\"Ready\");\n\n \treturn Integer.parseInt(result);\n \t} catch (Exception e) {\n \tlog(\"Exception occurred at getID.\" + e);\n \t}\n\n \treturn 0;\n \t}", "private int getIndexIfItemObjAlreadyExists(String itemId, List<Item> itemList) {\n for (int i = 0; i < itemList.size(); i++) {\n Item item = itemList.get(i);\n String id = item.getItemId();\n if (!TextUtils.isEmpty(id) && id.equalsIgnoreCase(itemId))\n return i;\n }\n return -1;\n }", "@Override\n public long getItemId(int itemId) {\n return itemId;\n }", "public Object getId(String key) {\n return ids.get(key);\n }", "private synchronized int generateItemID(){\r\n\t\tint i;\r\n\t\tfor(i = 1; items.containsKey(i) || finishedItems.containsKey(i);i++);\r\n\t\treturn i;\r\n\t}", "public void setCatId(int value) {\n this.catId = value;\n }", "public abstract long getItemId(int position);", "@java.lang.Override\n public long getItemId() {\n return itemId_;\n }", "public String[] getItemIDs() {\n String[] IDs = new String[this.size()];\n for (int i = 0; i < IDs.length; i++) {\n IDs[i] = this.get(i).getItemId();\n }\n return IDs;\n }", "abstract int getItemID(int level);", "public int getItemId()\r\n {\r\n return _itemId;\r\n }", "public long getItemShopBasketId();", "private List<Integer> determineItemIds() {\n List<Integer> ids = null;\n try {\n ids = mDatabaseAccess.itemsDAO().selectAllItemIds();\n } catch (Exception ex) {\n Log.e(TAG, \"A general failure has occurred while trying to determine all item IDs.\",\n ex);\n }\n return ids;\n }", "ItemCategory selectByPrimaryKey(Integer id);", "int getListSnId(int index);", "@java.lang.Override\n public long getItemId() {\n return itemId_;\n }", "public static int getID(ArrayList<ContactImpl> list) {\n\n\t\tint randomInt;\n\t\tRandom randomGenerator = new Random();\n\n\t\tif (list == null) {\n\t\t\trandomInt = randomGenerator.nextInt();\n\t\t} \n\t\telse\n\t\t{\n\t\t\tSet<Integer> setOfIds = new HashSet<Integer>();\n\t\t\tSet<Integer> setOfNum = new HashSet<Integer>();\n\t\t\t\n\t\t\tfor (ContactImpl contact : list) \n\t\t\t{\n\t\t\t\tsetOfIds.add(contact.getId());\n\t\t\t\tsetOfNum.add(contact.getId());\t\n\t\t\t}\n\t\t\t\n\t\t\tdo {\n\t\t\t\trandomInt = randomGenerator.nextInt();\n\t\t\t\tsetOfNum.add(randomInt);\n\t\t\t} while (setOfNum.size() == setOfIds.size());\n\t\t}\n\n\t\treturn randomInt;\n\n\t}", "public abstract ArrayList<Integer> getIdList();", "@Override\n\tpublic Collection<Object> getItemIds() {\n\t\tHashSet<Object> filteredItemIds = new HashSet<Object>(super.getItemIds()),\n\t\t\t\titemIds = new HashSet<Object>(filteredItemIds);\n\t\tFilter filter = getAppliedFiltersAsConjunction();\n\t\tItem item = null;\n\t\tfor (Object itemId : itemIds) {\n\t\t\tif (itemId instanceof UUID) {\n\t\t\t\titem = getItem(itemId);\n\t\t\t\tif (item != null) {\n\t\t\t\t\tif (!filter.passesFilter(itemId, item)) {\n\t\t\t\t\t\tfilteredItemIds.remove(itemId);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfilteredItemIds.remove(itemId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn filteredItemIds;\n\t}", "public int getItemId() {\n return itemId;\n }", "@Override\n public long getItemId(int i) {\n return (getItem(i)).getId();\n }", "CatalogItem getItembyId(final Long id);", "public Integer getItemid() {\n return itemid;\n }", "public Integer getItemid() {\n return itemid;\n }", "public Integer getId() {\n\t\treturn wishlistItemId;\n\t}", "public List<String> getPlanItemIds();", "long getIds(int index);", "int getItemId() {\n return m_itemId;\n }", "public Integer getCatId() {\n return catId;\n }", "public long getItemId(int arg0) {\n\t\treturn arg0;\r\n\t}", "public void setCatId(long value) {\n this.catId = value;\n }", "public Long getItemId() {\r\n return itemId;\r\n }", "@Override\n\tprotected Set<Integer> getItemIds() {\n\t\t\n\t\tBnetDistributedKB bdKb = (BnetDistributedKB)kb;\n\t\t\n\t\treturn bdKb.itemIds;\n\t}", "@Override\n\tprotected Set<Integer> getItemIds() {\n\t\t\n\t\tBnetDistributedKB bdKb = (BnetDistributedKB)kb;\n\t\t\n\t\treturn bdKb.itemIds;\n\t}", "@Override\r\n public int getItemId() {\n return this.itemId;\r\n }", "public String getItemId() {\r\n return itemId;\r\n }", "public List<ItemCategory> getByCat(int id) {\n return repository.findByCategoryId(id);\n }", "protected abstract int getItemLayoutId();", "public int getCatId() {\n return catId;\n }", "public Vector getItemIds()\n {\n return mItemIds;\n }", "public String getId(String s){\n for (int i = 0; i<length; i++){\n if(wallList.get(i).getName().equalsIgnoreCase(s))\n id = wallList.get(i).getId();\n }\n return id;\n }", "IdListRule createIdListRule();", "public String getItemId() {\n return itemId;\n }", "public void setItemIdList(List<String> itemIdList) {\r\n this.itemIdList = itemIdList;\r\n }", "ProductCategory find(int id)throws IllegalArgumentException;", "public int[] getItemIDs() {\n\t\treturn itemIDs;\n\t}", "public ArrayList<String> get_non_deleted_product_id(String selected_ln, String agentID, int list_incr){\n\n // set url to query for Lists table in local DB\n String URL = \"content://app.admin.pressfit.provider/List_Items\";\n // parse url\n Uri LI_uri = Uri.parse(URL);\n ArrayList<String> non_deleted_prod_id = new ArrayList<String>();\n\n /* firing query to get product ids from local db */\n Cursor li_cursor = getContentResolver().query(LI_uri, new String[]{GlobalProvider.LI_Product_ID},\n GlobalProvider.LI_List_Name + \" =? AND \" + GlobalProvider.LI_Login_User_Id + \" =? AND \" +\n GlobalProvider.LI_Increment + \" =? AND \" + GlobalProvider.LI_deleted + \" =? \",\n new String[]{selected_ln,agentID,String.valueOf(list_incr),\"0\"}, null);\n\n /* checking null factor */\n if(null != li_cursor && li_cursor.moveToFirst()) {\n do {\n String prod_id = li_cursor.getString(li_cursor.getColumnIndex(GlobalProvider.LI_Product_ID));\n non_deleted_prod_id.add(prod_id);\n } while (li_cursor.moveToNext());\n }\n return non_deleted_prod_id;\n }", "@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1,\n int index, long arg3) {\n if (index != 0) {\n categoryId = arrCategory.get(index).getId() + \"\";\n } else {\n categoryId = \"\";\n }\n }", "int getOtherIds(int index);", "public String getItemIdentifier();", "public long getSuburItemId();", "public int getItemID()\n {\n return itemID;\n }", "public int getItemId() {\n\t\treturn id;\n\t}", "public List<Integer> getIds(int conId, int type, int state) throws AppException;", "public Object getKey(Movie item) {\n\t return (item == null) ? null : item.getId();\r\n\t }", "public int getSlotForId(int itemId) {\n\t\tif (summonedFamiliar.familiarType == FamiliarType.BOB) {\n\t\t\tfor (int i = 0; i < burdenedItems.length; i++) {\n\t\t\t\tif ((burdenedItems[i] + 1) == itemId)\n\t\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public String getItemId(){\r\n\t\treturn \"\";\r\n\t}", "void setItemId(String itemId);", "private static <T extends AbstractApiIdentifiableDTO> List<Long> generateIdList(List<T> idList) {\n List<Long> results = new ArrayList<>(idList.size());\n\n for (T idSingle : idList) {\n results.add(idSingle.getId());\n }\n\n return results;\n }", "int getStoreID(Vector<Integer> storeIDs, Vector<String> storeCodes, String cellValue);", "@Override\n public long getItemId(int arg0) {\n return arg0;\n }", "@Override\n public long getItemId(int arg0) {\n return arg0;\n }", "@Override\n public long getItemId(int arg0) {\n return arg0;\n }", "public long getCatId() {\n return catId;\n }", "protected List<?> keysToIds (List<Key<T>> keys){\n \tArrayList ids = new ArrayList(keys.size()*2);\n \tfor(Key<T> key : keys)\n \t\tids.add(key.getId());\n \treturn ids;\n }", "private Item findItemById(String curId, Inventory invent){\n\t\tif (invent == null) return null;\n\t\tfor (Item item : invent){\n\t\t\tif (item.getId().equals(curId)){\n\t\t\t\treturn item;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public int getR_Category_ID();", "@Override\n public long getItemId(int position) {\n return listInfoList.get(position).id;\n }", "@Override\n\t\tpublic long getItemId(int arg0) {\n\t\t\treturn arg0;\n\t\t}", "@Override\n\t\tpublic long getItemId(int arg0) {\n\t\t\treturn arg0;\n\t\t}", "@Override\n\t\tpublic long getItemId(int arg0) {\n\t\t\treturn arg0;\n\t\t}", "@Override\n\t\tpublic long getItemId(int arg0) {\n\t\t\treturn arg0;\n\t\t}", "@Override\n\t\tpublic long getItemId(int arg0) {\n\t\t\treturn arg0;\n\t\t}", "@Override\n\t\tpublic long getItemId(int arg0) {\n\t\t\treturn arg0;\n\t\t}", "public static <T extends Entidad> List<Long> buildIdList(Collection<T> entityList) {\r\n\t\tList<Long> ids = new ArrayList<Long>();\r\n\t\tif (!ObjectUtils.isEmpty(entityList)) {\r\n\t\t\tfor (T entity: entityList) {\r\n\t\t\t\tids.add(entity.getId());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ids;\r\n\t}", "@Override\n\tpublic Item getItemByID(String itemId) {\n\n\t\treturn actionOnItem(itemId).get(0);\n\t}", "@Override\n\tpublic Item getItemByID(String itemId) {\n\n\t\treturn actionOnItem(itemId).get(0);\n\t}", "@Override\n public long getItemId(int position) {\n return getItem(position).id;\n }", "@Override\r\n\t\tpublic long getItemId(int arg0) {\n\t\t\treturn arg0;\r\n\t\t}", "public Integer getMenuItemTag(MenuItem item) {\n return folderIds.get(item);\n }", "int getIDS(String ids) throws IOException {\n String lines=\"\";\n String aux;\n int i = 0, j = 0, k = 0;\n\n BufferedReader br = new BufferedReader(new FileReader(ids)); /* Read all file adding to string */\n try {\n StringBuilder sb = new StringBuilder();\n String line = br.readLine();\n while (line != null) {\n sb.append(line);\n sb.append(System.lineSeparator());\n line = br.readLine();\n }\n lines = sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n br.close();\n }\n\n /* Add each each id to array and get the number of ids */\n i = lines.indexOf(\"id#:[\");\n k = lines.indexOf(\"]\");\n while (i >= 0) {\n /* AllPos[j] = Integer.parseInt(lines.substring(i+5,k));*/\n attrib_int(j, Integer.parseInt(lines.substring(i+5,k)));\n lines = lines.substring(k+1);\n i = lines.indexOf(\"id#:[\");\n if (i>=0)\n {\n aux = lines.substring(i);\n k = aux.indexOf(\"]\") + i;\n }\n j++;\n\n }\n ids_quantity=j;\n return (0);\n }", "public String getCatId() {\r\n\t\treturn catId;\r\n\t}", "@Override\n public long getItemId(int arg0) {\n return arg0;\n }", "private ArrayList<String> obtenerIds(ArrayList<String> values){\n\t\tArrayList<String> ids = new ArrayList<>();\n\t\tfor(String valor : values){\n\t\t\tids.add(postresId.get(valor));\n\t\t}\n\t\treturn ids;\n\t}", "@Override\n public long getItemId(int position) {\n return contacts.get(position).getContactid();\n }", "public void setCatId(Integer catId) {\n this.catId = catId;\n }", "@Override\n public long getItemId(int arg0) {\n return arg0;\n }", "public static int getIdentifier(){\n\t\tif(index > ids.size() - 1){\n\t\t\tindex = 0;\n\t\t}\n\t\t// Post increment is used here, returns index then increments index\n\t\treturn ids.get(index++);\n\t}", "public static ArrayList<Long> searchKeywordEntryId(ArrayList<String> queryKeywords) {\n ArrayList<Long> keywordIdList = new ArrayList<Long>();\n List<Keywords> idList = new ArrayList<>();\n\n for(String qk : queryKeywords){\n List<Keywords> idListt =\n Keywords.find()\n .select(\"keywordEntryId\")\n .where()\n //.in(\"keyword\", queryKeywords)\n .like(\"keyword\", \"%\"+qk+\"%\")\n .findList();\n idList.addAll(idListt);\n }\n\n for (Keywords keywords : idList) {\n keywordIdList.add(keywords.getKeywordEntryId());\n }\n System.out.println(\"keywordIdList---\" + keywordIdList);\n return keywordIdList;\n }", "public Integer getPollItemId() {\n final List<BwXproperty> props = getXproperties(BwXproperty.pollItemId);\n\n if (Util.isEmpty(props)) {\n return null;\n }\n\n if (props.size() > 1) {\n return null;\n }\n\n final BwXproperty p = props.get(0);\n final PollItmId pid = new PollItmId(p.getValue());\n\n return pid.getId();\n }", "@Override\n List<RefCertificationLevel> getItemsFromIds( List<Integer> listIds )\n {\n List<RefCertificationLevel> listRefCertificationLevel = RefCertificationLevelHome.getRefCertificationLevelsListByIds( listIds );\n\n // keep original order\n return listRefCertificationLevel.stream( ).sorted( Comparator.comparingInt( notif -> listIds.indexOf( notif.getId( ) ) ) )\n .collect( Collectors.toList( ) );\n }", "public final ItemId getId() {\r\n return null;\r\n }", "public static int ID(Long[] iD2, long id) {\n\t\t for(int i=0 ; i<30 ; i++) {\n\t\t\t if(iD2[i]==id) {\n\t\t\t\t return i;\n\t\t\t } \n\t\t }\n\t\treturn -1;\n\t }", "@Override\n public long getItemId(int arg0) {\n return arg0;\n }" ]
[ "0.6153433", "0.60113084", "0.59008026", "0.57632047", "0.5618047", "0.5601322", "0.5343096", "0.5338092", "0.531651", "0.52854156", "0.5235654", "0.52331054", "0.51952404", "0.5183304", "0.51737577", "0.516365", "0.515277", "0.5142901", "0.5130952", "0.5120431", "0.51135534", "0.5106079", "0.5096608", "0.50751066", "0.5049206", "0.50469536", "0.5046868", "0.5046796", "0.50420046", "0.50343424", "0.50343424", "0.50340426", "0.50274396", "0.5024774", "0.50242805", "0.50240856", "0.50165796", "0.50146073", "0.500336", "0.4990902", "0.4990902", "0.49901983", "0.49901614", "0.49867386", "0.498386", "0.49533856", "0.49324435", "0.49302247", "0.49282694", "0.4920051", "0.49178624", "0.49086553", "0.49028113", "0.48936102", "0.4882077", "0.4874934", "0.48748514", "0.48717254", "0.48697644", "0.48618034", "0.48532408", "0.48435986", "0.48425785", "0.48425594", "0.48398802", "0.48365405", "0.48234406", "0.4819373", "0.4819373", "0.4819373", "0.4810081", "0.48067442", "0.4801152", "0.47984236", "0.47954583", "0.47951669", "0.47951669", "0.47951669", "0.47951669", "0.47951669", "0.47951669", "0.47908476", "0.4787865", "0.4787865", "0.4786803", "0.47866723", "0.47841963", "0.4783798", "0.47825265", "0.47812423", "0.47787714", "0.4776693", "0.47751608", "0.47714707", "0.4760245", "0.4755956", "0.4746348", "0.47439253", "0.4739799", "0.47374275", "0.4736666" ]
0.0
-1
get list of items from catalogue server
private Future<List<JsonObject>> fetch(Map<String, List<String>> request) { Promise<List<JsonObject>> p = Promise.promise(); List<String> resIds = new ArrayList<>(); if (request.containsKey(RES)) { resIds.addAll(request.get(RES)); // get resGrpId from resID resIds.addAll( resIds.stream() .map(e -> e.split("/")) .map(obj -> obj[0] + "/" + obj[1] + "/" + obj[2] + "/" + obj[3]) .collect(Collectors.toList())); } if (request.containsKey(RES_GRP)) resIds.addAll(request.get(RES_GRP)); List<String> distinctRes = resIds.stream().distinct().collect(Collectors.toList()); List<Future> fetchFutures = distinctRes.stream().map(this::fetchItem).collect(Collectors.toList()); CompositeFuture.all(fetchFutures) .onSuccess( successHandler -> { p.complete( fetchFutures.stream() .map(x -> (JsonObject) x.result()) .collect(Collectors.toList())); }) .onFailure( failureHandler -> { p.fail(failureHandler); }); return p.future(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<CatalogItem> getAllCatalogItems();", "@RequestMapping(method = RequestMethod.GET)\n\tpublic ResponseEntity<?> getCatalogItems() {\n\t\tBraveSpanContext openTracingContext = getTracingContext();\n\t\tio.opentracing.Span span = tracer.buildSpan(\"GetCatalogFromService\").asChildOf(openTracingContext)\n\t\t\t\t.withTag(\"Description\", \"Get All Catalogs\")\n\t\t\t\t.withTag(\"http_request_url\", request.getRequestURI()).start();\n\t\tbrave.Span braveSpan = ((BraveSpan) span).unwrap();\n\t\tbraveSpan.kind(Kind.SERVER);\n\n\t\tSummary.Timer requestTimer = Prometheus.requestLatency.startTimer();\n\t\ttry {\n\t\t\tlog.debug(\"Calling getCatalogItems() method of catalog controller is called\");\n\t\t\tPrometheus.getCounters.inc();\n\t\t\tPrometheus.inProgressRequests.inc();\n\t\t\tio.opentracing.Span mongospan = tracer.buildSpan(\"MongoService\").asChildOf(span)\n\t\t\t\t\t.withTag(\"Description\", \"MongoDB Service Call\").start();\n\t\t\tbrave.Span braveMongoSpan = ((BraveSpan) mongospan).unwrap();\n\t\t\tlog.debug(\"Calling getCatalogItems() method of catalog service\");\n\t\t\tList<Catalog> catalog = service.getCatalogItems(mongospan);\n\t\t\tbraveMongoSpan.finish();\n\t\t\tif (catalog == null) {\n\t\t\t\tlog.debug(\"No records found. Returning NOT_FOUND status.\");\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t\t} else {\n\t\t\t\tlog.debug(\"Returning list of items.\");\n\t\t\t\treturn new ResponseEntity<>(catalog, HttpStatus.OK);\n\t\t\t}\n\t\t} catch (Exception exc) {\n\t\t\tPrometheus.requestFailures.inc();\n\t\t\tlog.error(\"Error in getCatalogItems\", exc);\n\t\t\tspan.setTag(\"error\", exc.getMessage());\n\t\t\treturn new ResponseEntity<>(exc.toString(), HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t} finally {\n\t\t\trequestTimer.observeDuration();\n\t\t\tPrometheus.inProgressRequests.dec();\n\t\t\tspan.finish();\n\t\t}\n\t}", "public static List<Item> getItems() {\n\n HttpRequest request = HttpRequest.newBuilder().GET().uri(URI.create(\"http://localhost:8080/item/all\")).setHeader(\"Cookie\", Authenticator.SESSION_COOKIE).build();\n HttpResponse<String> response = null;\n try {\n response = client.send(request, HttpResponse.BodyHandlers.ofString());\n } catch (Exception e) {\n e.printStackTrace();\n //return \"Communication with server failed\";\n }\n if (response.statusCode() != 200) {\n System.out.println(\"Status: \" + response.statusCode());\n }\n\n ObjectMapper mapper = new ObjectMapper();\n mapper.registerModule(new JavaTimeModule());\n List<Item> items = null;\n // TODO handle exception\n try {\n items = mapper.readValue(response.body(), new TypeReference<List<Item>>(){});\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return items;\n }", "@Override\n public List<Item> viewAllItems() {\n // calls List<Item> itemRepo.findCatalog();\n return itemRepo.findCatalog();\n }", "public IFuture<ItemInfo[]> getCatalog()\n\t{\n\t\tfinal Future<ItemInfo[]> ret = new Future<ItemInfo[]>();\n\t\tShopCapa shop = (ShopCapa)capa.getPojoCapability();\n\t\tret.setResult(shop.getCatalog().toArray(new ItemInfo[shop.getCatalog().size()]));\n\t\treturn ret;\n\t}", "public void getRemoteItems() {\n url = getAllItemsOrderedByCategory;\n params = new HashMap<>();\n params.put(param_securitykey, param_securitykey);\n\n if (ApiHelper.checkInternet(mContext)) {\n mApiHelper.getItems(mIRestApiCallBack, true, url, params);\n } else {\n //Toast.makeText(mContext, mContext.getString(R.string.noInternetConnection), Toast.LENGTH_LONG).show();\n mIRestApiCallBack.onNoInternet();\n CacheApi cacheApi = loadCacheData(url, params);\n mSqliteCallBack.onDBDataObjectLoaded(cacheApi);\n }\n\n }", "public DesktopClient printItemList() {\n String uri = \"http://localhost:8080/api/items\";\n RestTemplate restTemplate = new RestTemplate();\n ResponseEntity<Item[]> result = restTemplate.getForEntity(uri, Item[].class);\n Item[] items = result.getBody();\n List<Item> itemList = new ArrayList<>();\n if (items != null) {\n itemList.addAll(Arrays.asList(items));\n\n for (Item item :\n itemList) {\n System.out.println(item.toString());\n }\n } else {\n System.out.println(\"Didn't get items.\");\n }\n\n return this;\n }", "@GET\n @Path(\"itemlist\")\n @Produces(MediaType.TEXT_PLAIN)\n public String getItemList(@QueryParam(\"jsonpcallback\") String jsonpcallback) {\n return jsonpcallback + \"(\" + is.getAllItems().toJSONString() + \")\";\n }", "java.util.List<com.rpg.framework.database.Protocol.Item> \n getItemsList();", "public List<Product> getProductList(Catalog catalog) throws BackendException;", "List<Item> getItems(IDAOSession session);", "@GET\r\n\t@Path(\"/all\")\r\n\t@Produces(\"application/json\")\r\n\tpublic JsonArray getAllItems(){\r\n\t\t \tConnection database = DBConnecter.getConnection();\r\n\t\t Statement stat = null;\r\n\t\t ResultSet rs = null;\r\n\t\t\ttry {\r\n\t\t\t\tstat = database.createStatement();\r\n\t\t\t\tString sqlQueryString = \"select * from item;\";\r\n\t\t\t\trs = stat.executeQuery(sqlQueryString);\r\n\t\t\t\tstat.executeQuery(sqlQueryString);\r\n\t\t\t\twhile(rs.next()){\r\n\t\t\t\t\tItem itemNew = new Item(\r\n\t\t \t\trs.getInt(idTagString),\r\n\t\t \t\trs.getInt(binNumString),\r\n\t\t \t\trs.getString(departmentString),\r\n\t\t \t\trs.getString(descriptionString),\r\n\t\t \t\trs.getFloat(replacementCostString),\r\n\t\t \t\trs.getFloat(priceString),\r\n\t\t \t\trs.getString(dimensionsString),\r\n\t\t \t\trs.getInt(lengthString),\r\n\t\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\t);\r\n\t\t items.add(itemNew);\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}finally{\r\n\t\t\t\ttry {\r\n\t\t\t\t\trs.close();\r\n\t\t\t\t\tstat.close();\r\n\t\t\t\t\tdatabase.close();\r\n\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t \r\n\t\t\t}\r\n\t\t\treturn getListAsJson(items);\r\n\t}", "@RequestMapping(value = \"/items\", method = RequestMethod.GET)\n\tpublic @ResponseBody List<Item> itemListRest() {\n\t\treturn (List<Item>) repository.findAll();\n\t}", "List<CatalogItem> getAllCatalogItemsByType(Long type_id);", "private void getItemList(){\n sendPacket(Item_stocksTableAccess.getConnection().getItemList());\n \n }", "public interface CatalogueClient {\n\n\tList<Exoplanet> getCatalogue();\n\n}", "public List<Item> getItemList();", "public List<T> showAllClients();", "public static void items(){\n\t\ttry{\n\t\t\tConnection conn = DriverManager.getConnection(url,username,password);\n\t\t\tStatement query = conn.createStatement();\n\t\t\tResultSet re = query.executeQuery(\"select * from item\");\n\t\t\tString spc = \" \";\n\t\t\twhile (re.next()){\n\t\t\t\tSystem.out.println(re.getInt(\"itemid\")+spc+re.getString(\"title\")+spc+re.getDouble(\"price\"));\n\t\t\t}\n\t\t}catch(Exception ecx){\n\t\t\tecx.printStackTrace();\n\t\t}\n\t}", "public ArrayList<ItemBean> getCatalogueList() throws SQLException{\n\t\tString query = \"select DISTINCT CATID from roumani.item\";\n\t\t\n\t\tArrayList<ItemBean> itemList = new ArrayList<ItemBean>();\n\t\t\n\t\ttry{\n\t\t\t//Open connection to database\n\t\tConnection con = dataSource.getConnection();\n\t\t\t//Create prepared statement\n\t\tPreparedStatement statement = con.prepareStatement(query);\n\t\t\n\t\t\t//Query the database\n\t\tResultSet rs = statement.executeQuery();\n\t\t\n\t\t\n\t\t\t//If there are remaining items matching search criteria, place them in list\n\t\twhile(rs.next())\n//\t\t\tSystem.out.println(\"Category:\" + rs.getString(\"CATID\"));\n\t\t\ttry{\n\t\t\t\tString categoryCheck = rs.getString(\"CATID\");\n\t\t\t\tif(categoryCheck.equals(\"3\"))\n\t\t\t\t\titemList.add(new ItemBean(\"Meats\", 3));\n\t\t\t\telse if(categoryCheck.equals(\"4\"))\n\t\t\t\t\titemList.add(new ItemBean(\"Cheese\", 4));\n\t\t\t\telse if(categoryCheck.equals(\"5\"))\n\t\t\t\t\titemList.add(new ItemBean(\"Deserts\", 5));\n\t\t\t\telse if(categoryCheck.equals(\"6\"))\n\t\t\t\t\titemList.add(new ItemBean(\"Cereal\", 6));\n\t\t\t\t\n\t\t\t}catch(SQLException e){\n\t\t\t\tSystem.err.println(e.getMessage());\n\t\t\t}\n\t\tcon.close();\n\t\tstatement.close();\n\t\trs.close();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"ERROR! Could not connect to database, or find anything inside.\\nDid you remember to start and connect to Derby?\");\n\t\t}\n\t\t\t//Return list of found items\n//\t\tSystem.out.println(\"Done searching for category list\");\n\t\treturn itemList;\n\t}", "public List<CartItem> getAllcartitem();", "public static ArrayList<InventoryItem> getInventoryItems() {\n\n String itemUrl = REST_BASE_URL + ITEMS;\n String inventoryUrl = REST_BASE_URL + INVENTORIES;\n String availableUrl = REST_BASE_URL + INVENTORIES + AVAILABLE + CATEGORIZED;\n\n // List of items\n ArrayList<InventoryItem> items = new ArrayList<>();\n ArrayList<String> itemNames = new ArrayList<>();\n\n URL url = null;\n\n /* Fetch items from \"items\" table. */\n try {\n url = new URL(itemUrl);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n JSONArray itemJsonArray = null;\n try {\n Log.d(TAG, \"getInventoryItems: getting items\");\n itemJsonArray = getResponseFromHttpUrl(url);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n // Store each item into <items>. Store each item name into <itemNames>.\n for (int i = 0; i < itemJsonArray.length(); i++) {\n JSONObject jo = (JSONObject) itemJsonArray.get(i);\n InventoryItem newItem = new InventoryItem(\n jo.getString(ITEM_IMAGE_URL),\n jo.getString(ITEM_NAME),\n jo.getString(ITEM_DESCRIPTION),\n 0,\n 0);\n items.add(newItem);\n itemNames.add(jo.getString(ITEM_NAME));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n /* Fetch inventory items from \"inventories\" */\n try {\n url = new URL(inventoryUrl);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n JSONArray jaResult = null;\n try {\n Log.d(TAG, \"getInventoryItems: getting ivnentories\");\n jaResult = getResponseFromHttpUrl(url);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n for (int i = 0; i < jaResult.length(); i++) {\n JSONObject jo = (JSONObject) jaResult.get(i);\n int index = itemNames.indexOf(jo.getString(ITEM_NAME));\n if (index > -1) {\n InventoryItem currItem = items.get(index);\n currItem.setItemQuantity(currItem.getItemQuantity()+1);\n items.set(index, currItem);\n } else {\n // TODO: throw an exception here?\n Log.e(TAG, \"getInventoryItems: There is an item in the inventory but not in the item table!\");\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n /* get inventory stocks from \"/available/categorized\" */\n try {\n url = new URL(availableUrl);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n\n try {\n Log.d(TAG, \"getInventoryItems: getting inventory stocks\");\n jaResult = getResponseFromHttpUrl(url);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n for (int i = 0; i < jaResult.length(); i++) {\n JSONObject jo = (JSONObject) jaResult.get(i);\n int index = itemNames.indexOf(jo.getString(ITEM_NAME));\n if (index > -1) {\n InventoryItem currItem = items.get(index);\n currItem.setItemStock(jo.getInt(ITEM_COUNT));\n items.set(index, currItem);\n } else {\n // TODO: throw an exception here?\n Log.e(TAG, \"getInventoryItems: There is an item in the stock but not in the item table!\");\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return items;\n }", "public List<Item> getAllItemsAvailable();", "@RequestMapping(method=RequestMethod.GET, value = \"/item\", produces = \"application/json\")\n public List<Item> getItems()\n {\n return this.itemRepository.getItems();\n }", "public List<CatalogService> getService(String service);", "List<InventoryItem> getInventory(int appId);", "public abstract List<String> getInventory();", "java.util.List<io.opencannabis.schema.commerce.OrderItem.Item> \n getItemList();", "public List<Clients> getallClients();", "@Test\n public void getCatalogItemTest() throws ApiException {\n String asin = null;\n List<String> marketplaceIds = null;\n List<String> includedData = null;\n String locale = null;\n Item response = api.getCatalogItem(asin, marketplaceIds, includedData, locale);\n // TODO: test validations\n }", "public abstract List<String> getUserInventory();", "public ResultSet getItemList() throws IllegalStateException{\n\t \n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\");\n\t try{\n\t \t stmt = con.createStatement();\n String queryString = \"SELECT INUMBER , INAME , CATEG, auc_start, auc_end_date , startbid , currentbid,status \" \n \t\t+ \"FROM ITEM \"\n + \" WHERE SELLERNO = '\" + this.id +\"' \";\n\n result = stmt.executeQuery(queryString);\n \n\t }\n\t catch (Exception E) {\n\t E.printStackTrace();\n\t }\n\t return result; \n\t }", "public ObservableList<CatalogPres> getCatalogList() {\n\t\t\n\t\treturn readCatalogsFromDataSource();\n\t\t\n\t}", "public List<Items> list() {\n\t\treturn itemDao.list();\r\n\t}", "public void listStores(){\r\n Map<String, String> params = new HashMap<>();\r\n String url = API_DOMAIN + STORE_EXT + LIST_ACTION;\r\n this.makeVolleyRequest( url, params );\r\n }", "@GET\n @Path(\"/list\")\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n public Response getCategories(@javax.ws.rs.core.Context UriInfo uriInfo) {\n List categoryList = categoryRepository.selectAllVisible();\n Category category;\n SuccessMessage successMessage = new SuccessMessage();\n successMessage.setCode(Response.Status.OK.getStatusCode());\n successMessage.setStatus(\"success\");\n String url = uriInfo.getAbsolutePath().toString();\n successMessage.addLink(url, \"self\");\n\n if (categoryList.size() != 0) {\n successMessage.setMessage(\"categories retrieved\");\n for (int i = 0; i < categoryList.size(); i++) {\n JSONObject jsonObject = new JSONObject();\n category = (Category) categoryList.get(i);\n jsonObject.put(\"name\", category.getCategoryName());\n jsonObject.put(\"description\", category.getCatDescription());\n successMessage.addData(jsonObject);\n successMessage.addLink(BASE_URL + \"subcategories/category/\" + category.getCategoryName().replaceAll(\" \", \"%20\"), \"subcategories of \" + category.getCategoryName().toString());\n }\n } else {\n successMessage.setMessage(\"no categories to retrieve\");\n }\n return Response.status(Response.Status.OK).entity(successMessage)\n .header(\"Access-Control-Allow-Origin\", propertyReader.readProperty(\"Access-Control-Allow-Origin\"))\n .build();\n }", "@Override\n\tpublic GetContentResponse listContents() {\n\t\tLOGGER.debug(\"LIST ALL CONTENTS\");\n\t\t\n\t\tClientConfig clientConfig = new ClientConfig();\n\t\t \n\t HttpAuthenticationFeature feature = HttpAuthenticationFeature.basic(env.getProperty(\"liferay.user.id\"), env.getProperty(\"liferay.user.key\"));\n\t clientConfig.register( feature) ;\n\t \n\t clientConfig.register(JacksonFeature.class);\n\t\t\n\t\tClient client = ClientBuilder.newClient(clientConfig);\n\t\tWebTarget webTarget = client.target(env.getProperty(\"liferay.api.rootpath\")).path(\"article-id/0/content-type/tagtest\");\n\t\t \n\t\tInvocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n\t\n\t\tResponse response = invocationBuilder.get();\n\t\t \n\t\tGetContentResponse content = response.readEntity(GetContentResponse.class);\n\t\t\n\t\t\n\t\n\t\t \n\t\tLOGGER.info(\"status::\"+response.getStatus());\n\t\t\n\t\t\n\t\t\n\t\tcontent.setStatusCode(200);\n\t\tcontent.setStatusMessage(\"Content List\");\n\t\n\t\treturn content;\n\t}", "List<InventoryItem> getInventory(String username, int appId);", "public List<Client> getAllClient();", "public String[] listItems() {\n \n\t\tif (itemCount==0) {\n\t\t\tSystem.out.println(\"\\tNo items available.\\n\");\n\t\t}\n\t\telse {\n\t\t\tfor(int index = 1; index<=itemCount; index++) {\n VendItem s = stock[index-1];\n itemList[index-1]=(s.getName());\n\t\t\t}\n System.out.println();\n \n }\n return itemList;\n\n }", "List<Product> retrieveProducts();", "public void retrieveCardInventoryList() {\n try {\n systemResultViewUtil.setCardInventoryDataBeansList(cardInventoryTransformerBean.retrieveAllCardInventory());\n System.out.println(\"Retrive CardInventory Successfully\");\n } catch (Exception e) {\n System.out.println(e);\n System.out.println(\"Error in Retrive CardInventory\");\n }\n }", "List<InventoryItem> getInventory(String username);", "List<CatalogItem> getAllCatalogItemsByBrand(Long brand_id);", "@WebMethod(operationName = \"getCatalog\")\n @WebResult(name=\"String\")\n public List<String> getCatalog(@WebParam(name = \"id\") String id) throws ClassNotFoundException, SQLException { \n return Database.getListCatalog(id);\n }", "List<Product> getProductsList();", "public List<BusinessObject> getItems(Package pkg);", "public String list(){\n\t\tlist = connC.getAll();\n\t\tint index = 0, begin = 0;\n\t\tbegin = (pageIndex - 1) * STATIC_ROW_MAX;\n\t\tif(pageIndex < totalPage) {\n\t\t\tindex = pageIndex * STATIC_ROW_MAX;\n\t\t} else {\n\t\t\tindex = list.size();\n\t\t}\n\t\tfor(int i = begin; i < index; i++) {\n\t\t\tlistCustomer.add(list.get(i));\t\t\t\t\n\t\t}\n\t\treturn \"list\";\n\t}", "List<InventoryItem> getInventory();", "public List<Product> getProducts();", "public List<Product> getProducts();", "public List<Client> findAll() throws DataAccessLayerException {\n try {\n Subject.doAs(LoginController.getLoginContext().getSubject(), new MyPrivilegedAction(\"CLIENT\", Permission.READ));\n return super.findAll(Client.class);\n } catch (AccessControlException e) {\n e.printStackTrace();\n }\n return new ArrayList<>();\n }", "private String getItems(long listid){\n \tString theItems = \"\";\n \titemDbAdapter.open();\n \titemCursor = itemDbAdapter.fetchAllItemsFromList(LIST_ID);\n startManagingCursor(itemCursor);\n int cursorRows = itemCursor.getCount();\n \n for ( int i = 0; i < cursorRows; i++) {\n \titemCursor.moveToPosition(i);\n \tString title = itemCursor.getString(itemCursor.getColumnIndexOrThrow(ItemsDbAdapter.KEY_TITLE));\n \ttheItems = theItems + title + \"\\n\";\n }\n \titemDbAdapter.close();\n \treturn theItems;\n }", "public List<Volume> list() {\n List<Volume> volumes = new ArrayList<Volume>();\n\n try {\n\n HttpResponse<Volume[]> jsonResponse = Unirest.get(rootUrl + ENDPOINT_DATASET_LIST)\n .basicAuth(auth.getUsername(),auth.getPassword())\n .header(\"accept\", \"application/json\")\n .asObject(Volume[].class);\n //System.out.print(jsonResponse.getBody());\n\n if (jsonResponse.getStatus() == HttpStatus.SC_OK) {\n Volume [] body = jsonResponse.getBody();\n System.out.println(body);\n\n for (Volume b: body){\n volumes.add(b);\n }\n }\n\n } catch (UnirestException e) {\n e.printStackTrace();\n }\n\n return volumes;\n }", "@Override\n\tpublic List<item> findAll() {\n\t\treturn donkyClientFeign.lista().stream().map(p -> new item(p,1)).collect(Collectors.toList());\n\t}", "private void getEcoleList(){\r\n\t\tEcoleRequestFactory rf = GWT.create(EcoleRequestFactory.class);\r\n\t\trf.initialize(this.getEventBus(), new EventSourceRequestTransport(this.getEventBus()));\r\n\t\tEcoleRequestContext rc = rf.ecoleRequest();\r\n\t\trc.listAllActive().fire(new Receiver<List<EcoleProxy>>(){\r\n\t\t\t@Override\r\n\t\t\tpublic void onSuccess(List<EcoleProxy> response){\r\n\t\t\t\tgetView().setEcoleAddList(response);\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void onFailure(ServerFailure error){\r\n\t\t\t\tWindow.alert(error.getMessage());\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Override\n public List<Item> retrieveAllItems() throws VendingMachinePersistenceException {\n loadItemFile();\n List<Item> itemList = new ArrayList<>();\n for (Item currentItem: itemMap.values()) {\n itemList.add(currentItem);\n }\n\n return itemList;\n }", "public List<ServerServices> listServerServices();", "public void list(){\n //loop through all inventory items\n for(int i=0; i<this.items.size(); i++){\n //print listing of each item\n System.out.printf(this.items.get(i).getListing()+\"\\n\");\n }\n }", "public List<StockItem> getStockList();", "public ArrayList<String> getSellers(String productName);", "java.util.List<java.lang.String> getContentsList();", "java.util.List<java.lang.String>\n getQueryItemsList();", "@POST\r\n @GET\r\n @Path(\"/v1.0/produtos\")\r\n @Consumes({ WILDCARD })\r\n @Produces({ APPLICATION_ATOM_XML, APPLICATION_JSON + \"; charset=UTF-8\" })\r\n public Response listarProdutos() {\r\n\r\n log.debug(\"listarProdutos: {}\");\r\n\r\n try {\r\n\r\n List<Produto> produtos = produtoSC.listar();\r\n\r\n return respostaHTTP.construirResposta(produtos);\r\n\r\n } catch (Exception e) {\r\n\r\n return respostaHTTP.construirRespostaErro(e);\r\n }\r\n }", "com.rpg.framework.database.Protocol.Item getItems(int index);", "public Catalog getCatalogProducts() {\n return catalogProducts;\n }", "List<StockList> fetch(String title);", "public List<Catalog> getCatalogs() {\n \t\tList<Catalog> catalogs = new ArrayList<Catalog>();\n \t\tList<CatalogInfo> catalogInfos = getConfiguration().getCatalogInfos();\n \t\tfor (CatalogInfo catalogInfo : catalogInfos) {\n \t\t\tCatalogManager mgr = new CatalogManager(catalogInfo);\n \t\t\tCatalog catalog = mgr.loadCatalog();\n \t\t\t// as catalogInfo is marked as transient, we have to set it\n \t\t\tcatalog.setInfo(catalogInfo);\n \t\t\tif (catalog != null) {\n \t\t\t\tcatalogs.add(catalog);\n \t\t\t}\n \t\t}\n \t\treturn catalogs;\n \t}", "@GET\n\t@Path(\"/\") \n\t@Produces(MediaType.TEXT_HTML) \n\tpublic String readItems() \n\t { \n\t return itemObj.readProjects(); \n\t }", "private void getItemListById() throws ClassNotFoundException, SQLException, IOException {\n itemCodeCombo.removeAllItems();\n ItemControllerByChule itemController = new ItemControllerByChule();\n ArrayList<Item> allItem = itemController.getAllItems();\n itemCodeCombo.addItem(\"\");\n for (Item item : allItem) {\n itemCodeCombo.addItem(item.getItemCode());\n }\n itemListById.setSearchableCombo(itemCodeCombo, true, null);\n }", "public List<Inventory> getInventory();", "public List<ReturnItem> getItems() {\n return (List<ReturnItem>) get(\"items\");\n }", "public List<CatalogoGeneralDTO> getItemsList() {\n\t\treturn itemsList;\n\t}", "@Override\n\tpublic void sendItemListRequest() {\n\t\ttry {\n\t\t\tString xml = \"\";\n\t\t\tif (this.servType.equals(SERVICE_TYPE_SOAP)){\n\t\t\t\txml = server.getItems();\n\t\t\t} else {\n\t\t\t\tWebResource itemListReqService = service.path(URI_GETITEMS);\n\t\t\t\txml = itemListReqService.accept(MediaType.TEXT_XML).get(String.class);\n\t\t\t}\n\t\t\n\t\t\tArrayList<ItemObject> items = XMLParser.parseToListItemObject(xml);\n\t\t\tgui.setTableContent(items);\n\t\t} catch (ParserConfigurationException | SAXException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClientHandlerException ex){\n\t\t\tex.printStackTrace();\n\t\t\tsetOKDialog(\"Error\", \"The RESTFul server is not responding!!\");\n\t\t} catch (WebServiceException ex){\n\t\t\tex.printStackTrace();\n\t\t\tsetOKDialog(\"Error\", \"The SOAP-RPC server is not responding!!\");\n\t\t}\n\t}", "@Test\n public void searchCatalogItemsTest() throws ApiException {\n List<String> keywords = null;\n List<String> marketplaceIds = null;\n List<String> includedData = null;\n List<String> brandNames = null;\n List<String> classificationIds = null;\n Integer pageSize = null;\n String pageToken = null;\n String keywordsLocale = null;\n String locale = null;\n ItemSearchResults response = api.searchCatalogItems(keywords, marketplaceIds, includedData, brandNames, classificationIds, pageSize, pageToken, keywordsLocale, locale);\n // TODO: test validations\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 }", "@Override\r\n\tpublic List<Catalog> getCatalogList(Catalog catalog) throws Exception {\n\t\treturn catalogDAO.getCatalogList(catalog);\r\n\t}", "private static void getListTest() {\n\t\tList<CartVo> list=new CartDao().getList();\r\n\t\t\r\n\t\tfor(CartVo cartVo : list) {\r\n\t\t\tSystem.out.println(cartVo);\r\n\t\t}\r\n\t}", "@RequestMapping(method = RequestMethod.GET, value = \"{sku}\")\n\tpublic ResponseEntity<?> getCatalogItem(@PathVariable String sku) {\n\t\tBraveSpanContext openTracingContext = getTracingContext();\n\t\tio.opentracing.Span span = tracer.buildSpan(\"GetCatalogByIdFromService\").asChildOf(openTracingContext)\n\t\t\t\t.withTag(\"Description\", \"Get Catalog Item\")\n\t\t\t\t.withTag(\"http_request_url\", request.getRequestURI()).start();\n\t\tbrave.Span braveSpan = ((BraveSpan) span).unwrap();\n\t\tbraveSpan.kind(Kind.SERVER);\n\t\tSummary.Timer requestTimer = Prometheus.requestLatency.startTimer();\n\t\ttry {\n\t\t\tPrometheus.getCounters.inc();\n\t\t\tPrometheus.inProgressRequests.inc();\n\t\t\tio.opentracing.Span mongospan = tracer.buildSpan(\"MongoService\").asChildOf(span)\n\t\t\t\t\t.withTag(\"Description\", \"MongoDB Service Call\").start();\n\t\t\tbrave.Span braveMongoSpan = ((BraveSpan) mongospan).unwrap();\n\t\t\tCatalog catalogItem = service.getCatalogItem(sku, mongospan);\n\t\t\tbraveMongoSpan.finish();\n\t\t\tif (catalogItem == null) {\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t\t} else {\n\t\t\t\treturn new ResponseEntity<>(catalogItem, HttpStatus.OK);\n\t\t\t}\n\t\t} catch (Exception exc) {\n\t\t\tPrometheus.requestFailures.inc();\n\t\t\tlog.error(\"Error in getCatalogItem\", exc);\n\t\t\tspan.setTag(\"error\", exc.getMessage());\n\t\t\treturn new ResponseEntity<>(exc.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t} finally {\n\t\t\trequestTimer.observeDuration();\n\t\t\tPrometheus.inProgressRequests.dec();\n\t\t\tspan.finish();\n\t\t}\n\t}", "@GET\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response getCpus() {\n\t\tList<CPU> itemList = ItemList.getInstance().getItemList();\n\t\treturn Response.ok(itemList).build();\n\t}", "public static ArrayList selectCatalogCategory() {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n PreparedStatement ps2 = null;\n ResultSet rs = null;\n ResultSet rs2 = null;\n ArrayList<String> p = new ArrayList();\n int count = 0;\n\n String query = \"SELECT DISTINCT catalogCategory FROM Product \"\n + \" ORDER BY catalogCategory\";\n \n String query2 = \"SELECT DISTINCT catalogCategory FROM Product \"\n + \" ORDER BY catalogCategory\";\n \n try {\n ps = connection.prepareStatement(query);\n ps2 = connection.prepareStatement(query2);\n rs = ps.executeQuery();\n rs2 = ps2.executeQuery();\n \n while( rs2.next() ) {\n ++count;\n } \n ////////////For test purposes only //System.out.println(\"DBSetup @ line 363 \" + count); \n for ( int i = 0; i < count; i++ ) {\n if ( rs.next() ) {\n \n p.add(rs.getString(\"catalogCategory\"));\n System.out.println(\"DBSetup @ line 370 \" + p.get(i));\n }\n }\n System.out.println(p.size());\n return p;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }", "private void getMasechtotListFromServer() {\n\n\n RequestManager.getMasechtotList().subscribe(new Observer<Result<MasechetList>>() {\n @Override\n public void onSubscribe(Disposable d) {\n\n }\n\n @Override\n public void onNext(Result<MasechetList> masechetListResult) {\n\n saveMasechtotList(masechetListResult.getData());\n mMasechtotList = masechetListResult.getData();\n\n }\n\n @Override\n public void onError(Throwable e) {\n\n }\n\n @Override\n public void onComplete() {\n\n }\n });\n\n\n }", "public ArrayList<Collectable> getItems(){\n return items;\n }", "private static ArrayList<ConfigurationItem> getConfigItems(HttpResponse<String> response){\n\t\tArrayList<ConfigurationItem> items;\n\t\ttry {\n\t\t\titems = new ObjectMapper().readValue(response.body(), new TypeReference<ArrayList<ConfigurationItem>>(){});\n\t\t\treturn items;\n\t\t} catch (JsonMappingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (JsonProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public List<ShelfItem> getAll(String username, Integer from, Integer to);", "@GET(Url.END_POINT)\n Call<ArrayList<Recipe>> getRecipes();", "@GET\n\t@Path(\"/carrocerias\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic ArrayList<CarroceriaDTO> listarCarrocerias(){\n\t\tSystem.out.println(\"ini: listarCarrocerias()\");\n\t\t\n\t\tCarroceriaService tipotService = new CarroceriaService();\n\t\tArrayList<CarroceriaDTO> lista = tipotService.ListadoCarroceria();\n\t\t\n\t\tif (lista == null) {\n\t\t\tSystem.out.println(\"Listado Vacío\");\n\t\t}else {\n\t\t\tSystem.out.println(\"Consulta Exitosa\");\n\t\t}\n\n\t\tSystem.out.println(\"fin: listarCarrocerias()\");\n\t\t\n\t\treturn lista;\n\t}", "private void handleListOperation() {\n\n Client client = ClientBuilder.newBuilder().build();\n WebTarget webTarget = client.target(\"http://localhost:8080/pa165/rest/bricks/\");\n webTarget.register(auth);\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n Response response = invocationBuilder.get();\n\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n List<BrickDto> brickDtoList = response.readEntity(new GenericType<List<BrickDto>>() {\n });\n System.out.println(\"Number of bricks returned: \" + brickDtoList.size());\n\n for (BrickDto b : brickDtoList) {\n System.out.println(b);\n }\n } else {\n System.out.println(\"Error code:\" + response.getStatus());\n }\n }", "public List<Product> getProductList(){\n List<Product> productList = mongoDbConnector.getProducts();\n return productList;\n }", "public List<Stockitem> getItem() {\n\t\treturn (ArrayList<Stockitem>) stockitemDAO.findAllStockitem();\n\t}", "public List<Item> getItems(){\n\t\treturn data;\n\t}", "@Override\n\tpublic void listAllItems() {\n\t\t\n\t}", "public List<Compte> getComptesClient(int numeroClient);", "List<Product> getAllProducts();", "List<Product> getAllProducts();", "List<Product> getAllProducts();", "public String getList_Base();", "private void get_products_search()\r\n\r\n {\n MakeWebRequest.MakeWebRequest(\"get\", AppConfig.SALES_RETURN_PRODUCT_LIST,\r\n AppConfig.SALES_RETURN_PRODUCT_LIST + \"[\" + Chemist_ID + \",\"+client_id +\"]\", this, true);\r\n\r\n// MakeWebRequest.MakeWebRequest(\"out_array\", AppConfig.SALES_RETURN_PRODUCT_LIST, AppConfig.SALES_RETURN_PRODUCT_LIST,\r\n// null, this, false, j_arr.toString());\r\n //JSONArray jsonArray=new JSONArray();\r\n }", "public List<T> getItems() {\n if (items == null) {\n items = this.ejbFacade.findAll();\n }\n return items;\n }", "public interface ICategoryService {\n ServerResponse<List<Category>> selectAll();\n}", "@Override\r\n\tpublic String list() {\n\t\tList<HeadLine> dataList=new ArrayList<HeadLine>();\r\n\t\tPagerItem pagerItem=new PagerItem();\r\n\t\tpagerItem.parsePageSize(pageSize);\r\n\t\tpagerItem.parsePageNum(pageNum);\r\n\t\t\r\n\t\tLong count=headLineService.count();\r\n\t\tpagerItem.changeRowCount(count);\r\n\t\t\r\n\t\tdataList=headLineService.pager(pagerItem.getPageNum(), pagerItem.getPageSize());\r\n\t\tpagerItem.changeUrl(SysFun.generalUrl(requestURI, queryString));\r\n\t\t\r\n\t\trequest.put(\"DataList\", dataList);\r\n\t\trequest.put(\"pagerItem\", pagerItem);\r\n\t\t\r\n\t\t\r\n\t\treturn \"list\";\r\n\t}" ]
[ "0.79608226", "0.74481475", "0.73677844", "0.6989684", "0.67977077", "0.6795701", "0.6783124", "0.66968215", "0.66400886", "0.66042966", "0.6581097", "0.63649726", "0.6360525", "0.6354398", "0.6336861", "0.6326319", "0.6322874", "0.6309341", "0.6281849", "0.6276583", "0.6273321", "0.6262754", "0.62366545", "0.6224932", "0.6218371", "0.619981", "0.6192711", "0.6170796", "0.6165171", "0.61581534", "0.6142705", "0.61347353", "0.6128355", "0.6119413", "0.61168724", "0.6097821", "0.6089917", "0.6083126", "0.60811526", "0.606748", "0.6049312", "0.6019119", "0.60129184", "0.60039663", "0.59997773", "0.5997057", "0.5996277", "0.5968625", "0.5963985", "0.59506744", "0.59506744", "0.5948887", "0.5923864", "0.5921326", "0.5902248", "0.5901634", "0.5901269", "0.5897979", "0.58964086", "0.58904946", "0.587778", "0.5875699", "0.5865976", "0.5858841", "0.58558255", "0.585081", "0.5845767", "0.5835157", "0.58221555", "0.58212656", "0.5820368", "0.581344", "0.58125436", "0.58120185", "0.5810554", "0.5806228", "0.57858354", "0.5780521", "0.5771597", "0.5767268", "0.57628894", "0.57616687", "0.57535857", "0.5748665", "0.5740238", "0.57388407", "0.57385945", "0.5736465", "0.57335544", "0.572557", "0.57236993", "0.5720553", "0.57149774", "0.57128394", "0.57128394", "0.57128394", "0.5710728", "0.5708311", "0.57048243", "0.56985873", "0.5693133" ]
0.0
-1
get item from catalogue server
private Future<JsonObject> fetchItem(String id) { Promise<JsonObject> p = Promise.promise(); client .get(catPort, catHost, catItemPath) .addQueryParam(ID, id) .send() .onFailure( ar -> { ar.printStackTrace(); p.fail(INTERNALERROR); }) .onSuccess( obj -> { JsonObject res = obj.bodyAsJsonObject(); if (obj.statusCode() == 200) { if (res.getString(STATUS).equals(status.SUCCESS.toString().toLowerCase())) p.complete(obj.bodyAsJsonObject().getJsonArray(RESULTS).getJsonObject(0)); } else{ if (obj.statusCode() == 404) p.fail(ITEMNOTFOUND + id); else{ LOGGER.error("failed fetchItem: " + res); p.fail(INTERNALERROR); } } }); return p.future(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CatalogItem getCatalogItemByName(String name);", "CatalogItem getItembyId(final Long id);", "@Test\n public void getCatalogItemTest() throws ApiException {\n String asin = null;\n List<String> marketplaceIds = null;\n List<String> includedData = null;\n String locale = null;\n Item response = api.getCatalogItem(asin, marketplaceIds, includedData, locale);\n // TODO: test validations\n }", "@RequestMapping(method = RequestMethod.GET, value = \"{sku}\")\n\tpublic ResponseEntity<?> getCatalogItem(@PathVariable String sku) {\n\t\tBraveSpanContext openTracingContext = getTracingContext();\n\t\tio.opentracing.Span span = tracer.buildSpan(\"GetCatalogByIdFromService\").asChildOf(openTracingContext)\n\t\t\t\t.withTag(\"Description\", \"Get Catalog Item\")\n\t\t\t\t.withTag(\"http_request_url\", request.getRequestURI()).start();\n\t\tbrave.Span braveSpan = ((BraveSpan) span).unwrap();\n\t\tbraveSpan.kind(Kind.SERVER);\n\t\tSummary.Timer requestTimer = Prometheus.requestLatency.startTimer();\n\t\ttry {\n\t\t\tPrometheus.getCounters.inc();\n\t\t\tPrometheus.inProgressRequests.inc();\n\t\t\tio.opentracing.Span mongospan = tracer.buildSpan(\"MongoService\").asChildOf(span)\n\t\t\t\t\t.withTag(\"Description\", \"MongoDB Service Call\").start();\n\t\t\tbrave.Span braveMongoSpan = ((BraveSpan) mongospan).unwrap();\n\t\t\tCatalog catalogItem = service.getCatalogItem(sku, mongospan);\n\t\t\tbraveMongoSpan.finish();\n\t\t\tif (catalogItem == null) {\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t\t} else {\n\t\t\t\treturn new ResponseEntity<>(catalogItem, HttpStatus.OK);\n\t\t\t}\n\t\t} catch (Exception exc) {\n\t\t\tPrometheus.requestFailures.inc();\n\t\t\tlog.error(\"Error in getCatalogItem\", exc);\n\t\t\tspan.setTag(\"error\", exc.getMessage());\n\t\t\treturn new ResponseEntity<>(exc.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t} finally {\n\t\t\trequestTimer.observeDuration();\n\t\t\tPrometheus.inProgressRequests.dec();\n\t\t\tspan.finish();\n\t\t}\n\t}", "public Item get(int index) {\r\n\t\treturn catalog.get(index);\r\n\t}", "public Object get(String itemName);", "public void getRemoteItems() {\n url = getAllItemsOrderedByCategory;\n params = new HashMap<>();\n params.put(param_securitykey, param_securitykey);\n\n if (ApiHelper.checkInternet(mContext)) {\n mApiHelper.getItems(mIRestApiCallBack, true, url, params);\n } else {\n //Toast.makeText(mContext, mContext.getString(R.string.noInternetConnection), Toast.LENGTH_LONG).show();\n mIRestApiCallBack.onNoInternet();\n CacheApi cacheApi = loadCacheData(url, params);\n mSqliteCallBack.onDBDataObjectLoaded(cacheApi);\n }\n\n }", "public Item retrieveItem(Connection conn, int item_no) {\r\n\t\ttry {\r\n\t\t\tItem item = new Item();\r\n\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\tResultSet rset = stmt.executeQuery(\"select * from item_XXXX where item_no=\" + item_no);\r\n\t\t\twhile (rset.next()) {\r\n\t\t\t\titem.setItemNo(rset.getInt(1));\r\n\t\t\t\titem.setDescription(rset.getString(2));\r\n\t\t\t\tString category = rset.getString(3);\r\n\t\t\t\titem.setCategory(Category.valueOf(category));\r\n\t\t\t\titem.setPrice(rset.getInt(4));\r\n\t\t\t\titem.setQuantity(rset.getInt(5));\r\n\t\t\t}\r\n\t\t\treturn item;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public IFuture<ItemInfo[]> getCatalog()\n\t{\n\t\tfinal Future<ItemInfo[]> ret = new Future<ItemInfo[]>();\n\t\tShopCapa shop = (ShopCapa)capa.getPojoCapability();\n\t\tret.setResult(shop.getCatalog().toArray(new ItemInfo[shop.getCatalog().size()]));\n\t\treturn ret;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\tCatalog chn = catalogs_.get(position);\n\t\treturn chn;\n\t}", "List<CatalogItem> getAllCatalogItems();", "private String getCatalog(String myURl) throws IOException{\r\n InputStream inputStreamFromServer = null;\r\n String responseAsString = null;\r\n try {\r\n //Creates and configures the HttpURLConnection\r\n URL url = new URL(myURl);\r\n HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();\r\n httpURLConnection.setRequestMethod(\"GET\");\r\n httpURLConnection.setConnectTimeout(15000);\r\n httpURLConnection.setDoInput(true);\r\n\r\n //Starts the query\r\n httpURLConnection.connect();\r\n\r\n //gets response code\r\n int responseCode = httpURLConnection.getResponseCode();\r\n QuantityDictionay.debugLog(\"The response code is: \"+responseCode);\r\n\r\n //gets the connection Input Stream\r\n inputStreamFromServer = httpURLConnection.getInputStream();\r\n\r\n //Convert the input stream to String\r\n responseAsString= inputStreamToString(inputStreamFromServer);\r\n\r\n }catch (IOException e){\r\n\r\n e.printStackTrace();\r\n QuantityDictionay.debugLog(\"Exception thrown on GetProductCatalogTask.getCatalog\");\r\n\r\n }\r\n return responseAsString;\r\n }", "public void getRemoteItemById(long item_id) {\n url = Constants.getItemById;\n params = new HashMap<>();\n params.put(param_item_id, \"\" + item_id);\n\n if (ApiHelper.checkInternet(mContext)) {\n mApiHelper.getItemById(item_id, mIRestApiCallBack, true, url, params);\n } else {\n //Toast.makeText(mContext, mContext.getString(R.string.noInternetConnection), Toast.LENGTH_LONG).show();\n mIRestApiCallBack.onNoInternet();\n CacheApi cacheApi = loadCacheData(url, params);\n mSqliteCallBack.onDBDataObjectLoaded(cacheApi);\n }\n\n }", "InventoryItem getInventoryItem();", "public static Item getItemByName(String name) {\n HttpRequest request = HttpRequest.newBuilder().GET().uri(URI.create(String.format(\"http://localhost:8080/item/name/%s\", name))).setHeader(\"Cookie\", Authenticator.SESSION_COOKIE).build();\n HttpResponse<String> response = null;\n try {\n response = client.send(request, HttpResponse.BodyHandlers.ofString());\n } catch (Exception e) {\n e.printStackTrace();\n //return \"Communication with server failed\";\n }\n if (response.statusCode() != 200) {\n System.out.println(\"Status: \" + response.statusCode());\n }\n\n ObjectMapper mapper = new ObjectMapper();\n mapper.registerModule(new JavaTimeModule());\n Item item = null;\n // TODO handle exception\n try {\n item = mapper.readValue(response.body(), new TypeReference<Item>() {\n });\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return item;\n }", "public static Item getItem( ) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n \n\tString query = \"select * from Item\";\n\ttry {\n ps = connection.prepareStatement(query);\n\t ResultSet rs = null;\n\t rs = ps.executeQuery();\n \n\t Item item = new Item();\n \n\t if (rs.next()) {\n\t\titem.setAttribute(rs.getString(1));\n\t\titem.setItemname(rs.getString(2));\n\t\titem.setDescription(rs.getString(3));\n\t\titem.setPrice(rs.getDouble(4));\n\t }\n\t rs.close();\n\t ps.close();\n\t return item;\n\t} catch (java.sql.SQLException sql) {\n\t sql.printStackTrace();\n\t return null;\n\t}\n }", "@RequestMapping(method = RequestMethod.GET)\n\tpublic ResponseEntity<?> getCatalogItems() {\n\t\tBraveSpanContext openTracingContext = getTracingContext();\n\t\tio.opentracing.Span span = tracer.buildSpan(\"GetCatalogFromService\").asChildOf(openTracingContext)\n\t\t\t\t.withTag(\"Description\", \"Get All Catalogs\")\n\t\t\t\t.withTag(\"http_request_url\", request.getRequestURI()).start();\n\t\tbrave.Span braveSpan = ((BraveSpan) span).unwrap();\n\t\tbraveSpan.kind(Kind.SERVER);\n\n\t\tSummary.Timer requestTimer = Prometheus.requestLatency.startTimer();\n\t\ttry {\n\t\t\tlog.debug(\"Calling getCatalogItems() method of catalog controller is called\");\n\t\t\tPrometheus.getCounters.inc();\n\t\t\tPrometheus.inProgressRequests.inc();\n\t\t\tio.opentracing.Span mongospan = tracer.buildSpan(\"MongoService\").asChildOf(span)\n\t\t\t\t\t.withTag(\"Description\", \"MongoDB Service Call\").start();\n\t\t\tbrave.Span braveMongoSpan = ((BraveSpan) mongospan).unwrap();\n\t\t\tlog.debug(\"Calling getCatalogItems() method of catalog service\");\n\t\t\tList<Catalog> catalog = service.getCatalogItems(mongospan);\n\t\t\tbraveMongoSpan.finish();\n\t\t\tif (catalog == null) {\n\t\t\t\tlog.debug(\"No records found. Returning NOT_FOUND status.\");\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t\t} else {\n\t\t\t\tlog.debug(\"Returning list of items.\");\n\t\t\t\treturn new ResponseEntity<>(catalog, HttpStatus.OK);\n\t\t\t}\n\t\t} catch (Exception exc) {\n\t\t\tPrometheus.requestFailures.inc();\n\t\t\tlog.error(\"Error in getCatalogItems\", exc);\n\t\t\tspan.setTag(\"error\", exc.getMessage());\n\t\t\treturn new ResponseEntity<>(exc.toString(), HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t} finally {\n\t\t\trequestTimer.observeDuration();\n\t\t\tPrometheus.inProgressRequests.dec();\n\t\t\tspan.finish();\n\t\t}\n\t}", "@Override\n public Item get(long idItem) throws EntityNotFound;", "@Path(\"showitem\")\n @GET\n @Produces(MediaType.TEXT_PLAIN)\n public String getItem(@QueryParam(\"jsonpcallback\") String jsonpcallback) {\n return jsonpcallback + \"(\" + is.getAllItems().toJSONString() + \")\";\n }", "public UrlObject getItem(Context context, String url) {\n GlobalContextWrapper.bindContext(context);\n if (context == null || url == null) {\n throw new RuntimeException(\"parameter can't be null!\");\n }\n DatabaseConnectivity connectivity =\n new DatabaseConnectivity(context,\n mAuthority,\n mClass);\n Query query = new Query(mClass);\n ExpressionToken selToken =\n UrlObject.COLUMN_URL_PATTERN.eq(url);\n String str = selToken.toString();\n if (selToken != null) {\n query.setSelection(selToken);\n }\n List<DatabaseObject> objects = connectivity.query(query);\n if (objects == null || objects.size() <= 0) {\n throw new RuntimeException(\"query result is null!\");\n }\n\n GlobalContextWrapper.unbindContext(context);\n return (UrlObject) objects.get(0);\n }", "Catalog getCatalog();", "Catalog getCatalog();", "protected String fetchItem( String str_url ) {\n try {\n // assemble the string and the search request\n StringBuilder response = new StringBuilder();\n URL url = new URL(str_url);\n\n // make the connection\n HttpURLConnection httpconn = (HttpURLConnection) url.openConnection();\n\n // did it do ok?\n if ( httpconn.getResponseCode() == HttpURLConnection.HTTP_OK ) {\n BufferedReader input = new BufferedReader(\n new InputStreamReader(httpconn.getInputStream()), 8192);\n String strLine = null;\n while ((strLine = input.readLine()) != null) {\n // have more data\n response.append(strLine);\n response.append(\"\\n\");\n }\n input.close();\n return response.toString();\n }\n } catch ( IOException e ) {\n return e.getMessage();\n }\n return \"\";\n }", "public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}", "@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}", "public void invokeViewItem(String itemToSearch){\n AsyncHttpClient client = new AsyncHttpClient();\n client.setBasicAuth(globalUsername, globalPassword);\n client.get(\"http://\" + globalURL + \"/Auction_Server/items/\"+itemToSearch, new AsyncHttpResponseHandler() { // deleted params\n\n @Override\n public void onSuccess(int i, Header[] headers, byte[] bytes)\n {\n try {\n String response = new String(bytes, \"UTF-8\");\n JSONObject obj = new JSONObject(response);\n String itemId = obj.get(\"item_id\").toString();\n String itemName = obj.get(\"item_name\").toString();\n String itemCategory = obj.get(\"item_category\").toString();\n String itemDescription = obj.get(\"item_desc\").toString();\n String itemStartPrice = obj.get(\"item_start_price\").toString();\n String itemLastBidPrice = obj.get(\"item_latest_bid_price\").toString();\n String itemPictureString = \"\";\n if (!obj.isNull(\"item_picture\")) { // displaying the picture from string to byte[] to bitmap and display\n itemPictureString = obj.get(\"item_picture\").toString();\n byte[] itemPictureBytes = new BASE64Decoder().decodeBuffer(itemPictureString);\n Bitmap itemPictureBitmap = BitmapFactory.decodeByteArray(itemPictureBytes, 0, itemPictureBytes.length);\n ImageView showItemPicture = (ImageView) findViewById(R.id.viewItemImageViewId);\n showItemPicture.setImageBitmap(itemPictureBitmap);\n }\n TextView fillUserInfo = (TextView) findViewById(R.id.viewItemInfoTextViewId);\n fillUserInfo.setText(\"Item Name: \" + obj.get(\"item_name\") + \"\\nItem Description: \" + obj.get(\"item_desc\") +\n \"\\nCategory: \" + obj.get(\"item_category\") + \"\\nCurrent Bid: \" + obj.get(\"item_latest_bid_price\") +\n \"\\nStarting price: \" + obj.get(\"item_start_price\") + \"\\nNumber of Bids: \" + obj.get(\"item_num_bids\") +\n \"\\nLatest bid username: \" + obj.get(\"item_latest_bid_username\") + \"\\nLast Bid Time: \" + obj.get(\"item_latest_bid_time\").toString().substring(0,16));\n } catch (Exception e) {\n Toast.makeText(getApplicationContext(), \"Error Occured [Server's JSON response might be invalid]!\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n }\n\n @Override\n public void onFailure(int i, Header[] headers, byte[] bytes, Throwable throwable)\n {\n String response = \"\";\n try {\n response = new String(bytes, \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n Toast.makeText(getApplicationContext(), response, Toast.LENGTH_LONG).show();\n }\n\n });\n }", "public Catalog getCatalog();", "public jkt.hms.masters.business.MasStoreItem getItem () {\n\t\treturn item;\n\t}", "public Item getItemById(Integer itemId);", "public Item getItem(long idItem) throws ItemNotFound;", "@GetMapping(\"/items/{item_id}\")\n\tpublic ResponseEntity<Item> getItemById(@PathVariable(value=\"item_id\") Long item_id){ \n\t\tItem item = itemDAO.findOne(item_id);\n\t\t\n\t\tif(item == null) {\n\t\t\treturn ResponseEntity.notFound().build();\n\t\t}\n\t\treturn ResponseEntity.ok().body(item);\n\t}", "ShoppingItem getShoppingItemByGuid(String itemGuid);", "@Override\n\tpublic Object getItem(int arg0) {\n\t\treturn ads.get(arg0);\n\t}", "public Product get(String id);", "public BusinessObject getItem(Package pkg, String id);", "ICpItem getCpItem();", "@Override\n public Item retrieveSingleItem(int itemNo) throws VendingMachinePersistenceException {\n loadItemFile();\n return itemMap.get(itemNo);\n }", "public Object getItem(String key);", "public void retrieveProductFromDatabase(){\r\n // retrieve product from the database here\r\n System.out.println(\"Product Retrieved using ID --> \" + this.productId);\r\n \r\n }", "io.opencannabis.schema.commerce.OrderItem.Item getItem(int index);", "public static ResultSet getItemByCategory(String cat) {\n try {\n PreparedStatement st = conn.prepareStatement(\"SELECT itemID, ownerID, Name, status, description, category, image1,image2,image3,image4 FROM iteminformation WHERE category=?\");\n st.setString(1, cat);\n ResultSet rs = st.executeQuery();\n\n return rs;\n\n } catch (SQLException ex) {\n Logger.getLogger(itemDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "public interface CatalogueClient {\n\n\tList<Exoplanet> getCatalogue();\n\n}", "protected ResourceReference getItem()\n\t{\n\t\treturn ITEM;\n\t}", "public ProductCatalog getCatalog() throws RemoteException;", "public Object getItem(Node itemNode) throws XmlRecipeException;", "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 void GetOneItem( Standard_Transient anentity) {\n OCCwrapJavaJNI.Interface_EntityIterator_GetOneItem(swigCPtr, this, Standard_Transient.getCPtr(anentity) , anentity);\n }", "public void getRemoteItemsByCategoryId(long category_id) {\n url = getAllItemsByCategory;\n params = new HashMap<>();\n params.put(param_category_id, \"\" + category_id);\n\n if (ApiHelper.checkInternet(mContext)) {\n mApiHelper.getItemsByCategory(category_id, mIRestApiCallBack, true, url, params);\n } else {\n //Toast.makeText(mContext, mContext.getString(R.string.noInternetConnection), Toast.LENGTH_LONG).show();\n mIRestApiCallBack.onNoInternet();\n CacheApi cacheApi = loadCacheData(url, params);\n mSqliteCallBack.onDBDataObjectLoaded(cacheApi);\n }\n\n }", "NewsItem obtainNewsItemById(long id) throws ObjectRetrievalFailureException;", "CodeableConcept getItem();", "public @NotNull Item findItem(@NotNull final Identifier identifier) throws ItemNotFoundException, BazaarException;", "NoxItemCatalog getNoxItemCatalog() {\n return noxItemCatalog;\n }", "private Item getNewItem(String gtin) throws IOException {\n\n\t\tlog.info(\"Getting Item with Barcode: \" + gtin);\n\t\tGson gson = new Gson();\n\t\tURL url = new URL(\"https://api.outpan.com/v2/products/\" + gtin + \"?apikey=e13a9fb0bda8684d72bc3dba1b16ae1e\");\n\n\t\tStringBuilder temp = new StringBuilder();\n\t\tScanner scanner = new Scanner(url.openStream());\n\n\t\twhile (scanner.hasNext()) {\n\t\t\ttemp.append(scanner.nextLine());\n\t\t}\n\t\tscanner.close();\n\n\t\tItem item = new Item(gson.fromJson(temp.toString(), Item.class));\n\t\t\n\t\tif (item.name != null) {\n\t\t\treturn item;\n\t\t} else {\n\t\t\tthrow new NoNameForProductException();\n\t\t}\n\t}", "public Item getItem(final String pItem){return this.aItemsList.getItem(pItem);}", "@GET\n @Path( \"items\")\n @Produces(MediaType.APPLICATION_JSON)\n public BigSpaceItem getItemAt( @QueryParam(\"x\") String x, @QueryParam(\"y\") String y, @QueryParam(\"layer\") String layer) throws Exception {\n\n BigSpaceItem item = locatorService.find( new BigDecimal( x), new BigDecimal( y), layer);\n\n /* if( item==null){\n throw new NotFoundException();\n }*/\n //BigSpaceItem item = new BigSpaceItem( \"test\", new BigDecimal(\"0.3\"), new BigDecimal(\"0.3\"), new BigDecimal(\"0.2\"), new BigDecimal(\"0.4\"), layer);\n return item;\n }", "@RequestMapping(method=RequestMethod.GET, value = \"/item/{id}\", produces = \"application/json\")\n public Item getItem(@PathVariable (name = \"id\") UUID id)\n {\n return this.itemRepository.getItem(id);\n }", "ProductPurchaseItem getProductPurchaseItemPerId(long sprcId);", "List<InventoryItem> getInventory(int appId);", "Item findById(String id);", "List<CatalogItem> getAllCatalogItemsByType(Long type_id);", "private ClothingItem readItem() {\n System.out.println(\"Read item {id,name,designer,price}\");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n String name = bufferRead.readLine();\n String designer = bufferRead.readLine();\n int price = Integer.parseInt(bufferRead.readLine());\n ClothingItem item = new ClothingItem(name, designer, price);\n item.setId(id);\n\n return item;\n\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n return null;\n }", "@Override\n\tpublic ThematicItem getItem(Long id) {\n\t\treturn repository.getItem(id);\n\t}", "@Override\n\t\tpublic Object getItem(int arg0) {\n\t\t\treturn books.get(arg0);\n\t\t}", "List<InventoryItem> getInventory(String username, int appId);", "@Test \n\tpublic void testGetBasketItem() throws Exception {\n\t\tBBBBasket basket = AccountHelper.getInstance().getBasket();\n\t\t\n\t\tif(basket == null || basket.items == null || basket.items.length < 1) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tString id = basket.items[0].id;\n\t\t\n\t\tBBBRequest request = BBBRequestFactory.getInstance().createGetBasketItemRequest(id);\n\t\tString expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), String.format(PATH_MY_BASKETS_ITEMS_, id) );\n\t\tassertEquals(expectedUrl, request.getUrl());\n\t\t\n\t\tBBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request);\n\t\tbasketItemHandler.receivedResponse(response);\n\t}", "List<InventoryItem> getInventory(String username);", "public Item getItem() {\n return Bootstrap.getInstance().getItemRepository().fetchAll().stream()\n .filter(i -> i.getId() == this.itemId)\n .findFirst().orElse(null);\n }", "Object getProduct();", "public Objects getObject(String itemName)\n {\n return items.get(itemName);\n }", "public int getStock(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.stock;\n}\n}\nreturn -1;\n}", "public SpItem getItem() {\n return _spItem;\n }", "public Item getItem(Long id)\n {\n return auctionManager.getItem(id);\n }", "String getTheirProductId();", "public Item getItem(String typeItem){\r\n if(typeItem.equals(\"coeur\")){\r\n Item coeur = new Coeur();\r\n return coeur;\r\n } else if(typeItem.equals(\"potionvie\")){\r\n Item potion = new Potion();\r\n return potion;\r\n } else if(typeItem.equals(\"hexaforce\")){\r\n Item hexa = new Hexaforce();\r\n return hexa;\r\n } else {\r\n return null;\r\n }\r\n }", "@Override\r\n\tpublic Item getItem(String absPath) throws PathNotFoundException,\r\n\t\t\tRepositoryException {\n\t\treturn null;\r\n\t}", "Identifiable item();", "public Inventory searchForItem (TheGroceryStore g, Inventory i, String key);", "@Override\n public List<Item> viewAllItems() {\n // calls List<Item> itemRepo.findCatalog();\n return itemRepo.findCatalog();\n }", "public Item getItem() { \n return myItem;\n }", "@Override\r\n\tpublic Object getItem(int arg0) \r\n\t{\n\t\treturn channels.get(arg0);\r\n\t}", "public Catalogue getCatalogue() {\n return catalogue;\n }", "public native String getItem(Number index);", "List<Item> getItems(IDAOSession session);", "public ItemCategory getCategory();", "void getPackageCatalogue(PackageCatalogueRetrieved callback);", "public static List<Item> getItems() {\n\n HttpRequest request = HttpRequest.newBuilder().GET().uri(URI.create(\"http://localhost:8080/item/all\")).setHeader(\"Cookie\", Authenticator.SESSION_COOKIE).build();\n HttpResponse<String> response = null;\n try {\n response = client.send(request, HttpResponse.BodyHandlers.ofString());\n } catch (Exception e) {\n e.printStackTrace();\n //return \"Communication with server failed\";\n }\n if (response.statusCode() != 200) {\n System.out.println(\"Status: \" + response.statusCode());\n }\n\n ObjectMapper mapper = new ObjectMapper();\n mapper.registerModule(new JavaTimeModule());\n List<Item> items = null;\n // TODO handle exception\n try {\n items = mapper.readValue(response.body(), new TypeReference<List<Item>>(){});\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return items;\n }", "public static ArrayList<InventoryItem> getInventoryItems() {\n\n String itemUrl = REST_BASE_URL + ITEMS;\n String inventoryUrl = REST_BASE_URL + INVENTORIES;\n String availableUrl = REST_BASE_URL + INVENTORIES + AVAILABLE + CATEGORIZED;\n\n // List of items\n ArrayList<InventoryItem> items = new ArrayList<>();\n ArrayList<String> itemNames = new ArrayList<>();\n\n URL url = null;\n\n /* Fetch items from \"items\" table. */\n try {\n url = new URL(itemUrl);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n JSONArray itemJsonArray = null;\n try {\n Log.d(TAG, \"getInventoryItems: getting items\");\n itemJsonArray = getResponseFromHttpUrl(url);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n // Store each item into <items>. Store each item name into <itemNames>.\n for (int i = 0; i < itemJsonArray.length(); i++) {\n JSONObject jo = (JSONObject) itemJsonArray.get(i);\n InventoryItem newItem = new InventoryItem(\n jo.getString(ITEM_IMAGE_URL),\n jo.getString(ITEM_NAME),\n jo.getString(ITEM_DESCRIPTION),\n 0,\n 0);\n items.add(newItem);\n itemNames.add(jo.getString(ITEM_NAME));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n /* Fetch inventory items from \"inventories\" */\n try {\n url = new URL(inventoryUrl);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n JSONArray jaResult = null;\n try {\n Log.d(TAG, \"getInventoryItems: getting ivnentories\");\n jaResult = getResponseFromHttpUrl(url);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n for (int i = 0; i < jaResult.length(); i++) {\n JSONObject jo = (JSONObject) jaResult.get(i);\n int index = itemNames.indexOf(jo.getString(ITEM_NAME));\n if (index > -1) {\n InventoryItem currItem = items.get(index);\n currItem.setItemQuantity(currItem.getItemQuantity()+1);\n items.set(index, currItem);\n } else {\n // TODO: throw an exception here?\n Log.e(TAG, \"getInventoryItems: There is an item in the inventory but not in the item table!\");\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n /* get inventory stocks from \"/available/categorized\" */\n try {\n url = new URL(availableUrl);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n\n try {\n Log.d(TAG, \"getInventoryItems: getting inventory stocks\");\n jaResult = getResponseFromHttpUrl(url);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n for (int i = 0; i < jaResult.length(); i++) {\n JSONObject jo = (JSONObject) jaResult.get(i);\n int index = itemNames.indexOf(jo.getString(ITEM_NAME));\n if (index > -1) {\n InventoryItem currItem = items.get(index);\n currItem.setItemStock(jo.getInt(ITEM_COUNT));\n items.set(index, currItem);\n } else {\n // TODO: throw an exception here?\n Log.e(TAG, \"getInventoryItems: There is an item in the stock but not in the item table!\");\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return items;\n }", "ProductPurchaseItem getSupplierProductPurchaseItemPerCatalogNo(long suppId, String catalogNo);", "CafeProduct getProductById(final Integer productId);", "public void getitem(Writer bwout, File item) throws Exception {\n \tFileAuthInfo i = (FileAuthInfo) item.getAuthInfo();\n HttpResponse response = client.get(new URI(config.itemurl()+\"/\"+i.itemID+\"/\"+i.fileName+\"?token=\"+i.authToken));\n this.read_http_entity(response.getEntity(), bwout);\n }", "@RequestMapping(value = \"/retrieve\", method = RequestMethod.POST)\n\t@ResponseBody\n\tString retrieveItems(HttpServletRequest request, HttpServletResponse response) {\n\n\t\t//Get the Logged in User\n\t\tString name = getLoggedUser();\n\n\t\tRetrieveItems ri = new RetrieveItems(env);\n\t\tString type = request.getParameter(\"type\");\n\n\t\t//Pass back all data from the database\n\t\tString xml=\"\";\n\n\t\tif (type.equals(\"active\")) {\n\t\t\txml = ri.getItemsDataSQL(name);\n\t\t\treturn xml;\n\t\t} else {\n\t\t\txml = ri.getArchiveData(name);\n\t\t\treturn xml;\n\t\t}\n\t}", "@Test\n public void testGetItem() throws Exception {\n System.out.println(\"getItem\");\n Integer orcamentoItemId = null;\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n OrcamentoService instance = (OrcamentoService)container.getContext().lookup(\"java:global/classes/OrcamentoService\");\n Orcamentoitem expResult = null;\n Orcamentoitem result = instance.getItem(orcamentoItemId);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public static DropdownItem getItemForRegimen(Connection conn, Long itemId) throws ServletException, SQLException, ObjectNotFoundException {\r\n \tDropdownItem item = null;\r\n \tString sql = \"select item.id AS dropdownId, item_group.short_name || ': ' || item.name AS dropdownValue \" +\r\n \t\t\t\"FROM item,item_group WHERE item.ITEM_GROUP_ID = item_group.ID \" +\r\n \t\t\t\"AND item.id = ?\";\r\n \tArrayList values = new ArrayList();\r\n \tvalues.add(itemId);\r\n \titem = (DropdownItem) DatabaseUtils.getBean(conn, DropdownItem.class, sql, values);\r\n \treturn item;\r\n }", "Item getItem(int id) {\n SQLiteDatabase db = DataBaseManager.getInstance().openDatabase();\n Cursor cursor = db.query(TABLE_ITEMS, new String[]{KEY_ID,\n KEY_ARRAY_ID, KEY_NAME, KEY_DESCRIPTION},\n KEY_ID + \"=?\",\n new String[]{String.valueOf(id)}, null, null, null, null);\n Item item = null;\n if (cursor != null) {\n cursor.moveToFirst();\n\n item = new Item(Integer.parseInt(cursor.getString(KEY_INDEX)), Integer.parseInt(cursor.getString(ARRAY_INDEX)),\n cursor.getString(NAME_INDEX), cursor.getString(DESCRIPTION_INDEX));\n }\n DataBaseManager.getInstance().closeDatabase();\n // return contact\n return item;\n }", "@Override\n\tpublic ItemInfoWrap getItemInfoByItemId(long itemId) {\n\t\tString httpClientResult = HttpClientUtil.doGet(HTTPCLIENTURL + HTTPCLIENTITEMINFO + itemId);\n\t\tItemInfoWrap jsonToPojo = JsonUtils.jsonToPojo(httpClientResult, ItemInfoWrap.class);\n\t\treturn jsonToPojo;\n\t}", "public static void items(){\n\t\ttry{\n\t\t\tConnection conn = DriverManager.getConnection(url,username,password);\n\t\t\tStatement query = conn.createStatement();\n\t\t\tResultSet re = query.executeQuery(\"select * from item\");\n\t\t\tString spc = \" \";\n\t\t\twhile (re.next()){\n\t\t\t\tSystem.out.println(re.getInt(\"itemid\")+spc+re.getString(\"title\")+spc+re.getDouble(\"price\"));\n\t\t\t}\n\t\t}catch(Exception ecx){\n\t\t\tecx.printStackTrace();\n\t\t}\n\t}", "@SideOnly(Side.CLIENT)\r\n public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_)\r\n {\r\n return Item.getItemFromBlock(MainRegistry.blockCampfireUnlit);\r\n }", "public Product getProduct(long id, HttpServletRequest request) {\n RestTemplate restTemplate = new RestTemplate();\n Product product = new Product();\n String requestUrl = String.format(\"%s://%s:%d/products/\" + id, request.getScheme(), request.getServerName(), request.getServerPort());\n try {\n product = restTemplate.getForObject(requestUrl, Product.class);\n return product;\n } catch (Exception e) {\n return product;\n }\n }", "public LifeCardItem getLifeCardItemByLcId(int lcid) {\n LifeCardItem lcItem = null;\n Log.info(LifeCARDAdmin.class.getName() + \":getLifeCardItemByLcId():lcid=\" + lcid);\n LcMain lcMain = getLcMainByLcId(lcid);\n\n if (lcMain.getItem() != null) {\n try {\n lcItem = (LifeCardItem) DeSerializer.deserialize(lcMain.getItem());\n } catch (ObjectHandlerException ex) {\n Log.warning(LifeCARDAdmin.class.getName() + \":getLifeCardItemByLcId():\" + ex.getMessage());\n try {\n\n //store for later convertion\n Object oldLcItem = (Object) DeSerializer.deserialize(lcMain.getItem());\n FileOutputStream fos = new FileOutputStream(\"/tmp/LifeCardItem-\" + lcMain.getLcid() + \"-\" + System.currentTimeMillis() + \".obj\");\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(oldLcItem);\n oos.close();\n\n } catch (IOException | ObjectHandlerException ioex) {\n Logger.getLogger(LifeCARDAdmin.class.getName()).log(Level.SEVERE, null, ioex);\n }\n return null;\n }\n }\n return lcItem;\n }", "com.rpg.framework.database.Protocol.Item getItems(int index);" ]
[ "0.69724363", "0.68679243", "0.6859262", "0.6818591", "0.66364294", "0.63924694", "0.62657267", "0.62655", "0.6253712", "0.6226122", "0.62160844", "0.62157124", "0.6179127", "0.6150853", "0.61167467", "0.60665876", "0.60343975", "0.602377", "0.6010073", "0.5946806", "0.59096706", "0.59096706", "0.5885725", "0.5854452", "0.58346564", "0.5829585", "0.58207864", "0.5817395", "0.5813833", "0.5813768", "0.5781886", "0.57574785", "0.5753089", "0.5736321", "0.5722465", "0.57173204", "0.5715697", "0.56941634", "0.5692121", "0.5655596", "0.56487757", "0.56487036", "0.5627312", "0.5608872", "0.55920196", "0.55895376", "0.558893", "0.5580833", "0.55680335", "0.55600923", "0.55585337", "0.5555565", "0.55514485", "0.55497974", "0.55462027", "0.5545001", "0.55367494", "0.55351204", "0.55169296", "0.55029994", "0.550128", "0.54992765", "0.5495173", "0.54859054", "0.5481068", "0.5476041", "0.5463934", "0.54615486", "0.5458941", "0.5452313", "0.5449131", "0.5446162", "0.5439568", "0.5434669", "0.542914", "0.5428927", "0.54214466", "0.5409746", "0.54094267", "0.5397754", "0.53930265", "0.53912574", "0.5388539", "0.5381267", "0.5372886", "0.53683716", "0.53654945", "0.5364866", "0.5358366", "0.5347594", "0.53420365", "0.533609", "0.53292423", "0.5328189", "0.53187543", "0.5307408", "0.53036344", "0.53023046", "0.52923065", "0.5277039" ]
0.6628261
5
Insert item into resource/resource_group tables
private Future<Boolean> insertItemToDb(List<JsonObject> request) { Promise<Boolean> p = Promise.promise(); // stream list of Json request to get list of resource groups,id,.resource server List<JsonObject> resGrps = request.stream() .filter(obj -> obj.getJsonArray(TYPE).contains(IUDX_RES_GRP)) .collect(Collectors.toList()); List<String> emailSHA = resGrps.stream().map(e -> e.getString(PROVIDER)).collect(Collectors.toList()); // stream resGrps to get list of ResourceServers, parse to get url of server, check for // file/video, use to get resource server id // TODO // changing video and file server (.iudx.org.in) to resource server ListIterator<JsonObject> obj = resGrps.listIterator(); Map<String, String> resUrlMap = new HashMap<>(); while (obj.hasNext()) { String server = obj.next().getString(RESOURCE_SERVER); String url = server.split("/")[2]; String[] urlSplit = url.split("\\.", 2); if (!urlSplit[0].equals("catalogue") && urlSplit[1].equals(domain)) url = resUrl; resUrlMap.put(server, url); } Collector<Row, ?, Map<String, UUID>> collector = Collectors.toMap(row -> row.getString(URL), row -> row.getUUID(ID)); Future<Map<String, UUID>> resSerId = pool.withConnection( conn -> conn.preparedQuery(GET_RES_SER_ID) .collecting(collector) .execute(Tuple.of(resUrlMap.values().toArray())) .map(SqlResult::value)); Collector<Row, ?, Map<String, UUID>> providerId = Collectors.toMap(row -> row.getString(EMAIL_HASH), row -> row.getUUID(ID)); Future<Map<String, UUID>> emailHash = pool.withConnection( conn -> conn.preparedQuery(GET_PROVIDER_ID) .collecting(providerId) .execute(Tuple.of(emailSHA.toArray())) .map(SqlResult::value)); Future<List<Tuple>> item = CompositeFuture.all(resSerId, emailHash) .compose( ar -> { if (emailHash.result() == null || emailHash.result().isEmpty()) return Future.failedFuture(PROVIDER_NOT_REGISTERED); List<Tuple> tuples = new ArrayList<>(); for (JsonObject jsonObject : resGrps) { String id = jsonObject.getString(ID); UUID pid = emailHash.result().get(jsonObject.getString(PROVIDER)); String resServer = jsonObject.getString(RESOURCE_SERVER); String url = resUrlMap.get(resServer); UUID serverId = resSerId.result().get(url); tuples.add(Tuple.of(id, pid, serverId)); } return Future.succeededFuture(tuples); }); // create tuple for resource group insertion // not if empty Future<Void> resGrpEntry = item.compose( success -> { if (success.size() == 0) { LOGGER.error("failed resGrpEntry: " + "No res groups to enter"); return Future.failedFuture(INTERNALERROR); } return pool.withTransaction( conn -> conn.preparedQuery(INSERT_RES_GRP).executeBatch(success).mapEmpty()); }); List<JsonObject> res = request.stream() .filter(arr -> arr.getJsonArray(TYPE).contains(IUDX_RES)) .collect(Collectors.toList()); List<String> resGrpId = res.stream().map(e -> e.getString(RESOURCE_GROUP)).collect(Collectors.toList()); Future<Map<String, JsonObject>> resourceItemDetails = resGrpEntry.compose( ar -> { Collector<Row, ?, Map<String, JsonObject>> mapCollector = Collectors.toMap( row -> row.getString(CAT_ID), row -> new JsonObject() .put(ID, row.getUUID(ID)) .put(PROVIDER_ID, row.getUUID(PROVIDER_ID)) .put(RESOURCE_SERVER_ID, row.getUUID(RESOURCE_SERVER_ID))); // get map of resid , jsonobj by using data from resource_group table return pool.withConnection( conn -> conn.preparedQuery(GET_RES_SER_DETAIL) .collecting(mapCollector) .execute(Tuple.of(resGrpId.toArray())) .map(map -> map.value())); }); Future<List<Tuple>> resources = resourceItemDetails.compose( x -> { List<Tuple> tuples = new ArrayList<>(); for (JsonObject jsonObject : res) { String id = jsonObject.getString(RESOURCE_GROUP); String cat_id = jsonObject.getString(ID); UUID pId = UUID.fromString(x.get(id).getString(PROVIDER_ID)); UUID rSerId = UUID.fromString(x.get(id).getString(RESOURCE_SERVER_ID)); UUID rId = UUID.fromString(x.get(id).getString(ID)); tuples.add(Tuple.of(cat_id, pId, rSerId, rId)); } return Future.succeededFuture(tuples); }); resources .compose( success -> { return pool.withTransaction( conn -> conn.preparedQuery(INSERT_RES).executeBatch(success).mapEmpty()); }) .onFailure( failureHandler -> { failureHandler.printStackTrace(); p.fail(failureHandler.getLocalizedMessage()); }) .onSuccess(success -> p.complete(true)); return p.future(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int insert(RoleResource record);", "int insert(DBPublicResources record);", "int insert(TUserResources record);", "int insert(CmGroupRelIndustry record);", "int insert(PolicyGroup record);", "int insertSelective(RoleResource record);", "int insertSelective(DBPublicResources record);", "int insert(ResourcePojo record);", "int insert(GroupRoleUserRel record);", "int insert(ResourceWithBLOBs record);", "int insertSelective(ResourceWithBLOBs record);", "int insert(SbGroupDetail record);", "int insert(ProjGroup record);", "int insertSelective(CmGroupRelIndustry record);", "int insertSelective(TUserResources record);", "int insertSelective(ResourcePojo record);", "int insert(GrpTagKey record);", "@Override\n\tpublic void dbInsert(PreparedStatement pstmt) {\n\t\ttry \n\t\t{\n\t\t\tpstmt.setInt(1, getParent());\n\t\t\tpstmt.setInt(2, getParentType().getValue()); \t\t\t// owner_type\n\t\t\tpstmt.setString(3, this.predefinedPeriod.getKey() ); \t\t\t// period key\n\t\t\tpstmt.setDouble(4, this.getProductiveTime());\t\t\t\t\t\t// productive time\n\t\t\tpstmt.setDouble(5, this.getQtySchedToProduce());\t\t\t\t// Quantity scheduled to produce\n\t\t\tpstmt.setDouble(6, this.getQtyProduced());\t\t\t\t\t\t// Quantity produced\n\t\t\tpstmt.setDouble(7, this.getQtyDefective());\t\t\t\t\t\t// Quantity with rework or considered defective. \n\n\t\t\tpstmt.addBatch();\n\n\t\t} catch (SQLException e) {\n\t\t\tLogger logger = LogManager.getLogger(OverallEquipmentEffectiveness.class.getName());\n\t\t\tlogger.error(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\n\t}", "Long insert(UserGroup record);", "public BookUser addItemInTable(BookUser item) throws ExecutionException, InterruptedException {\n BookUser entity = Azure.mbook.insert(item).get();\n return entity;\n }", "int insert(ItemCategory record);", "@Override\r\n\tpublic void insertEncoreItem(Item item) {\n\t\tint i = sqlSession.insert(ns+\".insertEncoreItem\", item);\r\n\t\tif(i>0) System.out.println(\"insert Encore item1\");\r\n\t}", "int insert(SeGroup record);", "com.microsoft.schemas.crm._2011.contracts.ArrayOfRequiredResource addNewRequiredResources();", "int insertSelective(PolicyGroup record);", "int insert(GroupRightDAO record);", "int insertSelective(GroupRoleUserRel record);", "public void addResourceSpace(Resource r,int srt){\n t.put(r.getName(),new SupplyNode(r,srt));\n t.get(r.getName()).setCurrent(srt);\n }", "int insert(SrmFundItem record);", "@Override\n\tpublic Resource insert(Resource resource) {\n\t\treturn null;\n\t}", "@Override\n\t\tpublic void addRawitem(Rawitem Rawitem) {\n\t\t\tString sql=\"INSERT INTO rawitem(suppliedby,rquantity,riprice,rstock)\"\n\t\t\t\t\t+ \" values (:suppliedby,:rquantity,:riprice,:rstock)\";\n\t\t\tnamedParameterJdbcTemplate.update(sql,getSqlParameterByModel(Rawitem));\n\t\t}", "@Override\n public Item create(Context context, WorkspaceItem workspaceItem) throws SQLException, AuthorizeException\n {\n if(workspaceItem.getItem() != null)\n {\n throw new IllegalArgumentException(\"Attempting to create an item for a workspace item that already contains an item\");\n }\n\n Item item = createItem(context);\n workspaceItem.setItem(item);\n return item;\n }", "public static void addResource(ArrayList<Resource> resource){\n String id;\n String type;\n String name;\n String genre;\n String author;\n String year;\n String userID = \"0\";\n Boolean checkedOut = false;\n\n int nextID = Resource.getLastID() + 1;\n id = \"\" + nextID;\n type = stringInput(\"What type is the resource\");\n name = stringInput(\"What is the name of the resource\");\n genre = stringInput(\"What genre is the resource\");\n author = stringInput(\"Who is the author\");\n year = stringInput(\"What year is it published\");\n\n resource.add(new Resource(id, type, name, genre, author, year, userID, checkedOut));\n }", "private void insertTemplateRow(Connection con,\n IdentifiedRecordTemplate template) throws SQLException {\n PreparedStatement insert = null;\n \n try {\n int internalId = getNextId(TEMPLATE_TABLE, \"templateId\");\n template.setInternalId(internalId);\n String externalId = template.getExternalId();\n String templateName = template.getTemplateName();\n \n insert = con.prepareStatement(INSERT_TEMPLATE);\n insert.setInt(1, internalId);\n insert.setString(2, externalId);\n insert.setString(3, templateName);\n insert.execute();\n } finally {\n DBUtil.close(insert);\n }\n }", "int insert(ReleaseSystem record);", "int insertSelective(SbGroupDetail record);", "public void createNewPhysicalResourceGroup(String institute, String adminGroup, String email) {\n NewPhysicalResourceGroupPage page = NewPhysicalResourceGroupPage.get(driver, URL_UNDER_TEST);\n page.sendInstitute(institute);\n page.sendAdminGroup(adminGroup);\n page.sendEmail(email);\n \n page.save();\n }", "int insert(OpeningRequirement record);", "int insert(PageItemCfg record);", "protected void insertItemTx(HomeItemImpl item)\n\t{\n\t\tString sql = \"INSERT INTO HOME_ITEM (SITE, PUBLISHED, RELEASE_DATE, SOURCE, TITLE, CONTENT, URL, DIMENSIONS, ALT, CREATED_BY, CREATED_ON, MODIFIED_BY, MODIFIED_ON) values (?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n\n\t\tObject[] fields = new Object[13];\n\t\tint i = 0;\n\t\tfields[i++] = item.getSite().getId();\n\t\tfields[i++] = item.getPublished();\n\t\tfields[i++] = item.getReleaseDate();\n\t\tfields[i++] = item.getSource().getCode();\n\t\tfields[i++] = item.getTitle();\n\t\tfields[i++] = item.getContentReferenceId();\n\t\tfields[i++] = item.getUrl();\n\t\tfields[i++] = item.getDimensions();\n\t\tfields[i++] = item.getAlt();\n\t\tfields[i++] = item.getCreatedBy().getId();\n\t\tfields[i++] = item.getCreatedOn();\n\t\tfields[i++] = item.getModifiedBy().getId();\n\t\tfields[i++] = item.getModifiedOn();\n\n\t\tLong id = sqlService().insert(sql, fields, \"ID\");\n\t\titem.initId(id);\n\t}", "int insert(MrpConfigSettingsEntity record);", "public int registerOrderItem(OrderItem i) {\n int ok = 0;\n try {\n String query = \"INSERT INTO order_Item (id_Order_Item, amount, product_id_Product, order_id_Order) VALUES (?, ?, ?, ?) ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n\n st.setInt(1, 0);\n st.setInt(2, i.getAmount());\n st.setInt(3, i.getProductIdProduct());\n st.setInt(4, i.getOrderIdItem());\n\n ok = st.executeUpdate(); //Execute the insert\n st.close(); //Close the Statment\n con.close(); //Close the connection\n \n } catch (SQLException e) {\n e.printStackTrace();\n }\n \n return ok;\n }", "int insertSelective(GroupRightDAO record);", "void setResourceItem(BaseContentItem resourceItem);", "int insert(SysRole record);", "@Override\r\n\tpublic void insertEncoreItem2(Item item) {\n\t\tint i = sqlSession.insert(ns+\".insertEncoreItem2\", item);\r\n\t\tif(i>0) System.out.println(\"insert Encore item2\");\r\n\t}", "int insert(TbCrmTask record);", "Long insert(MessageGroup record);", "Reservierung insert(Reservierung reservierung) throws ReservierungException;", "public JsonNode insert(String resourcePath, String model, JsonNode jsonNode) {\n\t\tNitrite db = nitriteDbConnection.getConnection(resourcePath, model);\n\t\tNitriteCollection collection = db.getCollection(model);\n\t\tDocument doc = getDocument(jsonNode);\n\t\tcollection.insert(doc);\n\t\treturn getJsonNode(doc);\n\t}", "int insert(RetailModule record);", "int insert(MyUserRoleRelation record);", "int insert(Sequipment record);", "void insert(Providers record);", "public void insertIntoProduct() {\n\t\ttry {\n\t\t\tPreparedStatement statement = connect.prepareStatement(addProduct);\n\t\t\tstatement.setString(1, productName);\n\t\t\tstatement.setString(2, quantity);\n\t\t\t\n\t\t\tstatement.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "int insert(RolePermission record);", "void addElement(String newSubResourceName, ResourceBase newSubResource);", "public void addResource(TIdentifiable resource) {\r\n // make sure that the resource doesn't exists already\r\n\t if (resourceExists(resource)) return;\t \r\n\t \r\n // check to see if we need to expand the array:\r\n\t if (m_current_resources_count == m_current_max_resources) expandTable(1, 2);\t \t \r\n\t m_resources.addID(resource);\r\n\t m_current_resources_count++;\r\n }", "public void allocateGroupId(){\n\t\trecords.add(new pair(this.groupname,currentId));\n\t\tthis.groupid = currentId;\n\t\tcurrentId++;\n\t\tConnection c = null;\n\t\tStatement stmt = null;\n\t\ttry{\n\t\t\tSystem.out.println(\"group setup\");\n\t\t\tSystem.out.println(this.groupid);\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\t\t\tc = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/ifoundclassmate\");\n\t\t\tc.setAutoCommit(false);\n\t\t\tstmt = c.createStatement();\n\t\t\tString sql = \"INSERT INTO GROUPS (GROUPID,GROUPNAME,DESCRIPTION) \"+\n\t\t\t\t\t\"VALUES (\" + this.groupid + \", \" + \"'\" +this.groupname + \"'\"\n\t\t\t\t\t+\" , \" + \"'\" + this.description + \"' \" + \");\" ;\n\t\t\tstmt.executeUpdate(sql);\n\t\t\t\n\t\t\tstmt.close();\n\t\t\tc.commit();\n\t\t\tc.close();\n\t\t} catch (Exception e ){\n\t\t\tSystem.out.println(e.getClass().getName() + e.getMessage() );\n\t\t\treturn;\n\t\t}\n\t\treturn;\n\t}", "@Override\n\tpublic int insertResources(Resources resources) {\n\t\treturn ResourcesMapper.insert(resources);\n\t}", "int insert(PensionRoleMenu record);", "int insert(SysOrganization record);", "int insertSelective(SeGroup record);", "int insertSelective(ItemCategory record);", "ID create(NewRoamingGroup group);", "int insertSelective(ReleaseSystem record);", "int insert(RoleSystemauthority record);", "public void insert(EpAssets record) {\n getSqlMapClientTemplate().insert(\"EP_ASSETS.abatorgenerated_insert\", record);\n }", "int insert(DrpCommissionRule record);", "public ItemsPk insert(Items dto) throws ItemsDaoException;", "int insert(HpItemParamItem record);", "int insertSelective(ProjGroup record);", "private void addInsertOp() {\n\n if (!mIsNewAlert) {\n mValues.put(AlertContentProvider.KEY_ALERT_ID, mRawAlertId);\n }\n ContentProviderOperation.Builder builder =\n newInsertCpo(Data.CONTENT_URI, mIsSyncOperation, mIsYieldAllowed);\n builder.withValues(mValues);\n if (mIsNewAlert) {\n builder.withValueBackReference(AlertContentProvider.KEY_ALERT_ID, mBackReference);\n }\n mIsYieldAllowed = false;\n mBatchOperation.add(builder.build());\n }", "private void insertItem() {\n System.out.println(\"What is the priority level of the task: \\n\\tH -> high \\n\\tM -> medium \\n\\tL -> low\");\n char priorityLevel = scanner.next().toUpperCase().charAt(0);\n\n priorityLevel = checkPriorityLevel(priorityLevel);\n Categories category;\n if (priorityLevel == 'H') {\n category = Categories.HIGHPRIORITY;\n } else if (priorityLevel == 'M') {\n category = Categories.MIDPRIORITY;\n } else {\n category = Categories.LOWPRIORITY;\n }\n\n System.out.println(\"Enter the name of the task:\");\n scanner.nextLine();\n String name = scanner.nextLine();\n\n String daysBeforeDue = acceptDaysBeforeDue();\n\n Item item = new Item(name, daysBeforeDue, category);\n toDoList.insert(item);\n System.out.println(\"Added successfully!\");\n\n System.out.println(\"Updated to-do list:\");\n viewList();\n }", "int insert(SysRoleDO record);", "int insert(UsecaseRoleData record);", "public void addResource(PSResource res) {\n/* 72 */ prepareResourceSet();\n/* 73 */ this.resources.add(res);\n/* */ }", "int insert(CmIndustryConfig record);", "int insert(SchedulingPlay record);", "int insertSelective(SysRole record);", "WriteRequest insert(PiEntity entity);", "int insert(ItemStockDO record);", "int insert(ItemStockDO record);", "int insert(SysTeam record);", "@Test\n\tvoid addUserToGroup() {\n\t\t// Pre condition\n\t\tAssertions.assertTrue(resource.findById(\"wuser\").getGroups().contains(\"Biz Agency Manager\"));\n\n\t\tresource.addUserToGroup(\"wuser\", \"biz agency manager\");\n\n\t\t// Post condition -> no change\n\t\tAssertions.assertTrue(resource.findById(\"wuser\").getGroups().contains(\"Biz Agency Manager\"));\n\t}", "int insertTask(TaskInfo taskInfo);", "private void insertData() {\r\n PodamFactory factory = new PodamFactoryImpl();\r\n for (int i = 0; i < 3; i++) {\r\n MonitoriaEntity entity = factory.manufacturePojo(MonitoriaEntity.class);\r\n\r\n em.persist(entity);\r\n data.add(entity);\r\n }\r\n }", "public void addToDatabaseProduct() {\n // Database credentials\n String pass = \"\";\n\n InputStream passPath = Controller.class.getResourceAsStream(\"/password.txt\");\n if (passPath == null) {\n System.out.println(\"Could not find password in resources folder\");\n }\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(passPath));\n String line = null;\n while (true) {\n try {\n if (!((line = reader.readLine()) != null)) {\n break;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n System.out.println(line);\n if (line != null) {\n pass = line;\n System.out.println(\"Password login: \" + line);\n break;\n }\n }\n Connection conn = null; //Temporary\n PreparedStatement stmt = null; //Temporary\n\n try {\n // STEP 1: Register JDBC driver\n Class.forName(\"org.h2.Driver\");\n\n //STEP 2: Open a connection\n conn = DriverManager.getConnection(\"jdbc:h2:./res/HR\", \"\",\n pass);\n\n final String sqlProductName = txtProductName.getText();\n String sqlManufName = txtManufacturer.getText();\n ItemType sqlItemType = choiceType.getValue();\n\n stmt = conn.prepareStatement(\"INSERT INTO Product(type, manufacturer, name) VALUES (?, ?, ?)\",\n Statement.RETURN_GENERATED_KEYS);\n stmt.setString(1, sqlItemType.toString());\n stmt.setString(2, sqlManufName);\n stmt.setString(3, sqlProductName);\n\n stmt.executeUpdate();\n\n stmt.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "int insertSelective(SysOrganization record);", "public AssignTagTabItem(Resource resource){\n\t\tthis.resource = resource;\n\t\tthis.resourceId = resource.getId();\n\t}", "public void addResource(Resource r,int max){\n t.put(r.getName(),new SupplyNode(r,max));\n }", "public synchronized void grantPrivilegeToGroup(Integer groupId, Long resourceId, ResourceType resourceType, String permissionName) {\n final GroupEntity group = groupDAO.findByPK(groupId);\n final PrivilegeEntity privilege = new PrivilegeEntity();\n ResourceTypeEntity resourceTypeEntity = new ResourceTypeEntity();\n resourceTypeEntity.setId(resourceType.getId());\n resourceTypeEntity.setName(resourceType.name());\n privilege.setPermission(permissionDAO.findPermissionByNameAndType(permissionName, resourceTypeEntity));\n privilege.setPrincipal(group.getPrincipal());\n privilege.setResource(resourceDAO.findById(resourceId));\n if (!group.getPrincipal().getPrivileges().contains(privilege)) {\n privilegeDAO.create(privilege);\n group.getPrincipal().getPrivileges().add(privilege);\n principalDAO.merge(group.getPrincipal()); //explicit merge for Derby support\n groupDAO.merge(group);\n privilegeDAO.merge(privilege);\n }\n }", "org.hl7.fhir.ResourceReference insertNewPerformer(int i);", "int insert(BasicEquipment record);", "int insert(EcsSupplierRebate record);", "int insert(SysRoleUser record);", "public static void createItemTable() {\n\n\t\ttry {\n\t\t\tconnection = DBConnectionUtil.getDBConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\t// Drop table if already exists and as per SQL query available in\n\t\t\t// Query.xml\n\t\t\tstatement.executeUpdate(QueryUtil.queryByID(CommonConstants.QUERY_ID_DROP_ITEM_TABLE));\n\t\t\t// Create new items table as per SQL query available in\n\t\t\t// Query.xml\n\t\t\tstatement.executeUpdate(QueryUtil.queryByID(CommonConstants.QUERY_ID_CREATE_ITEM_TABLE));\n\t\t\t// Insert records into item table in the beginning as per SQL query available in\n\t\t\t// Query.xml\t\t\t\n\t\t\tstatement.executeUpdate(QueryUtil.queryByID(CommonConstants.QUERY_ID_INSERT_BEGIN_ITEM_TABLE));\n\t\t\t\n\t\t} catch (SQLException | SAXException | IOException | ParserConfigurationException | ClassNotFoundException e) {\n\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t}\n\t}", "public static void createItemTable() {\n\n\t\ttry {\n\t\t\tconnection = DBConnectionUtil.getDBConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\t// Drop table if already exists and as per SQL query available in\n\t\t\t// Query.xml\n\t\t\tstatement.executeUpdate(QueryUtil.queryByID(CommonConstants.QUERY_ID_DROP_ITEM_TABLE));\n\t\t\t// Create new items table as per SQL query available in\n\t\t\t// Query.xml\n\t\t\tstatement.executeUpdate(QueryUtil.queryByID(CommonConstants.QUERY_ID_CREATE_ITEM_TABLE));\n\t\t\t// Insert records into item table in the beginning as per SQL query available in\n\t\t\t// Query.xml\t\t\t\n\t\t\tstatement.executeUpdate(QueryUtil.queryByID(CommonConstants.QUERY_ID_INSERT_BEGIN_ITEM_TABLE));\n\t\t\t\n\t\t} catch (SQLException | SAXException | IOException | ParserConfigurationException | ClassNotFoundException e) {\n\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t}\n\t}", "public static int insert(OrderItems o) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n System.out.println(\"DBSetup @ LINE 101\");\n String query\n = \"INSERT INTO orderItem (orderNumber, productCode, quantity) \"\n + \"VALUES (?, ?, ?)\";\n try {\n ps = connection.prepareStatement(query);\n ps.setInt(1, o.getOrderNumber());\n ps.setString(2, o.getProduct().getProductCode());\n ps.setInt(3, o.getQuantity());\n return ps.executeUpdate();\n } catch (SQLException e) {\n System.out.println(e);\n return 0;\n } finally {\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }", "public void insert(Object item);" ]
[ "0.6138235", "0.596788", "0.5914515", "0.58944637", "0.58362657", "0.57672334", "0.57114124", "0.56496835", "0.56453335", "0.5633543", "0.558742", "0.55751294", "0.55076784", "0.54955304", "0.54808766", "0.5473114", "0.54710346", "0.54400975", "0.5429817", "0.5412651", "0.540549", "0.53945285", "0.53524286", "0.535013", "0.5348055", "0.53305113", "0.5324845", "0.53165954", "0.53133005", "0.5247349", "0.52451503", "0.5240565", "0.5240528", "0.52279973", "0.52194667", "0.52188975", "0.52136165", "0.5208861", "0.5201363", "0.519694", "0.51966137", "0.5195665", "0.5174426", "0.5165997", "0.516225", "0.51574177", "0.51531976", "0.5152243", "0.51429504", "0.51353353", "0.5124351", "0.5116752", "0.5113503", "0.5109993", "0.5090804", "0.5077189", "0.507589", "0.50740314", "0.5071053", "0.5068183", "0.50525594", "0.50499874", "0.5046563", "0.50343746", "0.50314635", "0.50260967", "0.50259405", "0.50246924", "0.5015429", "0.5008906", "0.5007", "0.50049895", "0.5002216", "0.5001578", "0.50010014", "0.49909598", "0.49892065", "0.49785185", "0.49733892", "0.49646962", "0.4963886", "0.4963837", "0.4963837", "0.4963373", "0.49616152", "0.49598327", "0.49556777", "0.49457934", "0.4944834", "0.4939129", "0.49335632", "0.49335235", "0.49327216", "0.49322993", "0.4932101", "0.49290648", "0.4928636", "0.4928636", "0.4927054", "0.4926859" ]
0.5482222
14
checks if for user owns the resource
public Future<List<UUID>> checkOwner(Map<String, List<String>> req, String userId) { Promise<List<UUID>> p = Promise.promise(); Future<List<UUID>> resGrp; Future<List<UUID>> resItem; if (req.containsKey(RES_GRP)) { List<String> resGrpIds = req.get(RES_GRP); resGrp = resGrpOwner(resGrpIds, userId); } else resGrp = Future.succeededFuture(new ArrayList<>()); if (req.containsKey(RES)) { List<String> resIds = req.get(RES); resItem = resOwner(resIds, userId); } else resItem = Future.succeededFuture(new ArrayList<>()); CompositeFuture.all(resGrp, resItem) .onSuccess( obj -> { List<UUID> resp = new ArrayList<>(); if (!resGrp.result().isEmpty()) resp.addAll(resGrp.result()); if (!resItem.result().isEmpty()) resp.addAll(resItem.result()); p.complete(resp); }) .onFailure(fail -> p.fail(INTERNALERROR)); // return map of res_id,iowners in place of user id // check if userid is delegate for any of these owners // compose // check if user id is an active delegate of all of the owner ids for resource // return list of not delegate return p.future(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasObjUser();", "public boolean hasObjUser() {\n return objUser_ != null;\n }", "private boolean checkAppInstanceOwnership(){\n\n\t\ttry {\n\t\t\t\n\t\t\t\n\t \tif(getUser() != null){\n\t \t\t\n\t \t\tif(getUser().getRole().equalsIgnoreCase(UserRoles.admin.toString()))\n\t \t\t\treturn true;\n\t \t\telse{\n\t \t\t\t\n\t\t\t\t\tAppInstance app = AHEEngine.getAppInstanceEntity(Long.valueOf(appinst));\n\t \t\t\t\t\t\t\t\t\n\t \t\t\tif(app != null){\n\t \t\t\t\t\n\t \t\t\t\tif(app.getOwner().getId() == getUser().getId())\n\t \t\t\t\t\treturn true;\n\t \t\t\t\telse{\n\t \t\t\t\t\tsetStatus(Status.CLIENT_ERROR_FORBIDDEN);\n\t \t\t\t\t\treturn false;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\t\t\n\t \t\t\t\n\t \t\t}\n\t \t\t\n\t \t}\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (AHEException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tsetStatus(Status.CLIENT_ERROR_FORBIDDEN);\n \treturn false;\n }", "public boolean isOwned(){\n\t\treturn isOwned;\n\t}", "boolean hasUserManaged();", "@Override\n public boolean hasDeviceOwner() {\n final CallerIdentity caller = getCallerIdentity();\n Preconditions.checkCallAuthorization(isDefaultDeviceOwner(caller)\n || canManageUsers(caller) || isFinancedDeviceOwner(caller)\n || hasCallingOrSelfPermission(permission.MANAGE_PROFILE_AND_DEVICE_OWNERS));\n return mOwners.hasDeviceOwner();\n }", "public boolean owns(String establishment) {\n for (int i = 0; i < Establishments.size(); i++) {\n if (Establishments.get(i).getName().equals(establishment)) {\n return true;\n }\n }\n return false;\n }", "public boolean hasObjUser() {\n return instance.hasObjUser();\n }", "public static void adminOrOwnerCheck(User current,\n User resourceOwner)\n throws ServiceException {\n\n if (!current.equals(resourceOwner) &&\n !current.isRole(\"ROLE_ADMIN\")) {\n throw new ServiceException(ServiceStatus.ACCESS_DENIED);\n }\n }", "public boolean isEditableByUser() {\r\n if ((this.currentStatusChange == null) ||\r\n (this.currentStatusChange.equals(PoStatusCode.PROPOSED)))\r\n return true;\r\n return false;\r\n }", "public abstract boolean isOwner (String url);", "@Override\n\tpublic boolean isOwnMessage() {\n\t\ttry {\n\t\t\treturn (this.user.id == AccountManager.current_account.getUser().id);\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean hasUser() {\n return user_ != null;\n }", "public boolean hasUser() {\n return user_ != null;\n }", "public final boolean isOwner() {\n return currentOwner == this;\n }", "public boolean isOwnerKnown() {\n\t\tif (owner == null && possibleOwners.size() == 1)\n\t\t\towner = possibleOwners.get(0);\n\t\t\t\n\t\treturn (owner == null);\n\t}", "public boolean hasUser() {\n return instance.hasUser();\n }", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "@Override\n public boolean isOwner(String groupingPath, String username) {\n return isMember(groupingPath + OWNERS, username);\n }", "public boolean hasUser() {\n return user_ != null;\n }", "public void testUserIsBlogOwner() {\n rootBlog.setProperty(SimpleBlog.BLOG_OWNERS_KEY, \"user1\");\n assertTrue(rootBlog.isUserInRole(Constants.BLOG_OWNER_ROLE, \"user1\"));\n assertFalse(rootBlog.isUserInRole(Constants.BLOG_OWNER_ROLE, \"user2\"));\n }", "public boolean isUser()\n\t{\n\t\treturn (id != -1);\n\t}", "public abstract boolean checkPolicy(User user);", "public boolean isAccountOwner() {\n\t\treturn acctOwnerFlg;\n\t}", "boolean hasResource();", "private static boolean checkExistenceAndOwner(String username, String clientData, String playlist){\n //Check if user exists\n if (!CheckExistence.userExists(username)){\n System.out.println(clientData + \" | \" + username\n + \" | User not found.\");\n return false;\n }\n\n //Check if playlist exists\n if (!CheckExistence.playlistExists(playlist)){\n System.out.println(clientData + \" | \" + username\n + \" | Playlist not found.\");\n return false;\n }\n\n //Check if user owns the playlist\n if (!Permission.ownsPlaylist(username, playlist)){\n System.out.println(clientData + \" | \" + username\n + \" | You don't own this playlist.\");\n return false;\n }\n return true;\n }", "boolean hasPrincipal();", "User getOwner();", "@Override\n public boolean hasAccess(User user) {\n return user.hasRole(RoleValue.APP_ADMIN) || this.equals(user.company);\n }", "public boolean hasAccount(){\r\n\t\treturn (associatedAccount != null);\r\n\t}", "public boolean hasUser(){\n return numUser < MAX_USER;\n }", "public boolean isOwner(String role) throws IOException {\n\t\treturn (rolePoster.sendPost(\"isOwner=\" + role).startsWith(\"true\"));\n\t}", "@Override\n\tpublic boolean hasStrongOwners() {\n\t\treturn false;\n\t}", "public boolean isExistingUser() {\r\n return isExistingUser;\r\n }", "public boolean hasUser() {\n return userBuilder_ != null || user_ != null;\n }", "public boolean hasUser() {\n return userBuilder_ != null || user_ != null;\n }", "private void checkUserAuthorities() {\n\t\tAuthority auth = authorityRepository.findTop1ByName(AuthorityType.ROLE_ADMIN);\n\t\tif (null == auth) {\n\t\t\tauth = Authority.createAdmin();\n\t\t\tauthorityRepository.save(auth);\n\t\t}\n\t\tAuthority authUser = authorityRepository.findTop1ByName(AuthorityType.ROLE_USER);\n\t\tif (null == authUser) {\n\t\t\tauthUser = Authority.createUser();\n\t\t\tauthorityRepository.save(authUser);\n\t\t}\n\t}", "@Override\n public boolean isOrganizationOwnedDeviceWithManagedProfile() {\n if (!mHasFeature) {\n return false;\n }\n return getOrganizationOwnedProfileUserId() != UserHandle.USER_NULL;\n }", "@Given(\"^an owner exists within the database$\")\n\tpublic void an_owner_exists_within_the_database() throws Throwable {\n\t throw new PendingException();\n\t}", "protected boolean isValid(AccessUser obj)\n {\n return obj != null && obj.username != null && !getMembers().contains(obj);\n }", "boolean hasRewardResource();", "public void testUserIsBlogOwnerByDefault() {\n rootBlog.removeProperty(SimpleBlog.BLOG_OWNERS_KEY);\n assertTrue(rootBlog.isUserInRole(Constants.BLOG_OWNER_ROLE, \"user1\"));\n assertTrue(rootBlog.isUserInRole(Constants.BLOG_OWNER_ROLE, \"usern\"));\n }", "public abstract User getOwner();", "public boolean hasPermission(String username, ActionContext ctx) {\r\n return username != null;\r\n }", "boolean hasUserId();", "boolean hasUserId();", "boolean hasUserId();", "boolean userExists(HttpServletRequest request, String userId);", "private static Boolean userOwnsDestination(\n Account fromAccount,\n Integer toAccountId,\n Integer userId\n ) {\n if (toAccountId == null) {\n return false;\n }\n return userOwnsAccount(toAccountId, userId) != null;\n }", "boolean isSetWhoOwnsWhom();", "public boolean isResponsible(User user) {\n\t\tHashMap<String, Object> filters = new HashMap<>();\n\n\t\tfilters.put(\"responsible\", new ValueParameter(user));\n\n\t\treturn !this.filter(filters).isEmpty();\n\t}", "public boolean hasAccount(String user);", "User getUserUnderValidation();", "@Override\n public boolean addOwner(Resident owner) {\n if (!owner.getTowns().contains(town))\n return false;\n\n return owners.add(owner);\n }", "private boolean checkUserData() {\n UserAccount userAccount = new UserAccount(this);\n customer = userAccount.getCustomer();\n return customer != null;\n }", "public boolean checkForUser(Player p) {\n\t\tif(p.getName(p).equals(\"user\")) {\n\t\t\treturn true;\t\t\t\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "protected boolean isReferenced() {\r\n return mReferenced || mUsers.size() > 0;\r\n }", "private void checkRights() {\n image.setEnabled(true);\n String user = fc.window.getUserName();\n \n for(IDataObject object : objects){\n ArrayList<IRights> rights = object.getRights();\n \n if(rights != null){\n boolean everybodyperm = false;\n \n for(IRights right : rights){\n String name = right.getName();\n \n //user found, therefore no other check necessary.\n if(name.equals(user)){\n if(!right.getOwner()){\n image.setEnabled(false);\n }else{\n image.setEnabled(true);\n }\n return;\n //if no user found, use everybody\n }else if(name.equals(BUNDLE.getString(\"Everybody\"))){\n everybodyperm = right.getOwner();\n }\n }\n image.setEnabled(everybodyperm);\n if(!everybodyperm){\n return;\n }\n }\n }\n }", "public boolean equals (Object obj) {\n if (!(obj instanceof WfResource)) return false;\n WfResource res=(WfResource)obj;\n try {\n return res.resource_key().equals(username);\n } catch (Exception ex) {\n return false;\n }\n }", "public boolean isCheckedOutByUser() {\r\n \r\n if (vocabularyFolder == null) {\r\n return false;\r\n } else {\r\n return StringUtils.isNotBlank(vocabularyFolder.getWorkingUser()) && !vocabularyFolder.isWorkingCopy()\r\n && StringUtils.equals(getUserName(), vocabularyFolder.getWorkingUser());\r\n }\r\n }", "public boolean isIsCreator() {\r\n if (ui.isIsUserAuthenticated() && recipe != null) {\r\n if(recipe.getCreator() == user)\r\n return true;\r\n else\r\n return false;\r\n } else {\r\n return false;\r\n }\r\n }", "public boolean isHasAlreadyReviewed() {\r\n boolean result = false;\r\n if (ui.isIsUserAuthenticated() && professionalStatus.isIsProfessional()) {\r\n Users user = ui.getUser();\r\n if (recipe != null) {\r\n for (Review rev : recipe.getReviews()) {\r\n if (rev.getReviewer().getUserName().equals(user.getUserName())) {\r\n result = true;\r\n break;\r\n }\r\n }//end for\r\n }\r\n }// end value != null\r\n return result;\r\n }", "public void isBought(Player p){\n\t\towner = p;\n\t\tisOwned=true;\n\t}", "private boolean canCreateProposal( Person user ) {\n\t\tApplicationTask task = new ApplicationTask( TaskName.CREATE_PROPOSAL );\n\t\tTaskAuthorizationService taskAuthenticationService = KraServiceLocator.getService( TaskAuthorizationService.class );\n\t\treturn taskAuthenticationService.isAuthorized( user.getPrincipalId(), task );\n\t}", "public boolean hasResource(org.semanticwb.model.Resource value)\r\n {\r\n boolean ret=false;\r\n if(value!=null)\r\n {\r\n ret=getSemanticObject().hasObjectProperty(swb_hasPTResource,value.getSemanticObject());\r\n }\r\n return ret;\r\n }", "@java.lang.Override\n public boolean hasPrincipal() {\n return principal_ != null;\n }", "boolean hasCustomerUserAccess();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "private boolean hasUserImportantView() {\n int userID = this.sharedPreferences.getInt(Constants.SP_USER_ID_KEY, 0);\n return this.sharedPreferences.getBoolean(serverName + \"_\" + userID, false);\n }", "@Override\n public boolean isUser() {\n return false;\n }", "private boolean isInstructor(User user)\r\n {\r\n if (LOG.isDebugEnabled())\r\n {\r\n LOG.debug(\"isInstructor(User \" + user + \")\");\r\n }\r\n if (user != null)\r\n return SecurityService.unlock(user, \"site.upd\", getContextSiteId());\r\n else\r\n return false;\r\n }", "public boolean isSetUser() {\n return this.user != null;\n }", "public boolean isSetUser() {\n return this.user != null;\n }", "boolean exists(User user);", "public Boolean isAuthorized(String userId);", "private Boolean canUserValidate() throws ServeurException, ClientException {\n // Direct on/off line\n return checkValidatePermission();\n }", "boolean hasSelectedUser();", "@Override\n public boolean existPrincipalWithName(String userName) {\n // \"Feature 'existPrincipalWithName in OAuth 2 identity server' is not implemented\"\n return false;\n }" ]
[ "0.63823396", "0.6328504", "0.6294588", "0.6233902", "0.6132485", "0.6123802", "0.6120912", "0.6110282", "0.6100721", "0.60578775", "0.6020685", "0.5970698", "0.5967783", "0.5967783", "0.59602845", "0.59308034", "0.59235865", "0.58927435", "0.58927435", "0.58927435", "0.58927435", "0.58927435", "0.58927435", "0.58927435", "0.58715624", "0.58441865", "0.58182436", "0.5803296", "0.57800376", "0.57526004", "0.57492256", "0.574419", "0.5707127", "0.5685153", "0.5681461", "0.5680495", "0.5660753", "0.5641178", "0.5640647", "0.5595274", "0.5592001", "0.5592001", "0.55889606", "0.55765504", "0.5563488", "0.5559522", "0.5547472", "0.55453485", "0.5536841", "0.55356526", "0.5519642", "0.5519642", "0.5519642", "0.5517903", "0.5515995", "0.5515281", "0.55029446", "0.5493764", "0.54878837", "0.54668164", "0.54652685", "0.5463833", "0.54547656", "0.5441054", "0.54368365", "0.5435547", "0.5434344", "0.5433006", "0.54201406", "0.5419896", "0.54192686", "0.5409904", "0.54088384", "0.5377906", "0.5377906", "0.5377906", "0.5377906", "0.5377906", "0.5377906", "0.5377906", "0.5377906", "0.5377906", "0.5377906", "0.5377906", "0.5377906", "0.5377906", "0.5377906", "0.5377906", "0.5377906", "0.5377906", "0.5377906", "0.53733474", "0.5371684", "0.53668964", "0.53654563", "0.53654563", "0.53639996", "0.53634936", "0.5362495", "0.5358773", "0.53554535" ]
0.0
-1
checks if for user owns the resource_groups
public Future<List<UUID>> resGrpOwner(List<String> ids, String userId) { Promise<List<UUID>> p = Promise.promise(); Collector<Row, ?, List<UUID>> providerIdCollector = Collectors.mapping(row -> row.getUUID(PROVIDER_ID), Collectors.toList()); pool.withConnection( conn -> conn.preparedQuery(RES_GRP_OWNER) .collecting(providerIdCollector) .execute( Tuple.of(UUID.fromString(userId)).addArrayOfString(ids.toArray(String[]::new))) .onFailure( obj -> { LOGGER.error("resGrpOwner db fail :: " + obj.getLocalizedMessage()); obj.printStackTrace(); p.fail(INTERNALERROR); }) .onSuccess( success -> { p.complete(success.value()); })); return p.future(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasUserManaged();", "@Override\n public boolean isOwner(String groupingPath, String username) {\n return isMember(groupingPath + OWNERS, username);\n }", "@Test\n public void ownerArgumentNotAddedIfOwnerIsInGroupWithUserPools() throws AmplifyException {\n final AuthorizationType mode = AuthorizationType.AMAZON_COGNITO_USER_POOLS;\n\n // OwnerInGroup class uses combined owner and group-based auth,\n // and user is in the read-restricted group.\n for (SubscriptionType subscriptionType : SubscriptionType.values()) {\n GraphQLRequest<OwnerInGroup> originalRequest =\n createRequest(OwnerInGroup.class, subscriptionType);\n GraphQLRequest<OwnerInGroup> modifiedRequest =\n decorator.decorate(originalRequest, mode);\n assertNull(getOwnerField(modifiedRequest));\n }\n }", "private boolean checkAppInstanceOwnership(){\n\n\t\ttry {\n\t\t\t\n\t\t\t\n\t \tif(getUser() != null){\n\t \t\t\n\t \t\tif(getUser().getRole().equalsIgnoreCase(UserRoles.admin.toString()))\n\t \t\t\treturn true;\n\t \t\telse{\n\t \t\t\t\n\t\t\t\t\tAppInstance app = AHEEngine.getAppInstanceEntity(Long.valueOf(appinst));\n\t \t\t\t\t\t\t\t\t\n\t \t\t\tif(app != null){\n\t \t\t\t\t\n\t \t\t\t\tif(app.getOwner().getId() == getUser().getId())\n\t \t\t\t\t\treturn true;\n\t \t\t\t\telse{\n\t \t\t\t\t\tsetStatus(Status.CLIENT_ERROR_FORBIDDEN);\n\t \t\t\t\t\treturn false;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\t\t\n\t \t\t\t\n\t \t\t}\n\t \t\t\n\t \t}\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (AHEException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tsetStatus(Status.CLIENT_ERROR_FORBIDDEN);\n \treturn false;\n }", "protected static boolean canUnPublish(SlingHttpServletRequest request) throws RepositoryException {\n boolean canUnPublish = false;\n Session session = request.getResourceResolver().adaptTo(Session.class);\n UserManager userManager = AccessControlUtil.getUserManager(session);\n Iterator<Group> groupIterator = userManager.getAuthorizable(session.getUserID()).memberOf();\n while (groupIterator.hasNext()) {\n Authorizable group = groupIterator.next();\n if (group.isGroup() && PantheonConstants.PANTHEON_PUBLISHERS.equalsIgnoreCase(group.getID())) {\n canUnPublish = true;\n break;\n }\n }\n return canUnPublish;\n }", "boolean validateUserGroups(SessionState state, String userId, Assignment asn)\n\t{\n\t\tSite site = getSite(asn);\n\n\t\t// finding any of the user's groups is sufficient, if they are in multiple groups the check\n\t\t// will fail no matter which of their groups is used\n\t\tOptional<Group> userGroup = getGroupsWithUser(userId, asn, site).stream().findAny();\n\t\tif (userGroup.isPresent())\n\t\t{\n\t\t\treturn checkSubmissionForUsersInMultipleGroups(asn, userGroup.get(), state, true).isEmpty();\n\t\t}\n\n\t\t// user is not in any assignment groups, if they are an instructor this is probably the Student View feature so let them through\n\t\treturn assignmentService.allowAddAssignment(site.getId()) || assignmentService.allowUpdateAssignmentInContext(site.getId());\n\t}", "private boolean userHasAllowedRole(User u, String[] allowedRoles) {\n\n for (GroupRef group : u.getGroups()) {\n\n if (Arrays.binarySearch(allowedRoles, group.getDisplay()) >= 0) {\n return true;\n }\n }\n\n return false;\n }", "private void checkRights() {\n image.setEnabled(true);\n String user = fc.window.getUserName();\n \n for(IDataObject object : objects){\n ArrayList<IRights> rights = object.getRights();\n \n if(rights != null){\n boolean everybodyperm = false;\n \n for(IRights right : rights){\n String name = right.getName();\n \n //user found, therefore no other check necessary.\n if(name.equals(user)){\n if(!right.getOwner()){\n image.setEnabled(false);\n }else{\n image.setEnabled(true);\n }\n return;\n //if no user found, use everybody\n }else if(name.equals(BUNDLE.getString(\"Everybody\"))){\n everybodyperm = right.getOwner();\n }\n }\n image.setEnabled(everybodyperm);\n if(!everybodyperm){\n return;\n }\n }\n }\n }", "@Test\n\tvoid addUserToGroup() {\n\t\t// Pre condition\n\t\tAssertions.assertTrue(resource.findById(\"wuser\").getGroups().contains(\"Biz Agency Manager\"));\n\n\t\tresource.addUserToGroup(\"wuser\", \"biz agency manager\");\n\n\t\t// Post condition -> no change\n\t\tAssertions.assertTrue(resource.findById(\"wuser\").getGroups().contains(\"Biz Agency Manager\"));\n\t}", "public boolean inGroup(Person p){\n\t return false;\n }", "@Override\n public boolean hasDeviceOwner() {\n final CallerIdentity caller = getCallerIdentity();\n Preconditions.checkCallAuthorization(isDefaultDeviceOwner(caller)\n || canManageUsers(caller) || isFinancedDeviceOwner(caller)\n || hasCallingOrSelfPermission(permission.MANAGE_PROFILE_AND_DEVICE_OWNERS));\n return mOwners.hasDeviceOwner();\n }", "boolean isSetRequiredResources();", "public boolean isUserInGroup(long idUser, long idGroup);", "public void testUserDoesNotImplyNotImpliedGroup() {\n User user = RoleFactory.createUser(\"foo\");\n Group group = RoleFactory.createGroup(\"bar\");\n \n assertFalse(m_roleChecker.isImpliedBy(user, group));\n }", "boolean isHasPermissions();", "public boolean hasUser(){\n return numUser < MAX_USER;\n }", "public boolean isGroupAdmin(int userId){\n return userId == groupAdmin;\n }", "@Override\n public boolean inGroup(String worldName, String playerName, String groupName) {\n try {\n PermissionUser[] userList = PermissionsEx.getPermissionManager().getGroup(groupName).getUsers();\n for (PermissionUser user : userList) {\n if (user.getName() == playerName)\n return true;\n else\n return false;\n }\n } catch (Exception e) {\n return false;\n }\n return false;\n }", "private boolean canView(final AbstractItem item) throws AccessDeniedException {\n\t\tif (item.isRssAllowed())\n\t\t\treturn true;\n\t\tList<Subscriber> subscribers = Lists.newArrayList(subscriberRepository.findAll(SubscriberPredicates.onCtx(item\n\t\t\t\t.getContextKey())));\n\t\t// TODO we consider that all items have targets directly on\n\t\t// for targets defined only on classification a check will be needed\n\t\tif (subscribers.isEmpty()) {\n\t\t\tlog.trace(\"Subscribers on item {} are empty -> true\", item.getContextKey());\n\t\t\treturn true;\n\t\t}\n\t\tfinal CustomUserDetails user = SecurityUtils.getCurrentUserDetails();\n\t\tif (user == null) {\n\t\t\tlog.trace(\"user is not authenticated -> throw an error to redirect on authentication\");\n\t\t\tthrow new AccessDeniedException(\"Access is denied to anonymous !\");\n\t\t} else if (user.getRoles().contains(AuthoritiesConstants.ADMIN)\n\t\t\t\t|| user.getUser().getLogin().equalsIgnoreCase(item.getCreatedBy().getLogin())\n\t\t\t\t|| user.getUser().getLogin().equalsIgnoreCase(item.getLastModifiedBy().getLogin())) {\n\t\t\treturn true;\n\t\t}\n\n\t\tfinal UserDTO userDTO = user.getUser();\n\t\tif (userDTO != null) {\n\t\t\tList<String> groups = null;\n\t\t\tif (userDTO.getAttributes() != null) {\n\t\t\t\tgroups = userDTO.getAttributes().get(externalUserHelper.getUserGroupAttribute());\n\t\t\t}\n\t\t\tfor (Subscriber subscriber : subscribers) {\n\t\t\t\tlog.trace(\"Check if {} is in {}\", userDTO, subscriber);\n\t\t\t\tfinal SubjectKeyExtended subject = subscriber.getSubjectCtxId().getSubject();\n\t\t\t\tswitch (subject.getKeyType()) {\n\t\t\t\tcase GROUP:\n\t\t\t\t\tif (groups == null || groups.isEmpty()) {\n\t\t\t\t\t\tlog.trace(\"The user doesn't have a group -> break loop\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t// test on startWith as some groups in IsMemberOf has only a part the\n\t\t\t\t\t// real group name.\n\t\t\t\t\tfor (String val : groups) {\n\t\t\t\t\t\tif (val.startsWith(subject.getKeyValue())) {\n\t\t\t\t\t\t\tlog.trace(\"Check if the user group {} match subscriber group {} -> return true\", val,\n\t\t\t\t\t\t\t\t\tsubject.getKeyValue());\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase PERSON:\n\t\t\t\t\tif (subject.getKeyValue().equalsIgnoreCase(userDTO.getLogin())) {\n\t\t\t\t\t\tlog.trace(\"Check if the user key {} match subscriber key {} -> true\", userDTO.getLogin(),\n\t\t\t\t\t\t\t\tsubject.getKeyValue());\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase PERSON_ATTR:\n\t\t\t\t\tif (subject.getKeyAttribute() != null\n\t\t\t\t\t\t\t&& userDTO.getAttributes().containsKey(subject.getKeyAttribute())\n\t\t\t\t\t\t\t&& userDTO.getAttributes().get(subject.getKeyAttribute()).contains(subject.getKeyValue())) {\n\t\t\t\t\t\tlog.trace(\"Check if the user attribute {} with values {} contains value {} -> true\",\n\t\t\t\t\t\t\t\tsubject.getKeyAttribute(), userDTO.getAttributes().get(subject.getKeyAttribute()),\n\t\t\t\t\t\t\t\tsubject.getKeyValue());\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase PERSON_ATTR_REGEX:\n\t\t\t\t\tif (subject.getKeyAttribute() != null\n\t\t\t\t\t\t\t&& userDTO.getAttributes().containsKey(subject.getKeyAttribute())) {\n\t\t\t\t\t\tfor (final String value : userDTO.getAttributes().get(subject.getKeyAttribute())) {\n\t\t\t\t\t\t\tif (value.matches(subject.getKeyValue())) {\n\t\t\t\t\t\t\t\tlog.trace(\"Check if the user attribute {} with values {} match regex {} -> true\",\n\t\t\t\t\t\t\t\t\t\tsubject.getKeyAttribute(),\n\t\t\t\t\t\t\t\t\t\tuserDTO.getAttributes().get(subject.getKeyAttribute()), subject.getKeyValue());\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new IllegalStateException(\"Warning Subject Type '\" + subject.getKeyType()\n\t\t\t\t\t\t\t+ \"' is not managed\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlog.trace(\"End of all checks -> false\");\n\t\treturn false;\n\t}", "boolean hasRole();", "private static boolean isAuthorized(\n @Nonnull Authorizer authorizer,\n @Nonnull String actor,\n @Nonnull ConjunctivePrivilegeGroup requiredPrivileges,\n @Nonnull Optional<ResourceSpec> resourceSpec) {\n for (final String privilege : requiredPrivileges.getRequiredPrivileges()) {\n // Create and evaluate an Authorization request.\n final AuthorizationRequest request = new AuthorizationRequest(actor, privilege, resourceSpec);\n final AuthorizationResult result = authorizer.authorize(request);\n if (AuthorizationResult.Type.DENY.equals(result.getType())) {\n // Short circuit.\n return false;\n }\n }\n return true;\n }", "public void testUserIsBlogOwner() {\n rootBlog.setProperty(SimpleBlog.BLOG_OWNERS_KEY, \"user1\");\n assertTrue(rootBlog.isUserInRole(Constants.BLOG_OWNER_ROLE, \"user1\"));\n assertFalse(rootBlog.isUserInRole(Constants.BLOG_OWNER_ROLE, \"user2\"));\n }", "public void testGroupDoesNotImplySameRequiredGroup() {\n User user = RoleFactory.createUser(\"foo\");\n \n Group group = RoleFactory.createGroup(\"bar\");\n group.addRequiredMember(group);\n group.addMember(user);\n \n assertFalse(m_roleChecker.isImpliedBy(group, group));\n }", "boolean hasObjUser();", "@Test\n public void ownerArgumentAddedIfOwnerIsNotInGroupWithUserPools() throws AmplifyException {\n final AuthorizationType mode = AuthorizationType.AMAZON_COGNITO_USER_POOLS;\n final String expectedOwner = FakeCognitoAuthProvider.USERNAME;\n\n // OwnerNotInGroup class uses combined owner and group-based auth,\n // but user is not in the read-restricted group.\n for (SubscriptionType subscriptionType : SubscriptionType.values()) {\n GraphQLRequest<OwnerNotInGroup> originalRequest =\n createRequest(OwnerNotInGroup.class, subscriptionType);\n GraphQLRequest<OwnerNotInGroup> modifiedRequest =\n decorator.decorate(originalRequest, mode);\n assertEquals(expectedOwner, getOwnerField(modifiedRequest));\n }\n }", "public static void adminOrOwnerCheck(User current,\n User resourceOwner)\n throws ServiceException {\n\n if (!current.equals(resourceOwner) &&\n !current.isRole(\"ROLE_ADMIN\")) {\n throw new ServiceException(ServiceStatus.ACCESS_DENIED);\n }\n }", "public boolean hasGroup(String groupName){\n\t\tGuild self = this;\r\n//\t\tSystem.out.println(\"this=\" + name +\" self.groups=\"+ groups);\r\n\t\tif (self.groups == null || self.groups.isEmpty())/// try and get it again from db\r\n\t\t\tself = MysticGuilds.getGuild(this.getName());\r\n\t\tif (self == null || self.groups == null || self.groups.isEmpty())\r\n\t\t\treturn false;\r\n\t\tfor (PermissionGroup group: self.groups){\r\n//\t\t\tSystem.out.println(\"looking at group = \" + group);\r\n\t\t\tif (group.getName().equalsIgnoreCase(groupName))\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isGroupPossible()\n\t\t{\n\t\t\treturn this.m_allowedAddGroupRefs != null && ! this.m_allowedAddGroupRefs.isEmpty();\n\n\t\t}", "boolean hasPrincipal();", "public boolean hasObjUser() {\n return objUser_ != null;\n }", "public void testGroupDoesNotImplyNotImpliedUser() {\n User user = RoleFactory.createUser(\"foo\");\n \n Group group = RoleFactory.createGroup(\"bar\");\n group.addMember(user);\n \n assertFalse(m_roleChecker.isImpliedBy(user, group));\n }", "boolean hasConceptGroup();", "protected boolean isValid(AccessUser obj)\n {\n return obj != null && obj.username != null && !getMembers().contains(obj);\n }", "public boolean getAllSpacesOwned(){\n\t\treturn allSpacesOwned;\n\t}", "public void testUserImpliesImpliedGroup() {\n User user = RoleFactory.createUser(\"foo\");\n \n Group group = RoleFactory.createGroup(\"bar\");\n group.addRequiredMember(m_anyone);\n group.addMember(user);\n\n assertTrue(m_roleChecker.isImpliedBy(group, user));\n }", "public boolean owns(String establishment) {\n for (int i = 0; i < Establishments.size(); i++) {\n if (Establishments.get(i).getName().equals(establishment)) {\n return true;\n }\n }\n return false;\n }", "private void checkUserAuthorities() {\n\t\tAuthority auth = authorityRepository.findTop1ByName(AuthorityType.ROLE_ADMIN);\n\t\tif (null == auth) {\n\t\t\tauth = Authority.createAdmin();\n\t\t\tauthorityRepository.save(auth);\n\t\t}\n\t\tAuthority authUser = authorityRepository.findTop1ByName(AuthorityType.ROLE_USER);\n\t\tif (null == authUser) {\n\t\t\tauthUser = Authority.createUser();\n\t\t\tauthorityRepository.save(authUser);\n\t\t}\n\t}", "public void testRequiredRolesMultipleRequiredGroupsOk() {\n User elmer = RoleFactory.createUser(\"elmer\");\n User pepe = RoleFactory.createUser(\"pepe\");\n User bugs = RoleFactory.createUser(\"bugs\");\n User daffy = RoleFactory.createUser(\"daffy\");\n \n Group administrators = RoleFactory.createGroup(\"administrators\");\n administrators.addRequiredMember(m_anyone);\n administrators.addMember(elmer);\n administrators.addMember(pepe);\n administrators.addMember(bugs);\n\n Group family = RoleFactory.createGroup(\"family\");\n family.addRequiredMember(m_anyone);\n family.addMember(elmer);\n family.addMember(pepe);\n family.addMember(daffy);\n\n Group alarmSystemActivation = RoleFactory.createGroup(\"alarmSystemActivation\");\n alarmSystemActivation.addMember(m_anyone);\n alarmSystemActivation.addRequiredMember(administrators);\n alarmSystemActivation.addRequiredMember(family);\n\n assertTrue(m_roleChecker.isImpliedBy(alarmSystemActivation, elmer));\n assertTrue(m_roleChecker.isImpliedBy(alarmSystemActivation, pepe));\n assertFalse(m_roleChecker.isImpliedBy(alarmSystemActivation, bugs));\n assertFalse(m_roleChecker.isImpliedBy(alarmSystemActivation, daffy));\n }", "public void testUserIsBlogOwnerByDefault() {\n rootBlog.removeProperty(SimpleBlog.BLOG_OWNERS_KEY);\n assertTrue(rootBlog.isUserInRole(Constants.BLOG_OWNER_ROLE, \"user1\"));\n assertTrue(rootBlog.isUserInRole(Constants.BLOG_OWNER_ROLE, \"usern\"));\n }", "boolean hasAdGroup();", "public boolean isOwned(){\n\t\treturn isOwned;\n\t}", "public Future<List<UUID>> checkOwner(Map<String, List<String>> req, String userId) {\n Promise<List<UUID>> p = Promise.promise();\n\n Future<List<UUID>> resGrp;\n Future<List<UUID>> resItem;\n if (req.containsKey(RES_GRP)) {\n\n List<String> resGrpIds = req.get(RES_GRP);\n resGrp = resGrpOwner(resGrpIds, userId);\n } else resGrp = Future.succeededFuture(new ArrayList<>());\n\n if (req.containsKey(RES)) {\n List<String> resIds = req.get(RES);\n resItem = resOwner(resIds, userId);\n } else resItem = Future.succeededFuture(new ArrayList<>());\n\n CompositeFuture.all(resGrp, resItem)\n .onSuccess(\n obj -> {\n List<UUID> resp = new ArrayList<>();\n if (!resGrp.result().isEmpty()) resp.addAll(resGrp.result());\n\n if (!resItem.result().isEmpty()) resp.addAll(resItem.result());\n\n p.complete(resp);\n })\n .onFailure(fail -> p.fail(INTERNALERROR));\n // return map of res_id,iowners in place of user id\n // check if userid is delegate for any of these owners\n // compose\n // check if user id is an active delegate of all of the owner ids for resource\n // return list of not delegate\n return p.future();\n }", "public void testRequiredRolesMultipleGroupsOk() {\n User elmer = RoleFactory.createUser(\"elmer\");\n User pepe = RoleFactory.createUser(\"pepe\");\n User bugs = RoleFactory.createUser(\"bugs\");\n User daffy = RoleFactory.createUser(\"daffy\");\n \n Group administrators = RoleFactory.createGroup(\"administrators\");\n administrators.addRequiredMember(m_anyone);\n administrators.addMember(elmer);\n administrators.addMember(pepe);\n administrators.addMember(bugs);\n\n Group family = RoleFactory.createGroup(\"family\");\n family.addRequiredMember(m_anyone);\n family.addMember(elmer);\n family.addMember(pepe);\n family.addMember(daffy);\n\n Group alarmSystemActivation = RoleFactory.createGroup(\"alarmSystemActivation\");\n alarmSystemActivation.addRequiredMember(m_anyone);\n alarmSystemActivation.addMember(administrators);\n alarmSystemActivation.addMember(family);\n\n assertTrue(m_roleChecker.isImpliedBy(alarmSystemActivation, elmer));\n assertTrue(m_roleChecker.isImpliedBy(alarmSystemActivation, pepe));\n assertTrue(m_roleChecker.isImpliedBy(alarmSystemActivation, bugs));\n assertTrue(m_roleChecker.isImpliedBy(alarmSystemActivation, daffy));\n }", "@Override\n public boolean existsGroupWithName(String groupName) {\n // \"Feature 'existsGroupWithName in OAuth 2 identity server' is not implemented\"\n return false;\n }", "@Override\n public boolean hasAccess(User user) {\n return user.hasRole(RoleValue.APP_ADMIN) || this.equals(user.company);\n }", "public void testGroupDoesNotImplySameGroup() {\n User user = RoleFactory.createUser(\"foo\");\n \n Group group = RoleFactory.createGroup(\"bar\");\n group.addMember(group);\n group.addMember(user);\n \n assertFalse(m_roleChecker.isImpliedBy(group, group));\n }", "private static boolean rscInGroup(IResourceGroup group,\n AbstractVizResource<?, ?> resource) {\n\n for (ResourcePair pair : group.getResourceList()) {\n if (pair.getResource() == resource) {\n return true;\n }\n AbstractResourceData resourceData = pair.getResourceData();\n if (resourceData instanceof IResourceGroup) {\n if (rscInGroup((IResourceGroup) resourceData, resource)) {\n return true;\n }\n }\n }\n return false;\n }", "@Test\n void testGetRegistrarForUser_inContacts_isNotAdmin() throws Exception {\n expectGetRegistrarSuccess(\n CLIENT_ID_WITH_CONTACT,\n USER,\n \"user [email protected] has [OWNER] access to registrar TheRegistrar\");\n verify(lazyGroupsConnection).get();\n }", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "private Principal validateUser( String username, String requiredGroups ) {\n UserService userService = ComponentAccessor.getComponent( UserService.class );\n UserManager userManager = ComponentAccessor.getUserManager();\n ApplicationUser appUser = userManager.getUserByKeyEvenWhenUnknown( username );\n\n if ( !userManager.isUserExisting(appUser) ) {\n log.warn( \"Unable to activate unregistered user: \" + username );\n return null;\n }\n log.debug(\"User account exists: \" + username);\n\n if ( !requiredGroups.equals(\"\") ) {\n UserUtil userUtil = ComponentAccessor.getUserUtil();\n GroupManager groupManager = ComponentAccessor.getGroupManager();\n\n SortedSet<String> groups = userUtil.getGroupNamesForUser(username);\n for (String requiredGroup: requiredGroups.split(\",\")) {\n requiredGroup = requiredGroup.toLowerCase().trim();\n if (!groups.contains(requiredGroup)) {\n log.debug(\"User missing '\"+requiredGroup+\"' group membership: \" + username);\n if (props.getProperty(\"groupmanagement\").contentEquals(\"required\")) {\n log.warn(\"Unable to authorise access attempt as user is missing required '\"+requiredGroup+\"' group membership: \"+ username);\n return null;\n } else if (props.getProperty(\"groupmanagement\").contentEquals(\"autojoin\")) {\n if (!groupManager.groupExists(requiredGroup)) {\n /* Could auto-create group if it makes sense to allow the upstream proxy to do so,\n * perhaps add an option for this. If group management becomes more sophisticated\n * we'd need an \"autosync\" option, that doesn't just \"autojoin\", but also removes\n * membership of any current internal groups which are absent from the header.\n */\n log.error(\"Can not add user to non-existant group '\"+requiredGroup+\"': \"+ username);\n return null;\n }\n log.warn(\"Adding '\"+requiredGroup+\"' group membership to user: \" + username);\n try {\n groupManager.addUserToGroup( appUser, groupManager.getGroup( requiredGroup ) );\n } catch (Exception e) {\n log.error(\"Failed to add '\"+requiredGroup+\"' group membership: \"+ e, e);\n return null;\n }\n }\n } else {\n log.debug(\"User has '\"+requiredGroup+\"' group membership: \" + username);\n }\n }\n }\n\n if (!appUser.isActive()) {\n log.debug(\"Atempting to reactivate inactive user account: \" + username);\n ApplicationUser userManagementAccount = getAdminUser();\n if ( userManagementAccount != null ) {\n JiraAuthenticationContext jiraAuthenticationContext = ComponentAccessor.getJiraAuthenticationContext();\n try {\n jiraAuthenticationContext.setLoggedInUser(userManagementAccount);\n ApplicationUser updateUser = (new ApplicationUserBuilderImpl(appUser)).active(true).build();\n UserService.UpdateUserValidationResult updateUserValidationResult = userService.validateUpdateUser(updateUser);\n if (updateUserValidationResult.isValid()) {\n userService.updateUser(updateUserValidationResult);\n log.warn(\"Reactivativated user account: \" + username);\n } else {\n log.error(\"User could not be enabled, please confirm user directory settings: \" + username);\n return null;\n }\n } catch (Exception e) {\n log.error(\"User could not be enabled, an error occurred (\"+e+\"): \"+username);\n return null;\n } finally {\n jiraAuthenticationContext.clearLoggedInUser();\n }\n } else {\n log.error(\"An enabled admin account is required to perform account management operations, no such account could not be found.\");\n return null;\n }\n }\n log.debug(\"Account confirmed active with required group membership: \" + username);\n return (Principal) appUser;\n }", "public boolean checkAccess(HasUuid object) {\n // Allow newly-instantiated objects\n if (!wasResolved(object)) {\n return true;\n }\n // Allow anything when there are no roles in use\n if (getRoles().isEmpty()) {\n return true;\n }\n Principal principal = getPrincipal();\n // Check for superusers\n if (!principalMapper.isAccessEnforced(principal, object)) {\n return true;\n }\n\n List<PropertyPath> paths = typeContext.getPrincipalPaths(object.getClass());\n PropertyPathChecker checker = checkers.get();\n for (PropertyPath path : paths) {\n path.evaluate(object, checker);\n if (checker.getResult()) {\n return true;\n }\n }\n addWarning(object, \"User %s does not have permission to edit this %s\", principal,\n typeContext.getPayloadName(object.getClass()));\n return false;\n }", "@Test\n public void ownerArgumentNotAddedIfOwnerIsInCustomGroup() throws AmplifyException {\n final AuthorizationType mode = AuthorizationType.OPENID_CONNECT;\n\n // OwnerInCustomGroup class uses combined owner and group-based auth,\n // and user is in the read-restricted custom group.\n for (SubscriptionType subscriptionType : SubscriptionType.values()) {\n GraphQLRequest<OwnerInCustomGroup> originalRequest =\n createRequest(OwnerInCustomGroup.class, subscriptionType);\n GraphQLRequest<OwnerInCustomGroup> modifiedRequest =\n decorator.decorate(originalRequest, mode);\n assertNull(getOwnerField(modifiedRequest));\n }\n }", "public void testNestedAclGroupsSupported()\n {\n assertTrue(_ruleSet.addGroup(\"aclgroup1\", Arrays.asList(new String[] {\"userb\"})));\n assertTrue(_ruleSet.addGroup(\"aclgroup2\", Arrays.asList(new String[] {\"usera\", \"aclgroup1\"}))); \n \n _ruleSet.grant(1, \"aclgroup2\", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n assertEquals(1, _ruleSet.getRuleCount());\n\n assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"usera\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"userb\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n }", "public static boolean hasAdministrativePermissions(@NotNull Session session, String... additionalAdminAuthorizableIdsOrPrincipalNames) throws RepositoryException {\n List<String> additionalAdminIdsOrPrincipalNames = Arrays.asList(Optional.ofNullable(additionalAdminAuthorizableIdsOrPrincipalNames).orElse(new String[0]));\n final JackrabbitSession jackrabbitSession;\n if (session instanceof JackrabbitSession) {\n jackrabbitSession = (JackrabbitSession) session;\n if (isOakVersionExposingBoundPrincipals(session.getRepository())) {\n if (hasAdministrativePermissionsWithPrincipals(jackrabbitSession, additionalAdminIdsOrPrincipalNames)) {\n return true;\n }\n }\n } else {\n jackrabbitSession = null;\n }\n // then evaluate user id\n String userId = session.getUserID();\n if (hasAdministrativePermissionsWithAuthorizableId(userId, additionalAdminIdsOrPrincipalNames)) {\n return true;\n }\n if (jackrabbitSession != null) {\n Authorizable authorizable = jackrabbitSession.getUserManager().getAuthorizable(userId);\n if (authorizable == null) {\n return false;\n }\n \n Iterator<Group> groupIterator = authorizable.memberOf();\n while (groupIterator.hasNext()) {\n String groupId = groupIterator.next().getID();\n if (hasAdministrativePermissionsWithAuthorizableId(groupId, additionalAdminIdsOrPrincipalNames)) {\n return true;\n }\n }\n } else {\n log.warn(\"could not evaluate group permissions but just user name\");\n }\n return false;\n }", "private void checkAccessRights(final String operation, final String id,\n final String username, final Profile myProfile,\n final String myUserId, final List<GroupElem> userGroups,\n final UserGroupRepository groupRepository) { Before we do anything check (for UserAdmin) that they are not trying\n // to add a user to any group outside of their own - if they are then\n // raise an exception - this shouldn't happen unless someone has\n // constructed their own malicious URL!\n //\n if (operation.equals(Params.Operation.NEWUSER)\n || operation.equals(Params.Operation.EDITINFO)\n || operation.equals(Params.Operation.FULLUPDATE)) {\n if (!(myUserId.equals(id)) && myProfile == Profile.UserAdmin) {\n final List<Integer> groupIds = groupRepository\n .findGroupIds(UserGroupSpecs.hasUserId(Integer\n .parseInt(myUserId)));\n for (GroupElem userGroup : userGroups) {\n boolean found = false;\n for (int myGroup : groupIds) {\n if (userGroup.getId() == myGroup) {\n found = true;\n }\n }\n if (!found) {\n throw new IllegalArgumentException(\n \"Tried to add group id \"\n + userGroup.getId()\n + \" to user \"\n + username\n + \" - not allowed \"\n + \"because you are not a member of that group!\");\n }\n }\n }\n }\n }", "public boolean hasObjUser() {\n return instance.hasObjUser();\n }", "private void checkPermission(User user, List sourceList, List targetList)\n throws AccessDeniedException\n {\n logger.debug(\"+\");\n if (isMove) {\n if (!SecurityGuard.canManage(user, sourceList.getContainerId()) ||\n !SecurityGuard.canContribute(user, targetList.getContainerId()))\n throw new AccessDeniedException(\"Forbidden\");\n }\n else {\n if (!SecurityGuard.canView(user, sourceList.getContainerId()) ||\n !SecurityGuard.canContribute(user, targetList.getContainerId()))\n throw new AccessDeniedException(\"Forbidden\");\n }\n logger.debug(\"-\");\n }", "public boolean checkEventsAndGroupsLink();", "@Test\n void validateUserGroupExist(){\n\n Boolean testing_result = true;\n int issue_id = 0;\n String issue_group = \"\";\n\n ArrayList<String> groups = new ArrayList<>();\n groups.add(\"admin\");\n groups.add(\"concordia\");\n groups.add(\"encs\");\n groups.add(\"comp\");\n groups.add(\"soen\");\n\n UserController uc = new UserController();\n\n LinkedHashMap<Integer, String> db_groups = uc.getAllUserGroups();\n\n for(int key : db_groups.keySet()){\n if(!groups.contains(db_groups.get(key))){\n issue_id = key;\n issue_group = db_groups.get(key);\n testing_result = false;\n }\n }\n\n Assertions.assertTrue(testing_result, \" There is an issue with user(id: \" + issue_id + \") having group as: \" + issue_group);\n\n }", "@Test\n\tpublic void testExistsInGroupSuccess() {\n\n\t\tgrupo.addColaborador(col1);\n\t\tboolean result = grupo.existsInGroup(col1);\n\n\t\tassertTrue(result);\n\t}", "@Override\n public boolean isOrganizationOwnedDeviceWithManagedProfile() {\n if (!mHasFeature) {\n return false;\n }\n return getOrganizationOwnedProfileUserId() != UserHandle.USER_NULL;\n }", "public boolean hasAccount(){\r\n\t\treturn (associatedAccount != null);\r\n\t}", "public boolean isSetGrant_group() {\n return this.grant_group != null;\n }", "public boolean hasUser() {\n return user_ != null;\n }", "public boolean hasUser() {\n return user_ != null;\n }", "private boolean hasEscalatingPrivilegesOnWrite(List<String> verbs, List<String> resources) {\n if (Collections.disjoint(verbs, EscalatingResources.ESCALATING_VERBS)) {\n return false;\n }\n\n return !Collections.disjoint(resources,\n EscalatingResources.ESCALATING_RESOURCES_ON_WRITE);\n }", "@Override\n\tpublic boolean isOwnMessage() {\n\t\ttry {\n\t\t\treturn (this.user.id == AccountManager.current_account.getUser().id);\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}", "boolean hasUserList();", "private boolean isInstructor(User user)\r\n {\r\n if (LOG.isDebugEnabled())\r\n {\r\n LOG.debug(\"isInstructor(User \" + user + \")\");\r\n }\r\n if (user != null)\r\n return SecurityService.unlock(user, \"site.upd\", getContextSiteId());\r\n else\r\n return false;\r\n }", "@Override\n protected boolean isAuthorized(PipelineData pipelineData) throws Exception\n {\n \t// use data.getACL() \n \treturn true;\n }", "@Test\n public void ownerArgumentAddedIfOwnerIsNotInCustomGroup() throws AmplifyException {\n final AuthorizationType mode = AuthorizationType.OPENID_CONNECT;\n final String expectedOwner = FakeOidcAuthProvider.SUB;\n\n // OwnerNotInCustomGroup class uses combined owner and group-based auth,\n // but user is not in the read-restricted custom group.\n for (SubscriptionType subscriptionType : SubscriptionType.values()) {\n GraphQLRequest<OwnerNotInCustomGroup> originalRequest =\n createRequest(OwnerNotInCustomGroup.class, subscriptionType);\n GraphQLRequest<OwnerNotInCustomGroup> modifiedRequest =\n decorator.decorate(originalRequest, mode);\n assertEquals(expectedOwner, getOwnerField(modifiedRequest));\n }\n }", "public boolean hasUser() {\n return userBuilder_ != null || user_ != null;\n }", "public boolean hasUser() {\n return userBuilder_ != null || user_ != null;\n }", "public void testExternalGroupsSupported()\n {\n _ruleSet.grant(1, \"extgroup1\", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n _ruleSet.grant(2, \"extgroup2\", Permission.DENY, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n assertEquals(2, _ruleSet.getRuleCount());\n\n assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"usera\", \"extgroup1\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n assertEquals(Result.DENIED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"userb\", \"extgroup2\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n }", "public void testAclGroupsSupported()\n {\n assertTrue(_ruleSet.addGroup(\"aclgroup\", Arrays.asList(new String[] {\"usera\", \"userb\"}))); \n \n _ruleSet.grant(1, \"aclgroup\", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n assertEquals(1, _ruleSet.getRuleCount());\n\n assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"usera\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"userb\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n assertEquals(Result.DEFER, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"userc\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n }", "private boolean isAllowedToCreate(String userId, SignupMeeting signupMeeting) {\n\t\tif (sakaiFacade.isUserAdmin(userId))\n\t\t\treturn true;\n\n\t\tList<SignupSite> signupSites = signupMeeting.getSignupSites();\n\t\tfor (SignupSite site : signupSites) {\n\t\t\tif (site.isSiteScope()) {\n\t\t\t\tif (!sakaiFacade.isAllowedSite(userId, SakaiFacade.SIGNUP_CREATE_SITE, site.getSiteId()))\n\t\t\t\t\treturn false;\n\t\t\t\telse {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (sakaiFacade.isAllowedSite(userId, SakaiFacade.SIGNUP_CREATE_SITE, site.getSiteId())\n\t\t\t\t\t\t|| sakaiFacade.isAllowedSite(userId, SakaiFacade.SIGNUP_CREATE_GROUP_ALL, site.getSiteId()))\n\t\t\t\t\tcontinue;\n\n\t\t\t\tList<SignupGroup> signupGroups = site.getSignupGroups();\n\t\t\t\tfor (SignupGroup group : signupGroups) {\n\t\t\t\t\tif (!(sakaiFacade.isAllowedGroup(userId, SakaiFacade.SIGNUP_CREATE_GROUP, site.getSiteId(), group.getGroupId()) \n\t\t\t\t\t\t\t|| sakaiFacade.isAllowedGroup(userId, SakaiFacade.SIGNUP_CREATE_GROUP_ALL, site.getSiteId(), group.getGroupId())))\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\n\t}", "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 }", "public boolean isSurveyAssigned(Long surveyId, long userId);", "private static Boolean isAuthorised(Page page, List<GrantedAuthority> userAuthorities ) {\n if ( page.getAllowedRoles().size() == 0 ) {\n return true;\n }\n \n for ( GrantedAuthority role : userAuthorities ) {\n for ( String requiredRole : page.getAllowedRoles() ) {\n if ( role.getAuthority().equals(requiredRole) ) {\n return true;\n }\n }\n }\n return false;\n }", "public boolean hasUser() {\n return instance.hasUser();\n }", "@Test\n void testGetRegistrarForUser_inContacts_isAdmin() throws Exception {\n expectGetRegistrarSuccess(\n CLIENT_ID_WITH_CONTACT,\n GAE_ADMIN,\n \"admin [email protected] has [OWNER, ADMIN] access to registrar TheRegistrar\");\n verifyNoInteractions(lazyGroupsConnection);\n }", "boolean hasCustomerUserAccess();", "public boolean hasUser() {\n return user_ != null;\n }", "@Override\n public boolean existPrincipalWithName(String userName) {\n // \"Feature 'existPrincipalWithName in OAuth 2 identity server' is not implemented\"\n return false;\n }", "protected Boolean hasAccess(RMApp app, HttpServletRequest hsr) {\n UserGroupInformation callerUGI = getCallerUserGroupInformation(hsr, true);\n List<String> forwardedAddresses = null;\n String forwardedFor = hsr.getHeader(RMWSConsts.FORWARDED_FOR);\n if (forwardedFor != null) {\n forwardedAddresses = Arrays.asList(forwardedFor.split(\",\"));\n }\n if (callerUGI != null\n && !(this.rm.getApplicationACLsManager().checkAccess(callerUGI,\n ApplicationAccessType.VIEW_APP, app.getUser(),\n app.getApplicationId())\n || this.rm.getQueueACLsManager().checkAccess(callerUGI,\n QueueACL.ADMINISTER_QUEUE, app, hsr.getRemoteAddr(),\n forwardedAddresses))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean isUserInRole(final String roleName) {\n return scopes.contains(roleName);\n }", "boolean hasAttackerRoleId();", "private static boolean checkExistenceAndOwner(String username, String clientData, String playlist){\n //Check if user exists\n if (!CheckExistence.userExists(username)){\n System.out.println(clientData + \" | \" + username\n + \" | User not found.\");\n return false;\n }\n\n //Check if playlist exists\n if (!CheckExistence.playlistExists(playlist)){\n System.out.println(clientData + \" | \" + username\n + \" | Playlist not found.\");\n return false;\n }\n\n //Check if user owns the playlist\n if (!Permission.ownsPlaylist(username, playlist)){\n System.out.println(clientData + \" | \" + username\n + \" | You don't own this playlist.\");\n return false;\n }\n return true;\n }", "@Override\n public boolean isAdmin(String username) {\n return isMember(GROUPING_ADMINS, username);\n }", "@Test\n public void ownerArgumentNotAddedForNonRestrictedReadWithUserPools() throws AmplifyException {\n final AuthorizationType mode = AuthorizationType.AMAZON_COGNITO_USER_POOLS;\n\n // OwnerCreate class only has restriction on CREATE\n for (SubscriptionType subscriptionType : SubscriptionType.values()) {\n GraphQLRequest<OwnerCreate> originalRequest = createRequest(OwnerCreate.class, subscriptionType);\n GraphQLRequest<OwnerCreate> modifiedRequest = decorator.decorate(originalRequest, mode);\n assertNull(getOwnerField(modifiedRequest));\n }\n\n // OwnerUpdate class only has restriction on UPDATE\n for (SubscriptionType subscriptionType : SubscriptionType.values()) {\n GraphQLRequest<OwnerUpdate> originalRequest = createRequest(OwnerUpdate.class, subscriptionType);\n GraphQLRequest<OwnerUpdate> modifiedRequest = decorator.decorate(originalRequest, mode);\n assertNull(getOwnerField(modifiedRequest));\n }\n\n // OwnerDelete class only has restriction on DELETE\n for (SubscriptionType subscriptionType : SubscriptionType.values()) {\n GraphQLRequest<OwnerDelete> originalRequest = createRequest(OwnerDelete.class, subscriptionType);\n GraphQLRequest<OwnerDelete> modifiedRequest = decorator.decorate(originalRequest, mode);\n assertNull(getOwnerField(modifiedRequest));\n }\n }", "public boolean isCreateRight() {\r\n if (getUser() != null) {\r\n return getUser().hasPermission(\"/vocabularies\", \"c\");\r\n }\r\n return false;\r\n }", "public boolean inGroup(String groupName) {\r\n return true;\r\n }", "public boolean isSetResources() {\n return this.resources != null;\n }", "public boolean isSetResources() {\n return this.resources != null;\n }", "boolean isHasResources();" ]
[ "0.5894318", "0.5801058", "0.5673422", "0.5610296", "0.5585894", "0.5500463", "0.54556257", "0.5437542", "0.54335564", "0.54328614", "0.5427593", "0.54263407", "0.5416047", "0.5406893", "0.5386426", "0.53794044", "0.53714055", "0.5365988", "0.5363266", "0.5347654", "0.5345159", "0.53382015", "0.5334843", "0.53253496", "0.53215235", "0.5305248", "0.52882946", "0.5280534", "0.527796", "0.52648085", "0.52639467", "0.5259915", "0.52566", "0.525265", "0.52357745", "0.5204961", "0.52029586", "0.51889485", "0.5179047", "0.51736", "0.5160015", "0.5155742", "0.5155431", "0.5150894", "0.51109695", "0.5108312", "0.51009375", "0.5098971", "0.5094861", "0.5094861", "0.5094861", "0.5094861", "0.5094861", "0.5094861", "0.5094861", "0.50728405", "0.5066165", "0.5063207", "0.50611824", "0.5036893", "0.5031335", "0.50059307", "0.500587", "0.5004846", "0.5004371", "0.4988595", "0.49817172", "0.49797806", "0.49721935", "0.49692893", "0.49692893", "0.4962386", "0.49577275", "0.49540126", "0.4946115", "0.49367902", "0.49271756", "0.49268392", "0.49268392", "0.49245507", "0.49234235", "0.49209884", "0.49083573", "0.4901629", "0.48973978", "0.4895655", "0.48948547", "0.48921883", "0.48895437", "0.4883141", "0.48828822", "0.4875283", "0.48749086", "0.4865575", "0.48555413", "0.48367116", "0.48336112", "0.48321", "0.48301664", "0.48301664", "0.48289162" ]
0.0
-1
checks if for user owns the resource_groups
public Future<List<UUID>> resOwner(List<String> ids, String userId) { Promise<List<UUID>> p = Promise.promise(); Collector<Row, ?, List<UUID>> providerIdCollector = Collectors.mapping(row -> row.getUUID(PROVIDER_ID), Collectors.toList()); pool.withConnection( conn -> conn.preparedQuery(RES_OWNER) .collecting(providerIdCollector) .execute( Tuple.of(UUID.fromString(userId)).addArrayOfString(ids.toArray(String[]::new))) .onFailure( obj -> { LOGGER.error("resOwner db fail :: " + obj.getLocalizedMessage()); p.fail(INTERNALERROR); }) .onSuccess( success -> { p.complete(success.value()); })); return p.future(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasUserManaged();", "@Override\n public boolean isOwner(String groupingPath, String username) {\n return isMember(groupingPath + OWNERS, username);\n }", "@Test\n public void ownerArgumentNotAddedIfOwnerIsInGroupWithUserPools() throws AmplifyException {\n final AuthorizationType mode = AuthorizationType.AMAZON_COGNITO_USER_POOLS;\n\n // OwnerInGroup class uses combined owner and group-based auth,\n // and user is in the read-restricted group.\n for (SubscriptionType subscriptionType : SubscriptionType.values()) {\n GraphQLRequest<OwnerInGroup> originalRequest =\n createRequest(OwnerInGroup.class, subscriptionType);\n GraphQLRequest<OwnerInGroup> modifiedRequest =\n decorator.decorate(originalRequest, mode);\n assertNull(getOwnerField(modifiedRequest));\n }\n }", "private boolean checkAppInstanceOwnership(){\n\n\t\ttry {\n\t\t\t\n\t\t\t\n\t \tif(getUser() != null){\n\t \t\t\n\t \t\tif(getUser().getRole().equalsIgnoreCase(UserRoles.admin.toString()))\n\t \t\t\treturn true;\n\t \t\telse{\n\t \t\t\t\n\t\t\t\t\tAppInstance app = AHEEngine.getAppInstanceEntity(Long.valueOf(appinst));\n\t \t\t\t\t\t\t\t\t\n\t \t\t\tif(app != null){\n\t \t\t\t\t\n\t \t\t\t\tif(app.getOwner().getId() == getUser().getId())\n\t \t\t\t\t\treturn true;\n\t \t\t\t\telse{\n\t \t\t\t\t\tsetStatus(Status.CLIENT_ERROR_FORBIDDEN);\n\t \t\t\t\t\treturn false;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\t\t\n\t \t\t\t\n\t \t\t}\n\t \t\t\n\t \t}\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (AHEException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tsetStatus(Status.CLIENT_ERROR_FORBIDDEN);\n \treturn false;\n }", "protected static boolean canUnPublish(SlingHttpServletRequest request) throws RepositoryException {\n boolean canUnPublish = false;\n Session session = request.getResourceResolver().adaptTo(Session.class);\n UserManager userManager = AccessControlUtil.getUserManager(session);\n Iterator<Group> groupIterator = userManager.getAuthorizable(session.getUserID()).memberOf();\n while (groupIterator.hasNext()) {\n Authorizable group = groupIterator.next();\n if (group.isGroup() && PantheonConstants.PANTHEON_PUBLISHERS.equalsIgnoreCase(group.getID())) {\n canUnPublish = true;\n break;\n }\n }\n return canUnPublish;\n }", "boolean validateUserGroups(SessionState state, String userId, Assignment asn)\n\t{\n\t\tSite site = getSite(asn);\n\n\t\t// finding any of the user's groups is sufficient, if they are in multiple groups the check\n\t\t// will fail no matter which of their groups is used\n\t\tOptional<Group> userGroup = getGroupsWithUser(userId, asn, site).stream().findAny();\n\t\tif (userGroup.isPresent())\n\t\t{\n\t\t\treturn checkSubmissionForUsersInMultipleGroups(asn, userGroup.get(), state, true).isEmpty();\n\t\t}\n\n\t\t// user is not in any assignment groups, if they are an instructor this is probably the Student View feature so let them through\n\t\treturn assignmentService.allowAddAssignment(site.getId()) || assignmentService.allowUpdateAssignmentInContext(site.getId());\n\t}", "private boolean userHasAllowedRole(User u, String[] allowedRoles) {\n\n for (GroupRef group : u.getGroups()) {\n\n if (Arrays.binarySearch(allowedRoles, group.getDisplay()) >= 0) {\n return true;\n }\n }\n\n return false;\n }", "private void checkRights() {\n image.setEnabled(true);\n String user = fc.window.getUserName();\n \n for(IDataObject object : objects){\n ArrayList<IRights> rights = object.getRights();\n \n if(rights != null){\n boolean everybodyperm = false;\n \n for(IRights right : rights){\n String name = right.getName();\n \n //user found, therefore no other check necessary.\n if(name.equals(user)){\n if(!right.getOwner()){\n image.setEnabled(false);\n }else{\n image.setEnabled(true);\n }\n return;\n //if no user found, use everybody\n }else if(name.equals(BUNDLE.getString(\"Everybody\"))){\n everybodyperm = right.getOwner();\n }\n }\n image.setEnabled(everybodyperm);\n if(!everybodyperm){\n return;\n }\n }\n }\n }", "@Test\n\tvoid addUserToGroup() {\n\t\t// Pre condition\n\t\tAssertions.assertTrue(resource.findById(\"wuser\").getGroups().contains(\"Biz Agency Manager\"));\n\n\t\tresource.addUserToGroup(\"wuser\", \"biz agency manager\");\n\n\t\t// Post condition -> no change\n\t\tAssertions.assertTrue(resource.findById(\"wuser\").getGroups().contains(\"Biz Agency Manager\"));\n\t}", "public boolean inGroup(Person p){\n\t return false;\n }", "@Override\n public boolean hasDeviceOwner() {\n final CallerIdentity caller = getCallerIdentity();\n Preconditions.checkCallAuthorization(isDefaultDeviceOwner(caller)\n || canManageUsers(caller) || isFinancedDeviceOwner(caller)\n || hasCallingOrSelfPermission(permission.MANAGE_PROFILE_AND_DEVICE_OWNERS));\n return mOwners.hasDeviceOwner();\n }", "boolean isSetRequiredResources();", "public boolean isUserInGroup(long idUser, long idGroup);", "public void testUserDoesNotImplyNotImpliedGroup() {\n User user = RoleFactory.createUser(\"foo\");\n Group group = RoleFactory.createGroup(\"bar\");\n \n assertFalse(m_roleChecker.isImpliedBy(user, group));\n }", "boolean isHasPermissions();", "public boolean hasUser(){\n return numUser < MAX_USER;\n }", "public boolean isGroupAdmin(int userId){\n return userId == groupAdmin;\n }", "@Override\n public boolean inGroup(String worldName, String playerName, String groupName) {\n try {\n PermissionUser[] userList = PermissionsEx.getPermissionManager().getGroup(groupName).getUsers();\n for (PermissionUser user : userList) {\n if (user.getName() == playerName)\n return true;\n else\n return false;\n }\n } catch (Exception e) {\n return false;\n }\n return false;\n }", "private boolean canView(final AbstractItem item) throws AccessDeniedException {\n\t\tif (item.isRssAllowed())\n\t\t\treturn true;\n\t\tList<Subscriber> subscribers = Lists.newArrayList(subscriberRepository.findAll(SubscriberPredicates.onCtx(item\n\t\t\t\t.getContextKey())));\n\t\t// TODO we consider that all items have targets directly on\n\t\t// for targets defined only on classification a check will be needed\n\t\tif (subscribers.isEmpty()) {\n\t\t\tlog.trace(\"Subscribers on item {} are empty -> true\", item.getContextKey());\n\t\t\treturn true;\n\t\t}\n\t\tfinal CustomUserDetails user = SecurityUtils.getCurrentUserDetails();\n\t\tif (user == null) {\n\t\t\tlog.trace(\"user is not authenticated -> throw an error to redirect on authentication\");\n\t\t\tthrow new AccessDeniedException(\"Access is denied to anonymous !\");\n\t\t} else if (user.getRoles().contains(AuthoritiesConstants.ADMIN)\n\t\t\t\t|| user.getUser().getLogin().equalsIgnoreCase(item.getCreatedBy().getLogin())\n\t\t\t\t|| user.getUser().getLogin().equalsIgnoreCase(item.getLastModifiedBy().getLogin())) {\n\t\t\treturn true;\n\t\t}\n\n\t\tfinal UserDTO userDTO = user.getUser();\n\t\tif (userDTO != null) {\n\t\t\tList<String> groups = null;\n\t\t\tif (userDTO.getAttributes() != null) {\n\t\t\t\tgroups = userDTO.getAttributes().get(externalUserHelper.getUserGroupAttribute());\n\t\t\t}\n\t\t\tfor (Subscriber subscriber : subscribers) {\n\t\t\t\tlog.trace(\"Check if {} is in {}\", userDTO, subscriber);\n\t\t\t\tfinal SubjectKeyExtended subject = subscriber.getSubjectCtxId().getSubject();\n\t\t\t\tswitch (subject.getKeyType()) {\n\t\t\t\tcase GROUP:\n\t\t\t\t\tif (groups == null || groups.isEmpty()) {\n\t\t\t\t\t\tlog.trace(\"The user doesn't have a group -> break loop\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t// test on startWith as some groups in IsMemberOf has only a part the\n\t\t\t\t\t// real group name.\n\t\t\t\t\tfor (String val : groups) {\n\t\t\t\t\t\tif (val.startsWith(subject.getKeyValue())) {\n\t\t\t\t\t\t\tlog.trace(\"Check if the user group {} match subscriber group {} -> return true\", val,\n\t\t\t\t\t\t\t\t\tsubject.getKeyValue());\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase PERSON:\n\t\t\t\t\tif (subject.getKeyValue().equalsIgnoreCase(userDTO.getLogin())) {\n\t\t\t\t\t\tlog.trace(\"Check if the user key {} match subscriber key {} -> true\", userDTO.getLogin(),\n\t\t\t\t\t\t\t\tsubject.getKeyValue());\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase PERSON_ATTR:\n\t\t\t\t\tif (subject.getKeyAttribute() != null\n\t\t\t\t\t\t\t&& userDTO.getAttributes().containsKey(subject.getKeyAttribute())\n\t\t\t\t\t\t\t&& userDTO.getAttributes().get(subject.getKeyAttribute()).contains(subject.getKeyValue())) {\n\t\t\t\t\t\tlog.trace(\"Check if the user attribute {} with values {} contains value {} -> true\",\n\t\t\t\t\t\t\t\tsubject.getKeyAttribute(), userDTO.getAttributes().get(subject.getKeyAttribute()),\n\t\t\t\t\t\t\t\tsubject.getKeyValue());\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase PERSON_ATTR_REGEX:\n\t\t\t\t\tif (subject.getKeyAttribute() != null\n\t\t\t\t\t\t\t&& userDTO.getAttributes().containsKey(subject.getKeyAttribute())) {\n\t\t\t\t\t\tfor (final String value : userDTO.getAttributes().get(subject.getKeyAttribute())) {\n\t\t\t\t\t\t\tif (value.matches(subject.getKeyValue())) {\n\t\t\t\t\t\t\t\tlog.trace(\"Check if the user attribute {} with values {} match regex {} -> true\",\n\t\t\t\t\t\t\t\t\t\tsubject.getKeyAttribute(),\n\t\t\t\t\t\t\t\t\t\tuserDTO.getAttributes().get(subject.getKeyAttribute()), subject.getKeyValue());\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new IllegalStateException(\"Warning Subject Type '\" + subject.getKeyType()\n\t\t\t\t\t\t\t+ \"' is not managed\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlog.trace(\"End of all checks -> false\");\n\t\treturn false;\n\t}", "boolean hasRole();", "private static boolean isAuthorized(\n @Nonnull Authorizer authorizer,\n @Nonnull String actor,\n @Nonnull ConjunctivePrivilegeGroup requiredPrivileges,\n @Nonnull Optional<ResourceSpec> resourceSpec) {\n for (final String privilege : requiredPrivileges.getRequiredPrivileges()) {\n // Create and evaluate an Authorization request.\n final AuthorizationRequest request = new AuthorizationRequest(actor, privilege, resourceSpec);\n final AuthorizationResult result = authorizer.authorize(request);\n if (AuthorizationResult.Type.DENY.equals(result.getType())) {\n // Short circuit.\n return false;\n }\n }\n return true;\n }", "public void testUserIsBlogOwner() {\n rootBlog.setProperty(SimpleBlog.BLOG_OWNERS_KEY, \"user1\");\n assertTrue(rootBlog.isUserInRole(Constants.BLOG_OWNER_ROLE, \"user1\"));\n assertFalse(rootBlog.isUserInRole(Constants.BLOG_OWNER_ROLE, \"user2\"));\n }", "public void testGroupDoesNotImplySameRequiredGroup() {\n User user = RoleFactory.createUser(\"foo\");\n \n Group group = RoleFactory.createGroup(\"bar\");\n group.addRequiredMember(group);\n group.addMember(user);\n \n assertFalse(m_roleChecker.isImpliedBy(group, group));\n }", "boolean hasObjUser();", "@Test\n public void ownerArgumentAddedIfOwnerIsNotInGroupWithUserPools() throws AmplifyException {\n final AuthorizationType mode = AuthorizationType.AMAZON_COGNITO_USER_POOLS;\n final String expectedOwner = FakeCognitoAuthProvider.USERNAME;\n\n // OwnerNotInGroup class uses combined owner and group-based auth,\n // but user is not in the read-restricted group.\n for (SubscriptionType subscriptionType : SubscriptionType.values()) {\n GraphQLRequest<OwnerNotInGroup> originalRequest =\n createRequest(OwnerNotInGroup.class, subscriptionType);\n GraphQLRequest<OwnerNotInGroup> modifiedRequest =\n decorator.decorate(originalRequest, mode);\n assertEquals(expectedOwner, getOwnerField(modifiedRequest));\n }\n }", "public static void adminOrOwnerCheck(User current,\n User resourceOwner)\n throws ServiceException {\n\n if (!current.equals(resourceOwner) &&\n !current.isRole(\"ROLE_ADMIN\")) {\n throw new ServiceException(ServiceStatus.ACCESS_DENIED);\n }\n }", "public boolean hasGroup(String groupName){\n\t\tGuild self = this;\r\n//\t\tSystem.out.println(\"this=\" + name +\" self.groups=\"+ groups);\r\n\t\tif (self.groups == null || self.groups.isEmpty())/// try and get it again from db\r\n\t\t\tself = MysticGuilds.getGuild(this.getName());\r\n\t\tif (self == null || self.groups == null || self.groups.isEmpty())\r\n\t\t\treturn false;\r\n\t\tfor (PermissionGroup group: self.groups){\r\n//\t\t\tSystem.out.println(\"looking at group = \" + group);\r\n\t\t\tif (group.getName().equalsIgnoreCase(groupName))\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isGroupPossible()\n\t\t{\n\t\t\treturn this.m_allowedAddGroupRefs != null && ! this.m_allowedAddGroupRefs.isEmpty();\n\n\t\t}", "boolean hasPrincipal();", "public boolean hasObjUser() {\n return objUser_ != null;\n }", "public void testGroupDoesNotImplyNotImpliedUser() {\n User user = RoleFactory.createUser(\"foo\");\n \n Group group = RoleFactory.createGroup(\"bar\");\n group.addMember(user);\n \n assertFalse(m_roleChecker.isImpliedBy(user, group));\n }", "boolean hasConceptGroup();", "protected boolean isValid(AccessUser obj)\n {\n return obj != null && obj.username != null && !getMembers().contains(obj);\n }", "public boolean getAllSpacesOwned(){\n\t\treturn allSpacesOwned;\n\t}", "public void testUserImpliesImpliedGroup() {\n User user = RoleFactory.createUser(\"foo\");\n \n Group group = RoleFactory.createGroup(\"bar\");\n group.addRequiredMember(m_anyone);\n group.addMember(user);\n\n assertTrue(m_roleChecker.isImpliedBy(group, user));\n }", "public boolean owns(String establishment) {\n for (int i = 0; i < Establishments.size(); i++) {\n if (Establishments.get(i).getName().equals(establishment)) {\n return true;\n }\n }\n return false;\n }", "private void checkUserAuthorities() {\n\t\tAuthority auth = authorityRepository.findTop1ByName(AuthorityType.ROLE_ADMIN);\n\t\tif (null == auth) {\n\t\t\tauth = Authority.createAdmin();\n\t\t\tauthorityRepository.save(auth);\n\t\t}\n\t\tAuthority authUser = authorityRepository.findTop1ByName(AuthorityType.ROLE_USER);\n\t\tif (null == authUser) {\n\t\t\tauthUser = Authority.createUser();\n\t\t\tauthorityRepository.save(authUser);\n\t\t}\n\t}", "public void testRequiredRolesMultipleRequiredGroupsOk() {\n User elmer = RoleFactory.createUser(\"elmer\");\n User pepe = RoleFactory.createUser(\"pepe\");\n User bugs = RoleFactory.createUser(\"bugs\");\n User daffy = RoleFactory.createUser(\"daffy\");\n \n Group administrators = RoleFactory.createGroup(\"administrators\");\n administrators.addRequiredMember(m_anyone);\n administrators.addMember(elmer);\n administrators.addMember(pepe);\n administrators.addMember(bugs);\n\n Group family = RoleFactory.createGroup(\"family\");\n family.addRequiredMember(m_anyone);\n family.addMember(elmer);\n family.addMember(pepe);\n family.addMember(daffy);\n\n Group alarmSystemActivation = RoleFactory.createGroup(\"alarmSystemActivation\");\n alarmSystemActivation.addMember(m_anyone);\n alarmSystemActivation.addRequiredMember(administrators);\n alarmSystemActivation.addRequiredMember(family);\n\n assertTrue(m_roleChecker.isImpliedBy(alarmSystemActivation, elmer));\n assertTrue(m_roleChecker.isImpliedBy(alarmSystemActivation, pepe));\n assertFalse(m_roleChecker.isImpliedBy(alarmSystemActivation, bugs));\n assertFalse(m_roleChecker.isImpliedBy(alarmSystemActivation, daffy));\n }", "public void testUserIsBlogOwnerByDefault() {\n rootBlog.removeProperty(SimpleBlog.BLOG_OWNERS_KEY);\n assertTrue(rootBlog.isUserInRole(Constants.BLOG_OWNER_ROLE, \"user1\"));\n assertTrue(rootBlog.isUserInRole(Constants.BLOG_OWNER_ROLE, \"usern\"));\n }", "boolean hasAdGroup();", "public boolean isOwned(){\n\t\treturn isOwned;\n\t}", "public Future<List<UUID>> checkOwner(Map<String, List<String>> req, String userId) {\n Promise<List<UUID>> p = Promise.promise();\n\n Future<List<UUID>> resGrp;\n Future<List<UUID>> resItem;\n if (req.containsKey(RES_GRP)) {\n\n List<String> resGrpIds = req.get(RES_GRP);\n resGrp = resGrpOwner(resGrpIds, userId);\n } else resGrp = Future.succeededFuture(new ArrayList<>());\n\n if (req.containsKey(RES)) {\n List<String> resIds = req.get(RES);\n resItem = resOwner(resIds, userId);\n } else resItem = Future.succeededFuture(new ArrayList<>());\n\n CompositeFuture.all(resGrp, resItem)\n .onSuccess(\n obj -> {\n List<UUID> resp = new ArrayList<>();\n if (!resGrp.result().isEmpty()) resp.addAll(resGrp.result());\n\n if (!resItem.result().isEmpty()) resp.addAll(resItem.result());\n\n p.complete(resp);\n })\n .onFailure(fail -> p.fail(INTERNALERROR));\n // return map of res_id,iowners in place of user id\n // check if userid is delegate for any of these owners\n // compose\n // check if user id is an active delegate of all of the owner ids for resource\n // return list of not delegate\n return p.future();\n }", "public void testRequiredRolesMultipleGroupsOk() {\n User elmer = RoleFactory.createUser(\"elmer\");\n User pepe = RoleFactory.createUser(\"pepe\");\n User bugs = RoleFactory.createUser(\"bugs\");\n User daffy = RoleFactory.createUser(\"daffy\");\n \n Group administrators = RoleFactory.createGroup(\"administrators\");\n administrators.addRequiredMember(m_anyone);\n administrators.addMember(elmer);\n administrators.addMember(pepe);\n administrators.addMember(bugs);\n\n Group family = RoleFactory.createGroup(\"family\");\n family.addRequiredMember(m_anyone);\n family.addMember(elmer);\n family.addMember(pepe);\n family.addMember(daffy);\n\n Group alarmSystemActivation = RoleFactory.createGroup(\"alarmSystemActivation\");\n alarmSystemActivation.addRequiredMember(m_anyone);\n alarmSystemActivation.addMember(administrators);\n alarmSystemActivation.addMember(family);\n\n assertTrue(m_roleChecker.isImpliedBy(alarmSystemActivation, elmer));\n assertTrue(m_roleChecker.isImpliedBy(alarmSystemActivation, pepe));\n assertTrue(m_roleChecker.isImpliedBy(alarmSystemActivation, bugs));\n assertTrue(m_roleChecker.isImpliedBy(alarmSystemActivation, daffy));\n }", "@Override\n public boolean existsGroupWithName(String groupName) {\n // \"Feature 'existsGroupWithName in OAuth 2 identity server' is not implemented\"\n return false;\n }", "@Override\n public boolean hasAccess(User user) {\n return user.hasRole(RoleValue.APP_ADMIN) || this.equals(user.company);\n }", "public void testGroupDoesNotImplySameGroup() {\n User user = RoleFactory.createUser(\"foo\");\n \n Group group = RoleFactory.createGroup(\"bar\");\n group.addMember(group);\n group.addMember(user);\n \n assertFalse(m_roleChecker.isImpliedBy(group, group));\n }", "private static boolean rscInGroup(IResourceGroup group,\n AbstractVizResource<?, ?> resource) {\n\n for (ResourcePair pair : group.getResourceList()) {\n if (pair.getResource() == resource) {\n return true;\n }\n AbstractResourceData resourceData = pair.getResourceData();\n if (resourceData instanceof IResourceGroup) {\n if (rscInGroup((IResourceGroup) resourceData, resource)) {\n return true;\n }\n }\n }\n return false;\n }", "@Test\n void testGetRegistrarForUser_inContacts_isNotAdmin() throws Exception {\n expectGetRegistrarSuccess(\n CLIENT_ID_WITH_CONTACT,\n USER,\n \"user [email protected] has [OWNER] access to registrar TheRegistrar\");\n verify(lazyGroupsConnection).get();\n }", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "private Principal validateUser( String username, String requiredGroups ) {\n UserService userService = ComponentAccessor.getComponent( UserService.class );\n UserManager userManager = ComponentAccessor.getUserManager();\n ApplicationUser appUser = userManager.getUserByKeyEvenWhenUnknown( username );\n\n if ( !userManager.isUserExisting(appUser) ) {\n log.warn( \"Unable to activate unregistered user: \" + username );\n return null;\n }\n log.debug(\"User account exists: \" + username);\n\n if ( !requiredGroups.equals(\"\") ) {\n UserUtil userUtil = ComponentAccessor.getUserUtil();\n GroupManager groupManager = ComponentAccessor.getGroupManager();\n\n SortedSet<String> groups = userUtil.getGroupNamesForUser(username);\n for (String requiredGroup: requiredGroups.split(\",\")) {\n requiredGroup = requiredGroup.toLowerCase().trim();\n if (!groups.contains(requiredGroup)) {\n log.debug(\"User missing '\"+requiredGroup+\"' group membership: \" + username);\n if (props.getProperty(\"groupmanagement\").contentEquals(\"required\")) {\n log.warn(\"Unable to authorise access attempt as user is missing required '\"+requiredGroup+\"' group membership: \"+ username);\n return null;\n } else if (props.getProperty(\"groupmanagement\").contentEquals(\"autojoin\")) {\n if (!groupManager.groupExists(requiredGroup)) {\n /* Could auto-create group if it makes sense to allow the upstream proxy to do so,\n * perhaps add an option for this. If group management becomes more sophisticated\n * we'd need an \"autosync\" option, that doesn't just \"autojoin\", but also removes\n * membership of any current internal groups which are absent from the header.\n */\n log.error(\"Can not add user to non-existant group '\"+requiredGroup+\"': \"+ username);\n return null;\n }\n log.warn(\"Adding '\"+requiredGroup+\"' group membership to user: \" + username);\n try {\n groupManager.addUserToGroup( appUser, groupManager.getGroup( requiredGroup ) );\n } catch (Exception e) {\n log.error(\"Failed to add '\"+requiredGroup+\"' group membership: \"+ e, e);\n return null;\n }\n }\n } else {\n log.debug(\"User has '\"+requiredGroup+\"' group membership: \" + username);\n }\n }\n }\n\n if (!appUser.isActive()) {\n log.debug(\"Atempting to reactivate inactive user account: \" + username);\n ApplicationUser userManagementAccount = getAdminUser();\n if ( userManagementAccount != null ) {\n JiraAuthenticationContext jiraAuthenticationContext = ComponentAccessor.getJiraAuthenticationContext();\n try {\n jiraAuthenticationContext.setLoggedInUser(userManagementAccount);\n ApplicationUser updateUser = (new ApplicationUserBuilderImpl(appUser)).active(true).build();\n UserService.UpdateUserValidationResult updateUserValidationResult = userService.validateUpdateUser(updateUser);\n if (updateUserValidationResult.isValid()) {\n userService.updateUser(updateUserValidationResult);\n log.warn(\"Reactivativated user account: \" + username);\n } else {\n log.error(\"User could not be enabled, please confirm user directory settings: \" + username);\n return null;\n }\n } catch (Exception e) {\n log.error(\"User could not be enabled, an error occurred (\"+e+\"): \"+username);\n return null;\n } finally {\n jiraAuthenticationContext.clearLoggedInUser();\n }\n } else {\n log.error(\"An enabled admin account is required to perform account management operations, no such account could not be found.\");\n return null;\n }\n }\n log.debug(\"Account confirmed active with required group membership: \" + username);\n return (Principal) appUser;\n }", "public boolean checkAccess(HasUuid object) {\n // Allow newly-instantiated objects\n if (!wasResolved(object)) {\n return true;\n }\n // Allow anything when there are no roles in use\n if (getRoles().isEmpty()) {\n return true;\n }\n Principal principal = getPrincipal();\n // Check for superusers\n if (!principalMapper.isAccessEnforced(principal, object)) {\n return true;\n }\n\n List<PropertyPath> paths = typeContext.getPrincipalPaths(object.getClass());\n PropertyPathChecker checker = checkers.get();\n for (PropertyPath path : paths) {\n path.evaluate(object, checker);\n if (checker.getResult()) {\n return true;\n }\n }\n addWarning(object, \"User %s does not have permission to edit this %s\", principal,\n typeContext.getPayloadName(object.getClass()));\n return false;\n }", "@Test\n public void ownerArgumentNotAddedIfOwnerIsInCustomGroup() throws AmplifyException {\n final AuthorizationType mode = AuthorizationType.OPENID_CONNECT;\n\n // OwnerInCustomGroup class uses combined owner and group-based auth,\n // and user is in the read-restricted custom group.\n for (SubscriptionType subscriptionType : SubscriptionType.values()) {\n GraphQLRequest<OwnerInCustomGroup> originalRequest =\n createRequest(OwnerInCustomGroup.class, subscriptionType);\n GraphQLRequest<OwnerInCustomGroup> modifiedRequest =\n decorator.decorate(originalRequest, mode);\n assertNull(getOwnerField(modifiedRequest));\n }\n }", "public void testNestedAclGroupsSupported()\n {\n assertTrue(_ruleSet.addGroup(\"aclgroup1\", Arrays.asList(new String[] {\"userb\"})));\n assertTrue(_ruleSet.addGroup(\"aclgroup2\", Arrays.asList(new String[] {\"usera\", \"aclgroup1\"}))); \n \n _ruleSet.grant(1, \"aclgroup2\", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n assertEquals(1, _ruleSet.getRuleCount());\n\n assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"usera\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"userb\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n }", "public static boolean hasAdministrativePermissions(@NotNull Session session, String... additionalAdminAuthorizableIdsOrPrincipalNames) throws RepositoryException {\n List<String> additionalAdminIdsOrPrincipalNames = Arrays.asList(Optional.ofNullable(additionalAdminAuthorizableIdsOrPrincipalNames).orElse(new String[0]));\n final JackrabbitSession jackrabbitSession;\n if (session instanceof JackrabbitSession) {\n jackrabbitSession = (JackrabbitSession) session;\n if (isOakVersionExposingBoundPrincipals(session.getRepository())) {\n if (hasAdministrativePermissionsWithPrincipals(jackrabbitSession, additionalAdminIdsOrPrincipalNames)) {\n return true;\n }\n }\n } else {\n jackrabbitSession = null;\n }\n // then evaluate user id\n String userId = session.getUserID();\n if (hasAdministrativePermissionsWithAuthorizableId(userId, additionalAdminIdsOrPrincipalNames)) {\n return true;\n }\n if (jackrabbitSession != null) {\n Authorizable authorizable = jackrabbitSession.getUserManager().getAuthorizable(userId);\n if (authorizable == null) {\n return false;\n }\n \n Iterator<Group> groupIterator = authorizable.memberOf();\n while (groupIterator.hasNext()) {\n String groupId = groupIterator.next().getID();\n if (hasAdministrativePermissionsWithAuthorizableId(groupId, additionalAdminIdsOrPrincipalNames)) {\n return true;\n }\n }\n } else {\n log.warn(\"could not evaluate group permissions but just user name\");\n }\n return false;\n }", "private void checkAccessRights(final String operation, final String id,\n final String username, final Profile myProfile,\n final String myUserId, final List<GroupElem> userGroups,\n final UserGroupRepository groupRepository) { Before we do anything check (for UserAdmin) that they are not trying\n // to add a user to any group outside of their own - if they are then\n // raise an exception - this shouldn't happen unless someone has\n // constructed their own malicious URL!\n //\n if (operation.equals(Params.Operation.NEWUSER)\n || operation.equals(Params.Operation.EDITINFO)\n || operation.equals(Params.Operation.FULLUPDATE)) {\n if (!(myUserId.equals(id)) && myProfile == Profile.UserAdmin) {\n final List<Integer> groupIds = groupRepository\n .findGroupIds(UserGroupSpecs.hasUserId(Integer\n .parseInt(myUserId)));\n for (GroupElem userGroup : userGroups) {\n boolean found = false;\n for (int myGroup : groupIds) {\n if (userGroup.getId() == myGroup) {\n found = true;\n }\n }\n if (!found) {\n throw new IllegalArgumentException(\n \"Tried to add group id \"\n + userGroup.getId()\n + \" to user \"\n + username\n + \" - not allowed \"\n + \"because you are not a member of that group!\");\n }\n }\n }\n }\n }", "public boolean hasObjUser() {\n return instance.hasObjUser();\n }", "private void checkPermission(User user, List sourceList, List targetList)\n throws AccessDeniedException\n {\n logger.debug(\"+\");\n if (isMove) {\n if (!SecurityGuard.canManage(user, sourceList.getContainerId()) ||\n !SecurityGuard.canContribute(user, targetList.getContainerId()))\n throw new AccessDeniedException(\"Forbidden\");\n }\n else {\n if (!SecurityGuard.canView(user, sourceList.getContainerId()) ||\n !SecurityGuard.canContribute(user, targetList.getContainerId()))\n throw new AccessDeniedException(\"Forbidden\");\n }\n logger.debug(\"-\");\n }", "public boolean checkEventsAndGroupsLink();", "@Test\n void validateUserGroupExist(){\n\n Boolean testing_result = true;\n int issue_id = 0;\n String issue_group = \"\";\n\n ArrayList<String> groups = new ArrayList<>();\n groups.add(\"admin\");\n groups.add(\"concordia\");\n groups.add(\"encs\");\n groups.add(\"comp\");\n groups.add(\"soen\");\n\n UserController uc = new UserController();\n\n LinkedHashMap<Integer, String> db_groups = uc.getAllUserGroups();\n\n for(int key : db_groups.keySet()){\n if(!groups.contains(db_groups.get(key))){\n issue_id = key;\n issue_group = db_groups.get(key);\n testing_result = false;\n }\n }\n\n Assertions.assertTrue(testing_result, \" There is an issue with user(id: \" + issue_id + \") having group as: \" + issue_group);\n\n }", "@Test\n\tpublic void testExistsInGroupSuccess() {\n\n\t\tgrupo.addColaborador(col1);\n\t\tboolean result = grupo.existsInGroup(col1);\n\n\t\tassertTrue(result);\n\t}", "@Override\n public boolean isOrganizationOwnedDeviceWithManagedProfile() {\n if (!mHasFeature) {\n return false;\n }\n return getOrganizationOwnedProfileUserId() != UserHandle.USER_NULL;\n }", "public boolean hasAccount(){\r\n\t\treturn (associatedAccount != null);\r\n\t}", "public boolean isSetGrant_group() {\n return this.grant_group != null;\n }", "public boolean hasUser() {\n return user_ != null;\n }", "public boolean hasUser() {\n return user_ != null;\n }", "private boolean hasEscalatingPrivilegesOnWrite(List<String> verbs, List<String> resources) {\n if (Collections.disjoint(verbs, EscalatingResources.ESCALATING_VERBS)) {\n return false;\n }\n\n return !Collections.disjoint(resources,\n EscalatingResources.ESCALATING_RESOURCES_ON_WRITE);\n }", "@Override\n\tpublic boolean isOwnMessage() {\n\t\ttry {\n\t\t\treturn (this.user.id == AccountManager.current_account.getUser().id);\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}", "boolean hasUserList();", "private boolean isInstructor(User user)\r\n {\r\n if (LOG.isDebugEnabled())\r\n {\r\n LOG.debug(\"isInstructor(User \" + user + \")\");\r\n }\r\n if (user != null)\r\n return SecurityService.unlock(user, \"site.upd\", getContextSiteId());\r\n else\r\n return false;\r\n }", "@Override\n protected boolean isAuthorized(PipelineData pipelineData) throws Exception\n {\n \t// use data.getACL() \n \treturn true;\n }", "@Test\n public void ownerArgumentAddedIfOwnerIsNotInCustomGroup() throws AmplifyException {\n final AuthorizationType mode = AuthorizationType.OPENID_CONNECT;\n final String expectedOwner = FakeOidcAuthProvider.SUB;\n\n // OwnerNotInCustomGroup class uses combined owner and group-based auth,\n // but user is not in the read-restricted custom group.\n for (SubscriptionType subscriptionType : SubscriptionType.values()) {\n GraphQLRequest<OwnerNotInCustomGroup> originalRequest =\n createRequest(OwnerNotInCustomGroup.class, subscriptionType);\n GraphQLRequest<OwnerNotInCustomGroup> modifiedRequest =\n decorator.decorate(originalRequest, mode);\n assertEquals(expectedOwner, getOwnerField(modifiedRequest));\n }\n }", "public boolean hasUser() {\n return userBuilder_ != null || user_ != null;\n }", "public boolean hasUser() {\n return userBuilder_ != null || user_ != null;\n }", "public void testExternalGroupsSupported()\n {\n _ruleSet.grant(1, \"extgroup1\", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n _ruleSet.grant(2, \"extgroup2\", Permission.DENY, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n assertEquals(2, _ruleSet.getRuleCount());\n\n assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"usera\", \"extgroup1\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n assertEquals(Result.DENIED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"userb\", \"extgroup2\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n }", "public void testAclGroupsSupported()\n {\n assertTrue(_ruleSet.addGroup(\"aclgroup\", Arrays.asList(new String[] {\"usera\", \"userb\"}))); \n \n _ruleSet.grant(1, \"aclgroup\", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n assertEquals(1, _ruleSet.getRuleCount());\n\n assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"usera\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"userb\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n assertEquals(Result.DEFER, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"userc\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n }", "private boolean isAllowedToCreate(String userId, SignupMeeting signupMeeting) {\n\t\tif (sakaiFacade.isUserAdmin(userId))\n\t\t\treturn true;\n\n\t\tList<SignupSite> signupSites = signupMeeting.getSignupSites();\n\t\tfor (SignupSite site : signupSites) {\n\t\t\tif (site.isSiteScope()) {\n\t\t\t\tif (!sakaiFacade.isAllowedSite(userId, SakaiFacade.SIGNUP_CREATE_SITE, site.getSiteId()))\n\t\t\t\t\treturn false;\n\t\t\t\telse {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (sakaiFacade.isAllowedSite(userId, SakaiFacade.SIGNUP_CREATE_SITE, site.getSiteId())\n\t\t\t\t\t\t|| sakaiFacade.isAllowedSite(userId, SakaiFacade.SIGNUP_CREATE_GROUP_ALL, site.getSiteId()))\n\t\t\t\t\tcontinue;\n\n\t\t\t\tList<SignupGroup> signupGroups = site.getSignupGroups();\n\t\t\t\tfor (SignupGroup group : signupGroups) {\n\t\t\t\t\tif (!(sakaiFacade.isAllowedGroup(userId, SakaiFacade.SIGNUP_CREATE_GROUP, site.getSiteId(), group.getGroupId()) \n\t\t\t\t\t\t\t|| sakaiFacade.isAllowedGroup(userId, SakaiFacade.SIGNUP_CREATE_GROUP_ALL, site.getSiteId(), group.getGroupId())))\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\n\t}", "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 }", "public boolean isSurveyAssigned(Long surveyId, long userId);", "private static Boolean isAuthorised(Page page, List<GrantedAuthority> userAuthorities ) {\n if ( page.getAllowedRoles().size() == 0 ) {\n return true;\n }\n \n for ( GrantedAuthority role : userAuthorities ) {\n for ( String requiredRole : page.getAllowedRoles() ) {\n if ( role.getAuthority().equals(requiredRole) ) {\n return true;\n }\n }\n }\n return false;\n }", "public boolean hasUser() {\n return instance.hasUser();\n }", "@Test\n void testGetRegistrarForUser_inContacts_isAdmin() throws Exception {\n expectGetRegistrarSuccess(\n CLIENT_ID_WITH_CONTACT,\n GAE_ADMIN,\n \"admin [email protected] has [OWNER, ADMIN] access to registrar TheRegistrar\");\n verifyNoInteractions(lazyGroupsConnection);\n }", "boolean hasCustomerUserAccess();", "public boolean hasUser() {\n return user_ != null;\n }", "@Override\n public boolean existPrincipalWithName(String userName) {\n // \"Feature 'existPrincipalWithName in OAuth 2 identity server' is not implemented\"\n return false;\n }", "protected Boolean hasAccess(RMApp app, HttpServletRequest hsr) {\n UserGroupInformation callerUGI = getCallerUserGroupInformation(hsr, true);\n List<String> forwardedAddresses = null;\n String forwardedFor = hsr.getHeader(RMWSConsts.FORWARDED_FOR);\n if (forwardedFor != null) {\n forwardedAddresses = Arrays.asList(forwardedFor.split(\",\"));\n }\n if (callerUGI != null\n && !(this.rm.getApplicationACLsManager().checkAccess(callerUGI,\n ApplicationAccessType.VIEW_APP, app.getUser(),\n app.getApplicationId())\n || this.rm.getQueueACLsManager().checkAccess(callerUGI,\n QueueACL.ADMINISTER_QUEUE, app, hsr.getRemoteAddr(),\n forwardedAddresses))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean isUserInRole(final String roleName) {\n return scopes.contains(roleName);\n }", "boolean hasAttackerRoleId();", "private static boolean checkExistenceAndOwner(String username, String clientData, String playlist){\n //Check if user exists\n if (!CheckExistence.userExists(username)){\n System.out.println(clientData + \" | \" + username\n + \" | User not found.\");\n return false;\n }\n\n //Check if playlist exists\n if (!CheckExistence.playlistExists(playlist)){\n System.out.println(clientData + \" | \" + username\n + \" | Playlist not found.\");\n return false;\n }\n\n //Check if user owns the playlist\n if (!Permission.ownsPlaylist(username, playlist)){\n System.out.println(clientData + \" | \" + username\n + \" | You don't own this playlist.\");\n return false;\n }\n return true;\n }", "@Override\n public boolean isAdmin(String username) {\n return isMember(GROUPING_ADMINS, username);\n }", "@Test\n public void ownerArgumentNotAddedForNonRestrictedReadWithUserPools() throws AmplifyException {\n final AuthorizationType mode = AuthorizationType.AMAZON_COGNITO_USER_POOLS;\n\n // OwnerCreate class only has restriction on CREATE\n for (SubscriptionType subscriptionType : SubscriptionType.values()) {\n GraphQLRequest<OwnerCreate> originalRequest = createRequest(OwnerCreate.class, subscriptionType);\n GraphQLRequest<OwnerCreate> modifiedRequest = decorator.decorate(originalRequest, mode);\n assertNull(getOwnerField(modifiedRequest));\n }\n\n // OwnerUpdate class only has restriction on UPDATE\n for (SubscriptionType subscriptionType : SubscriptionType.values()) {\n GraphQLRequest<OwnerUpdate> originalRequest = createRequest(OwnerUpdate.class, subscriptionType);\n GraphQLRequest<OwnerUpdate> modifiedRequest = decorator.decorate(originalRequest, mode);\n assertNull(getOwnerField(modifiedRequest));\n }\n\n // OwnerDelete class only has restriction on DELETE\n for (SubscriptionType subscriptionType : SubscriptionType.values()) {\n GraphQLRequest<OwnerDelete> originalRequest = createRequest(OwnerDelete.class, subscriptionType);\n GraphQLRequest<OwnerDelete> modifiedRequest = decorator.decorate(originalRequest, mode);\n assertNull(getOwnerField(modifiedRequest));\n }\n }", "public boolean isCreateRight() {\r\n if (getUser() != null) {\r\n return getUser().hasPermission(\"/vocabularies\", \"c\");\r\n }\r\n return false;\r\n }", "public boolean inGroup(String groupName) {\r\n return true;\r\n }", "public boolean isSetResources() {\n return this.resources != null;\n }", "public boolean isSetResources() {\n return this.resources != null;\n }", "boolean isHasResources();" ]
[ "0.5894318", "0.5801058", "0.5673422", "0.5610296", "0.5585894", "0.5500463", "0.54556257", "0.5437542", "0.54335564", "0.54328614", "0.5427593", "0.54263407", "0.5416047", "0.5406893", "0.5386426", "0.53794044", "0.53714055", "0.5365988", "0.5363266", "0.5347654", "0.5345159", "0.53382015", "0.5334843", "0.53253496", "0.53215235", "0.5305248", "0.52882946", "0.5280534", "0.527796", "0.52648085", "0.52639467", "0.5259915", "0.52566", "0.525265", "0.52357745", "0.5204961", "0.52029586", "0.51889485", "0.5179047", "0.51736", "0.5160015", "0.5155742", "0.5155431", "0.5150894", "0.51109695", "0.5108312", "0.51009375", "0.5098971", "0.5094861", "0.5094861", "0.5094861", "0.5094861", "0.5094861", "0.5094861", "0.5094861", "0.50728405", "0.5066165", "0.5063207", "0.50611824", "0.5036893", "0.5031335", "0.50059307", "0.500587", "0.5004846", "0.5004371", "0.4988595", "0.49817172", "0.49797806", "0.49721935", "0.49692893", "0.49692893", "0.4962386", "0.49577275", "0.49540126", "0.4946115", "0.49367902", "0.49271756", "0.49268392", "0.49268392", "0.49245507", "0.49234235", "0.49209884", "0.49083573", "0.4901629", "0.48973978", "0.4895655", "0.48948547", "0.48921883", "0.48895437", "0.4883141", "0.48828822", "0.4875283", "0.48749086", "0.4865575", "0.48555413", "0.48367116", "0.48336112", "0.48321", "0.48301664", "0.48301664", "0.48289162" ]
0.0
-1
checks if for user is a delegate for any of a list of users
public Future<List<UUID>> checkDelegate(List<UUID> provider_ids, String userId) { Promise<List<UUID>> p = Promise.promise(); Collector<Row, ?, List<UUID>> idCollector = Collectors.mapping(row -> row.getUUID(ID), Collectors.toList()); try { pool.withConnection( conn -> conn.preparedQuery(CHECK_DELEGATION) .collecting(idCollector) .execute( Tuple.of(authUrl, UUID.fromString(userId)) .addArrayOfUUID(provider_ids.toArray(UUID[]::new))) .onSuccess(obj -> p.complete(obj.value())) .onFailure( obj -> { LOGGER.error("checkDelegate db fail :: " + obj.getLocalizedMessage()); p.fail(INTERNALERROR); })); } catch (Exception e) { LOGGER.error("Fail checkDelegate:" + e.toString()); p.fail(INTERNALERROR); } return p.future(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isFollowing(User user, String target)\n{\n \n DefaultListModel following = user.getFollowings();\n if (following.contains(target))\n {\n return true;\n }\n return false;\n}", "private static Boolean isUserACollaborator(User checkedUser, Tasky_Collaborator__c[] collaborators) {\n for (Integer i = 0; i < collaborators.size(); i++) {\n if (checkedUser.Id == collaborators[i].User__c) {\n return true;\n }\n }\n return false;\n }", "private boolean isUserInArrayLisyOfUsers( String email, ArrayList<User> users){\n \tboolean isInsideMM = false;\n \t\tfor(User u : users){\n \t\t\tif(u.getEmail().equals(email)&&users.isEmpty()==false){\n \t\t\t\tisInsideMM = true;\n \t\t\t}\n \t\t} \t\n \treturn isInsideMM;\n }", "boolean hasUserList();", "public boolean searchUserInCourse(User targetUser) {\n\n for (int i = 0; i < getUserListInCourse().size(); ++i) {\n if (getUserInUserCourseList(i).getUserName() == targetUser.getUserName()) {\n return true;\n }\n }\n\n return false;\n }", "public Future<List<UUID>> checkOwner(Map<String, List<String>> req, String userId) {\n Promise<List<UUID>> p = Promise.promise();\n\n Future<List<UUID>> resGrp;\n Future<List<UUID>> resItem;\n if (req.containsKey(RES_GRP)) {\n\n List<String> resGrpIds = req.get(RES_GRP);\n resGrp = resGrpOwner(resGrpIds, userId);\n } else resGrp = Future.succeededFuture(new ArrayList<>());\n\n if (req.containsKey(RES)) {\n List<String> resIds = req.get(RES);\n resItem = resOwner(resIds, userId);\n } else resItem = Future.succeededFuture(new ArrayList<>());\n\n CompositeFuture.all(resGrp, resItem)\n .onSuccess(\n obj -> {\n List<UUID> resp = new ArrayList<>();\n if (!resGrp.result().isEmpty()) resp.addAll(resGrp.result());\n\n if (!resItem.result().isEmpty()) resp.addAll(resItem.result());\n\n p.complete(resp);\n })\n .onFailure(fail -> p.fail(INTERNALERROR));\n // return map of res_id,iowners in place of user id\n // check if userid is delegate for any of these owners\n // compose\n // check if user id is an active delegate of all of the owner ids for resource\n // return list of not delegate\n return p.future();\n }", "public boolean addAttendees(ArrayList<String> usernames) {\n return this.usernames.addAll(usernames);\n }", "private boolean checkUserNameExists(ArrayList<Member> members) throws Exception {\nfor(Member member:members) {\nif(this.userName.equals(member.userName)){\nreturn true;\n}\n}\nreturn false;\n}", "boolean hasSelectedUser();", "boolean anyGranted(String roles);", "public boolean containsCustomer(String c){\n\t\tfor (int i = 0; i < this.list.size(); i++){\n\t\t\tif( c.equals(list.get(i).getUsername()) ){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean hasUserId();", "boolean hasUserId();", "boolean hasUserId();", "public static boolean checkUserExists(List<UserAccount> users, String name) {\n\t\tboolean isUserExists = false;\n\t\tfor (UserAccount user : users) {\n\t\t\tif (user.getUserFirstName().equals(name)) {\n\t\t\t\tisUserExists = true;\n\t\t\t}\n\t\t}\n\t\treturn isUserExists;\n\t}", "public boolean checkUserNameIsOccupied(String name) {\n \t\tif (users.size() != 0) {\n \t\t\tfor (int i = 0; i < users.size(); i++) {\n \t\t\t\tif (name.equals(users.get(i).getName())) {\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn false;\n \t}", "public boolean mentionsUser(User user) {\n\t\tif (entities != null) {\n\t\t\tfor (int i = 0; i < entities.user_mentions.size(); i++) {\n\t\t\t\tif (entities.user_mentions.get(i).id == user.id) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public boolean userExists(User user) {\n return DATABASE.getUsers().stream()\n .anyMatch(currentUser -> user.equals(currentUser));\n }", "public boolean isResponsible(User user) {\n\t\tHashMap<String, Object> filters = new HashMap<>();\n\n\t\tfilters.put(\"responsible\", new ValueParameter(user));\n\n\t\treturn !this.filter(filters).isEmpty();\n\t}", "public boolean userHasARole(List<String> userRoles) {\n List<String> specifiedRoles = Arrays.asList(Constants.SUPERVISOR_ROLE, Constants.TRAINER_ROLE, Constants.PARTICIPANT_ROLE);\n int roleCount = 0;\n for (String role : userRoles) {\n if (specifiedRoles.contains(role)) {\n roleCount++;\n }\n }\n return (roleCount == 1) ? true : false;\n }", "private boolean isOneUserName(String username){\r\n\t\tfor(int i = 0; i < users.size(); i++){\r\n\t\t\tif(users.get(i).username.equalsIgnoreCase(username)){\r\n\t\t\t\tSystem.out.println(\"Sorry the Username is already taken\");\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean isInRoom(String username)\n {\n for (ClientHandle participant : participants) {\n if (participant.getUsername().equals(username))\n {\n return true;\n }\n }\n return false;\n }", "public boolean removeAttendees(ArrayList<String> usernames) {\n return this.usernames.removeAll(usernames);\n }", "boolean hasDonator();", "boolean hasObjUser();", "public boolean addUsers(List<User> users);", "public boolean addAttendees(String username) {\n if(!usernames.contains(username)) {\n usernames.add(username);\n return true;\n }\n return false;\n }", "private boolean isContactableUser() {\r\n\r\n return (friendFeed == null || friendFeed.getContact() == null) ? false\r\n : friendFeed.getContact().isContactable();\r\n }", "private boolean apiTypesMatchDelegateType(Decorator<?> decorator, Set<Type> apiTypes)\n {\n boolean ok = false;\n for (Type apiType : apiTypes)\n {\n if (GenericsUtil.satisfiesDependency(true, false, decorator.getDelegateType(), apiType, new HashMap<>()))\n {\n ok = true;\n break;\n }\n }\n\n return ok;\n }", "@Override\n public Set<User> usersThatFollow(String usernname) {\n return userDataMapper.getUsersThatFollow(getUser(usernname).getId());\n }", "@Override\n public Boolean isCollegeManger(UserDTO user) {\n return user.getRoles().contains(RoleTypeEnum.COLLEGE);\n }", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "private boolean canView(final AbstractItem item) throws AccessDeniedException {\n\t\tif (item.isRssAllowed())\n\t\t\treturn true;\n\t\tList<Subscriber> subscribers = Lists.newArrayList(subscriberRepository.findAll(SubscriberPredicates.onCtx(item\n\t\t\t\t.getContextKey())));\n\t\t// TODO we consider that all items have targets directly on\n\t\t// for targets defined only on classification a check will be needed\n\t\tif (subscribers.isEmpty()) {\n\t\t\tlog.trace(\"Subscribers on item {} are empty -> true\", item.getContextKey());\n\t\t\treturn true;\n\t\t}\n\t\tfinal CustomUserDetails user = SecurityUtils.getCurrentUserDetails();\n\t\tif (user == null) {\n\t\t\tlog.trace(\"user is not authenticated -> throw an error to redirect on authentication\");\n\t\t\tthrow new AccessDeniedException(\"Access is denied to anonymous !\");\n\t\t} else if (user.getRoles().contains(AuthoritiesConstants.ADMIN)\n\t\t\t\t|| user.getUser().getLogin().equalsIgnoreCase(item.getCreatedBy().getLogin())\n\t\t\t\t|| user.getUser().getLogin().equalsIgnoreCase(item.getLastModifiedBy().getLogin())) {\n\t\t\treturn true;\n\t\t}\n\n\t\tfinal UserDTO userDTO = user.getUser();\n\t\tif (userDTO != null) {\n\t\t\tList<String> groups = null;\n\t\t\tif (userDTO.getAttributes() != null) {\n\t\t\t\tgroups = userDTO.getAttributes().get(externalUserHelper.getUserGroupAttribute());\n\t\t\t}\n\t\t\tfor (Subscriber subscriber : subscribers) {\n\t\t\t\tlog.trace(\"Check if {} is in {}\", userDTO, subscriber);\n\t\t\t\tfinal SubjectKeyExtended subject = subscriber.getSubjectCtxId().getSubject();\n\t\t\t\tswitch (subject.getKeyType()) {\n\t\t\t\tcase GROUP:\n\t\t\t\t\tif (groups == null || groups.isEmpty()) {\n\t\t\t\t\t\tlog.trace(\"The user doesn't have a group -> break loop\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t// test on startWith as some groups in IsMemberOf has only a part the\n\t\t\t\t\t// real group name.\n\t\t\t\t\tfor (String val : groups) {\n\t\t\t\t\t\tif (val.startsWith(subject.getKeyValue())) {\n\t\t\t\t\t\t\tlog.trace(\"Check if the user group {} match subscriber group {} -> return true\", val,\n\t\t\t\t\t\t\t\t\tsubject.getKeyValue());\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase PERSON:\n\t\t\t\t\tif (subject.getKeyValue().equalsIgnoreCase(userDTO.getLogin())) {\n\t\t\t\t\t\tlog.trace(\"Check if the user key {} match subscriber key {} -> true\", userDTO.getLogin(),\n\t\t\t\t\t\t\t\tsubject.getKeyValue());\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase PERSON_ATTR:\n\t\t\t\t\tif (subject.getKeyAttribute() != null\n\t\t\t\t\t\t\t&& userDTO.getAttributes().containsKey(subject.getKeyAttribute())\n\t\t\t\t\t\t\t&& userDTO.getAttributes().get(subject.getKeyAttribute()).contains(subject.getKeyValue())) {\n\t\t\t\t\t\tlog.trace(\"Check if the user attribute {} with values {} contains value {} -> true\",\n\t\t\t\t\t\t\t\tsubject.getKeyAttribute(), userDTO.getAttributes().get(subject.getKeyAttribute()),\n\t\t\t\t\t\t\t\tsubject.getKeyValue());\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase PERSON_ATTR_REGEX:\n\t\t\t\t\tif (subject.getKeyAttribute() != null\n\t\t\t\t\t\t\t&& userDTO.getAttributes().containsKey(subject.getKeyAttribute())) {\n\t\t\t\t\t\tfor (final String value : userDTO.getAttributes().get(subject.getKeyAttribute())) {\n\t\t\t\t\t\t\tif (value.matches(subject.getKeyValue())) {\n\t\t\t\t\t\t\t\tlog.trace(\"Check if the user attribute {} with values {} match regex {} -> true\",\n\t\t\t\t\t\t\t\t\t\tsubject.getKeyAttribute(),\n\t\t\t\t\t\t\t\t\t\tuserDTO.getAttributes().get(subject.getKeyAttribute()), subject.getKeyValue());\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new IllegalStateException(\"Warning Subject Type '\" + subject.getKeyType()\n\t\t\t\t\t\t\t+ \"' is not managed\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlog.trace(\"End of all checks -> false\");\n\t\treturn false;\n\t}", "public boolean hasAccount(String user);", "public boolean hasUser(){\n return numUser < MAX_USER;\n }", "private boolean friendAlreadyAdded(User user, Object requestedUser) {\n List<UserContact> friendList = null;\n User friendToBe = null;\n try {\n DAO dao = new Query();\n friendList = user.getFriends(dao);\n dao.open();\n if (requestedUser instanceof String) {\n friendToBe = (User) dao.get(User.class, (String) requestedUser);\n } else if (requestedUser instanceof Request) {\n Request request = (Request) requestedUser;\n friendToBe = (User) dao.get(User.class, request.getFromId());\n }\n dao.close();\n } catch (Exception e) {\n //e.printStackTrace();\n }\n if (friendList != null && friendToBe != null) {\n if (friendList.contains(friendToBe.asContact())) {\n return true;\n }\n }\n return false;\n }", "protected void validatePartnerLinkUsers() {\r\n for (IAePartnerLinkOperationUser user : mUsers) {\r\n validatePartnerLinkUser(user);\r\n }\r\n }", "protected boolean isValid(AccessUser obj)\n {\n return obj != null && obj.username != null && !getMembers().contains(obj);\n }", "private boolean hasLinkToUseraccess(Paymentform paymentform) {\n return paymentform.getPaymentformUserid() != null;\n }", "@Test\n public void userExist() {\n String username = argument.substring(0, 15);\n boolean found = false;\n\n for(int i = 0; i<users.size(); i++){\n if(users.get(i).substring(0, 15).trim().toLowerCase().contains(username.trim().toLowerCase())){\n found = true;\n }\n }\n assertTrue(\"User Not Found\", found);\n }", "public List<EOSUser> findUsers(List<String> logins);", "public final List<String> isRegisteredUser() {\n return queryForAll();\n }", "public boolean hasUsers() {\n\t\treturn !this.userNames.isEmpty();\n\t}", "@Override\n\tpublic boolean isValid(UsersDto dto) {\n\t\tString id=session.selectOne(\"users.isValid\",dto);\n\t\tif(id==null) {//잘못된 아이디와 비밀번호\n\t\t\treturn false;\n\t\t}else {//유효한 아이디와 비밀번호\n\t\t\treturn true;\n\t\t}\n\t}", "@Override\n\tpublic boolean hasUser(Account acccount) {\n\n\n\n\n\n\n\n\n\n\t\t\n\t\treturn (usersHashtable.containsKey(acccount));\n\t}", "private boolean userHasAllowedRole(User u, String[] allowedRoles) {\n\n for (GroupRef group : u.getGroups()) {\n\n if (Arrays.binarySearch(allowedRoles, group.getDisplay()) >= 0) {\n return true;\n }\n }\n\n return false;\n }", "boolean hasCustomerUserAccess();", "boolean isMember();", "public void isAllowed(String user) {\n \r\n }", "public boolean doesTheUserExist(String user)\r\n\t {\r\n\t\t if (!users.get(user).equals(null))\r\n\t\t return true;\r\n\t\t return false;\r\n\t }", "private static boolean checkUsernameAvailable(String username) {\n if (username.length() <= 6) {\n return false; // Username too short.\n } else {\n if (!patients.isEmpty()) {\n for (Patient patient : patients\n ) {\n if (patient.getUserName().equals(username)) {\n return false; // Username already added for patient.\n }\n }\n for (Medic medic : medics\n ) {\n if (medic.getUserName().equals(username)) {\n return false; // Username already added for patient.\n }\n }\n }\n\n }\n return true;\n }", "public boolean isMember(String uuid) {\n return this.members.contains(uuid);\n }", "private boolean matches(String userMail, String filter) {\n\t\tfor (String curMaskedDomain : MASKED_ADDRESS_DOMAINS) {\n\t\t\tif (userMail.contains(curMaskedDomain)) {\n\t\t\t\treturn userMail.startsWith(filter);\n\t\t\t}\n\t\t}\n\n\t\t// default handling\n\t\treturn userMail.contains(filter);\n\n\t}", "private boolean canSendTo(String receiver) {\n\t\treturn subscriber.containsKey(receiver);\n\t}", "private boolean handlesAny(CandidateValidator candidateValidator, List<CandidateValidatorType> validatorTypes) {\n\n\t\tfor (CandidateValidatorType validatorType : validatorTypes) {\n\t\t\tif (candidateValidator.handles(validatorType)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean hasUserInterest();", "boolean hasUserInterest();", "public boolean isUser(String userName) throws Exception;", "@Override\n public boolean isDM(Optional<BaseCharacter> inUser)\n {\n if(!inUser.isPresent())\n return false;\n\n return inUser.get().hasAccess(Group.DM);\n }", "public boolean check(String... activator){\n for (int i = 0; i < activator.length; i++) {\n for (int j = 0; j < this.activations.length; j++) {\n if(activator[i].equalsIgnoreCase(activations[j])){\n onClick();\n return true;\n }\n }\n }\n return false;\n }", "boolean hasAttackerRoleName();", "public boolean isUserIdTaken(String userEmailId);", "private boolean isAuthenticated(@Nonnull final InetAddress address,\n @Nonnull @NonnullElements final Collection<IPRange> ranges) {\n final byte[] resolvedAddress = address.getAddress();\n\n for (final IPRange range : ranges) {\n if (range.contains(resolvedAddress)) {\n return true;\n }\n }\n \n return false;\n }", "public boolean alreadyRegister(String email) {\n \tfor (User user : list) {\n \t\tif (user.getEmail().equals(email))\n \t\t\treturn true;\n \t}\n \treturn false;\n }", "public boolean checkUsername(String username) {\n for(int i=0; i<listOfUsers.size(); i++) {\n if(listOfUsers.get(i).compareTo(username)==0)\n return false;\n }\n return true;\n }", "public boolean LogInList_Chk(String sID, String sPW) {\n\t\tfor (int i = 0; i < Member.MemeverVec.size(); i++) {\n\t\t\tif (Member.MemeverVec.get(i).getSid().equals(sID) && Member.MemeverVec.get(i).getSpw().equals(sPW)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean isActiveUser() {\r\n if (currentProcessInstance == null)\r\n return false;\r\n \r\n String[] states = currentProcessInstance.getActiveStates();\r\n if (states == null)\r\n return false;\r\n \r\n Actor[] users;\r\n for (int i = 0; i < states.length; i++) {\r\n try {\r\n users = currentProcessInstance.getWorkingUsers(states[i]);\r\n for (int j = 0; j < users.length; j++) {\r\n if (getUserId().equals(users[j].getUser().getUserId()))\r\n return true;\r\n }\r\n } catch (WorkflowException ignored) {\r\n // ignore unknown state\r\n continue;\r\n }\r\n }\r\n \r\n return false;\r\n }", "@Override\n\tpublic boolean isUser(User user) {\n\t\treturn false;\n\t}", "@Override\n public void gotUsers(ArrayList<User> usersList) {\n for(int i = 0; i < usersList.size(); i++) {\n User currentUser = usersList.get(i);\n if(currentUser.getUser_name().equals(username) && currentUser.getUser_password()\n .equals(password)) {\n disableButton.setEnabled(true);\n Intent intent = new Intent(NewaccountActivity.this,\n OverviewActivity.class);\n intent.putExtra(\"loggedInUser\", currentUser);\n startActivity(intent);\n }\n }\n }", "public abstract boolean isDocumentBelongsToThisUser(String username, ClinicalDocumentDto clinicalDocumentDto);", "private boolean userUnderJurisdiction(String userID) {\r\n\t\tif ((userID.equals(\"Angela\") || userID.equals(\"Rosendo\")))\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "boolean hasCustomerUserAccessInvitation();", "public static List<Integer> verifyUsersValid(String... usernames) {\n try {\n List<Integer> uids = new ArrayList<>();\n Connection conn = DriverManager.getConnection(\n Main.resource.getString(\"Postgresql.datasource.url\"),\n Main.resource.getString(\"Postgresql.datasource.username\"),\n Main.resource.getString(\"Postgresql.datasource.password\"));\n for (String username : usernames) {\n int otherid = NewFeature.getId(username, conn);\n uids.add(otherid);\n }\n return uids;\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return Collections.emptyList();\n\n\n }", "private void getUserFromStatus(LinkedList<User> users, Status A) {\n boolean does_Exist = false;\n //getting the user of the status\n User user = A.getUser();\n //if a User Has More The 200 Interest we are better of\n if (isUserSatisfyParameters(user)) {\n //Search if The User pre exist\n for (User B : users) {\n if (B.getScreenName().equals(user.getScreenName())) {\n does_Exist = true;\n break;\n }\n }\n\n if (!does_Exist)\n users.add(user);\n }\n }", "public boolean checkContactList(List<String> contacts) {\n\t\tboolean flag = true;\n\t\tList<String> contactList = currentUser.getContacts().stream().map(Contacto::getName)\n\t\t\t\t.collect(Collectors.toList());\n\t\tfor (String name : contacts)\n\t\t\tif (contactList.contains(name))\n\t\t\t\tflag = false;\n\t\treturn flag;\n\t}", "@Override\r\n\tpublic void list_validBelongsToOtherUser() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.list_validBelongsToOtherUser();\r\n\t\t}\r\n\t}" ]
[ "0.59779394", "0.58174926", "0.5807003", "0.5803623", "0.57652324", "0.5728692", "0.5685535", "0.56094897", "0.5595174", "0.54205036", "0.5376576", "0.53709686", "0.53709686", "0.53709686", "0.53345203", "0.5334326", "0.53268355", "0.5278198", "0.5270513", "0.52702683", "0.52551854", "0.5232186", "0.5232186", "0.5232186", "0.5232186", "0.5232186", "0.5232186", "0.5232186", "0.5214502", "0.52076083", "0.51973104", "0.5177148", "0.5164792", "0.5126187", "0.51193327", "0.511077", "0.51022834", "0.50982547", "0.50866216", "0.50866216", "0.50866216", "0.50866216", "0.50866216", "0.50866216", "0.50866216", "0.50866216", "0.50866216", "0.50866216", "0.50866216", "0.50866216", "0.50866216", "0.50866216", "0.50866216", "0.50866216", "0.50866216", "0.50866216", "0.50822073", "0.5042634", "0.5020246", "0.50138104", "0.50046617", "0.4984229", "0.4984069", "0.49775162", "0.49756193", "0.4967497", "0.49669975", "0.4964016", "0.49465567", "0.49418798", "0.49408683", "0.4929884", "0.49153024", "0.48979208", "0.48936102", "0.48865432", "0.4881032", "0.48798087", "0.48685557", "0.48652774", "0.48652774", "0.48652303", "0.48493862", "0.48308858", "0.4821794", "0.48166987", "0.48162994", "0.48155403", "0.48154235", "0.48142913", "0.48100692", "0.48023987", "0.480089", "0.47967175", "0.47917414", "0.4789039", "0.47882336", "0.4787386", "0.47851026", "0.47765297" ]
0.56100994
7
checks if resource item/ resource groups present in db
public Future<Map<String, UUID>> getOwnerId(Map<String, List<String>> request) { Promise<Map<String, UUID>> p = Promise.promise(); Future<Map<String, UUID>> resGrp; Future<Map<String, UUID>> resItem; /* if(request.containsKey(RES_SERVER)) { List<String> resSerIds = request.get(RES_SERVER); Future<Map<String,UUID>> resSer = getResGrpOwners(resSerIds); } else {*/ if (request.containsKey(RES_GRP)) { List<String> resGrpIds = request.get(RES_GRP); resGrp = getResGrpOwners(resGrpIds); } else resGrp = Future.succeededFuture(new HashMap<>()); if (request.containsKey(RES)) { List<String> resIds = request.get(RES); resItem = getResOwners(resIds); } else resItem = Future.succeededFuture(new HashMap<>()); CompositeFuture.all(resGrp, resItem) .onSuccess( obj -> { Map<String, UUID> resp = new HashMap<>(); if (!resGrp.result().isEmpty()) resp.putAll(resGrp.result()); if (!resItem.result().isEmpty()) resp.putAll(resItem.result()); p.complete(resp); }) .onFailure(fail -> p.fail(INTERNALERROR)); // } return p.future(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean rscInGroup(IResourceGroup group,\n AbstractVizResource<?, ?> resource) {\n\n for (ResourcePair pair : group.getResourceList()) {\n if (pair.getResource() == resource) {\n return true;\n }\n AbstractResourceData resourceData = pair.getResourceData();\n if (resourceData instanceof IResourceGroup) {\n if (rscInGroup((IResourceGroup) resourceData, resource)) {\n return true;\n }\n }\n }\n return false;\n }", "@Test\n void validateUserGroupExist(){\n\n Boolean testing_result = true;\n int issue_id = 0;\n String issue_group = \"\";\n\n ArrayList<String> groups = new ArrayList<>();\n groups.add(\"admin\");\n groups.add(\"concordia\");\n groups.add(\"encs\");\n groups.add(\"comp\");\n groups.add(\"soen\");\n\n UserController uc = new UserController();\n\n LinkedHashMap<Integer, String> db_groups = uc.getAllUserGroups();\n\n for(int key : db_groups.keySet()){\n if(!groups.contains(db_groups.get(key))){\n issue_id = key;\n issue_group = db_groups.get(key);\n testing_result = false;\n }\n }\n\n Assertions.assertTrue(testing_result, \" There is an issue with user(id: \" + issue_id + \") having group as: \" + issue_group);\n\n }", "public boolean doesGroupsTableExist() {\r\n\r\n\t\t// Variable Declarations\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement stmt = null;\r\n\r\n\t\ttry {\r\n\t\t\t// Connect to Database\r\n\t\t\tClass.forName(JDBC_DRIVER);\r\n\t\t\tconn = DriverManager.getConnection(DATABASE, USER, PASS);\r\n\r\n\t\t\t// Create SQL Statement\r\n\t\t\tString sql = \"SELECT name FROM sqlite_master\";\r\n\t\t\tstmt = conn.prepareStatement(sql);\r\n\r\n\t\t\t// Get ResultSet by Column Name\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tString tName = rs.getString(\"name\");\r\n\t\t\t\tif (tName.equals(\"groups\")) {\r\n\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException se) {\r\n\t\t\t// Handle Errors for JDBC\r\n\t\t\tse.printStackTrace();\r\n\t\t} catch (Exception ex) {\r\n\t\t\t// Handle Errors for Class\r\n\t\t\tex.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t// Close Resources\r\n\t\t\ttry {\r\n\t\t\t\tif (stmt != null)\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t} catch (SQLException se2) {\r\n\t\t\t} // Nothing to do\r\n\r\n\t\t\ttry {\r\n\t\t\t\tif (conn != null)\r\n\t\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException se) {\r\n\t\t\t\tse.printStackTrace();\r\n\t\t\t} // End Finally Try/Catch\r\n\t\t} // End Try/Catch\r\n\r\n\t\treturn false;\r\n\t}", "boolean hasMaterialization(Object groupID) throws Exception;", "@Test\n\tpublic void testExistsInGroupSuccess() {\n\n\t\tgrupo.addColaborador(col1);\n\t\tboolean result = grupo.existsInGroup(col1);\n\n\t\tassertTrue(result);\n\t}", "boolean hasAdGroup();", "public boolean isExisting() throws Exception\r\n\t\t{\r\n\t\tRouteGroup myR = (RouteGroup) myRouteGroup.get();\r\n\t\tthis.UUID = myR.getUUID();\r\n\t\t\r\n\t\tVariables.getLogger().debug(\"Item \"+this.name+\" already exist in the CUCM\");\r\n\t\treturn true;\r\n\t\t}", "boolean hasConceptGroup();", "@Override\n\tpublic boolean checkExists(String groupName) throws DataBackendException\n {\n boolean exists = false;\n\n Connection con = null;\n\n try\n {\n con = Transaction.begin();\n\n doSelectByName(groupName, con);\n\n Transaction.commit(con);\n con = null;\n\n exists = true;\n }\n catch (NoRowsException e)\n {\n exists = false;\n }\n catch (TooManyRowsException e)\n {\n throw new DataBackendException(\n \"Multiple groups with same name '\" + groupName + \"'\");\n }\n catch (TorqueException e)\n {\n throw new DataBackendException(\"Error retrieving group information\", e);\n }\n finally\n {\n if (con != null)\n {\n Transaction.safeRollback(con);\n }\n }\n\n return exists;\n }", "boolean isHasResources();", "public boolean hasGroup(String groupName){\n\t\tGuild self = this;\r\n//\t\tSystem.out.println(\"this=\" + name +\" self.groups=\"+ groups);\r\n\t\tif (self.groups == null || self.groups.isEmpty())/// try and get it again from db\r\n\t\t\tself = MysticGuilds.getGuild(this.getName());\r\n\t\tif (self == null || self.groups == null || self.groups.isEmpty())\r\n\t\t\treturn false;\r\n\t\tfor (PermissionGroup group: self.groups){\r\n//\t\t\tSystem.out.println(\"looking at group = \" + group);\r\n\t\t\tif (group.getName().equalsIgnoreCase(groupName))\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public Future<List<String>> checkResGrp(List<String> resGrpList) {\n Promise<List<String>> p = Promise.promise();\n\n Collector<Row, ?, List<String>> catIdCollector =\n Collectors.mapping(row -> row.getString(CAT_ID), Collectors.toList());\n\n try {\n\n if (resGrpList.isEmpty()) {\n p.complete(new ArrayList<>());\n return p.future();\n }\n\n pool.withConnection(\n conn ->\n conn.preparedQuery(CHECKRESGRP)\n .collecting(catIdCollector)\n .execute(Tuple.of(resGrpList.toArray(String[]::new)))\n .onFailure(\n obj -> {\n LOGGER.error(\"checkResGrp db fail :: \" + obj.getLocalizedMessage());\n p.fail(INTERNALERROR);\n })\n .onSuccess(\n success -> {\n List<String> validItems = success.value();\n List<String> invalid =\n resGrpList.stream()\n .filter(item -> !validItems.contains(item))\n .collect(Collectors.toList());\n p.complete(invalid);\n }));\n } catch (Exception e) {\n LOGGER.error(\"Fail checkResGrp : \" + e.toString());\n p.fail(INTERNALERROR);\n }\n return p.future();\n }", "void checkInventoryExists() {\n\n MrnInventory[] checkInventory =\n new MrnInventory(survey.getSurveyId()).get();\n inventoryExists = false;\n if (checkInventory.length > 0) {\n inventoryExists = true;\n } // if (checkInventory.length > 0)\n\n\n }", "boolean isMember(Item item) throws AccessManagementException;", "@Override\n\tprotected boolean itemExists() {\n\t\treturn false;\n\t}", "boolean isSetRequiredResources();", "boolean hasResourceType();", "boolean hasResource();", "public boolean isGroupPossible()\n\t\t{\n\t\t\treturn this.m_allowedAddGroupRefs != null && ! this.m_allowedAddGroupRefs.isEmpty();\n\n\t\t}", "boolean hasProductGroupView();", "boolean isVirtualGroup(Object groupID) throws Exception;", "boolean hasItemStorage();", "@Override\n public boolean existsGroupWithName(String groupName) {\n // \"Feature 'existsGroupWithName in OAuth 2 identity server' is not implemented\"\n return false;\n }", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "@Test\n\tvoid findAllFilteredNonExistingGroup() {\n\t\tinitSpringSecurityContext(\"fdaugan\");\n\t\tfinal TableItem<UserOrgVo> tableItem = resource.findAll(null, \"any\", null, newUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(0, tableItem.getRecordsTotal());\n\t}", "boolean isSetProductGroup();", "@Test(groups = \"wso2.ds.dashboard\", description = \"Check registry resource for customized dashboard\",\n dependsOnMethods = \"testCustomizeButtonDashboard\")\n public void checkRegistrySourceForCustomizeDashboard() {\n Boolean isResourceExist = isResourceExist(\n DSIntegrationTestConstants.DASHBOARD_REGISTRY_PATH_CUSTOM_DASHBOARD_PERUSER + \"/\" + USERNAME_VIEWER\n + \"/\" + DS_DASHBOARDS_CONTEXT + \"/\" + dashboardTitle.toLowerCase());\n assertTrue(isResourceExist,\n \"Registry resource could not be created for personalize dashboard per user due to some errors\");\n }", "@Override\n public boolean isTheTaskGroupAvailable(Integer id) {\n TaskGroup taskGroup = taskGroupMapper.selectById(id);\n\n return taskGroup.getStatus() == 1;\n }", "private boolean existsSubResource()\r\n {\r\n return ((subResource_ != null) && subResource_.exists());\r\n }", "public Future<Map<String, List<String>>> checkResExist(Map<String, List<String>> request) {\n Promise<Map<String, List<String>>> p = Promise.promise();\n\n Future<List<String>> resGrp;\n Future<List<String>> resItem;\n if (request.containsKey(RES_GRP)) {\n\n List<String> resGrpIds = request.get(RES_GRP);\n resGrp = checkResGrp(resGrpIds);\n } else resGrp = Future.succeededFuture(new ArrayList<String>());\n\n if (request.containsKey(RES)) {\n List<String> resIds = request.get(RES);\n resItem = checkResource(resIds);\n } else resItem = Future.succeededFuture(new ArrayList<String>());\n\n CompositeFuture.all(resGrp, resItem)\n .onSuccess(\n obj -> {\n Map<String, List<String>> resp = new HashMap<>();\n if (!resGrp.result().isEmpty()) resp.put(RES_GRP, resGrp.result());\n\n if (!resItem.result().isEmpty()) resp.put(RES, resItem.result());\n p.complete(resp);\n })\n .onFailure(fail -> p.fail(INTERNALERROR));\n return p.future();\n }", "public boolean has(String itemName);", "public Future<List<String>> checkResource(List<String> resourceList) {\n Promise<List<String>> p = Promise.promise();\n\n Collector<Row, ?, List<String>> catIdCollector =\n Collectors.mapping(row -> row.getString(\"cat_id\"), Collectors.toList());\n\n try {\n\n if (resourceList.isEmpty()) {\n p.complete(new ArrayList<>());\n return p.future();\n }\n\n pool.withConnection(\n conn ->\n conn.preparedQuery(GET_RES_DETAILS)\n .collecting(catIdCollector)\n .execute(Tuple.of(resourceList.toArray(String[]::new)))\n .onFailure(\n obj -> {\n LOGGER.error(\"checkResource db fail :: \" + obj.getLocalizedMessage());\n p.fail(\"internal error\");\n })\n .onSuccess(\n success -> {\n List<String> validItems = success.value();\n\n List<String> invalid =\n resourceList.stream()\n .filter(item -> !validItems.contains(item))\n .collect(Collectors.toList());\n\n p.complete(invalid);\n }));\n } catch (Exception e) {\n LOGGER.error(\"Fail: \" + e.toString());\n p.fail(\"internal error\");\n }\n return p.future();\n }", "public boolean hasGroupId() {\n return genClient.cacheHasKey(CacheKey.groupId);\n }", "private boolean contains(Collection<Group> groups, Group group) {\n for (Group g : groups) {\n if (group.getName().equals(g.getName()))\n return true;\n }\n return false;\n }", "public synchronized boolean checkGroup(String groupName) {\n\t\t\tif(groupList.containsKey(groupName)) { \n\t\t\t\treturn true; \n\t\t\t}\n\t\t\telse { \n\t\t\t\treturn false; \n\t\t\t}\n\t\t}", "public boolean checkHumanResourceContentByMember(Member member) {\n\t\tSl = \"SELECT * FROM human_resource_content WHERE memberAccount=?\";\r\n\t\ttry {\r\n\t\t\tconn = dataSource.getConnection();\r\n\t\t\tsmt = conn.prepareStatement(Sl);\r\n\t\t\tsmt.setString(1, member.getAccount());\r\n\t\t\trs = smt.executeQuery();\r\n\t\t\tif(rs.next()){\t\t\t\t\r\n\t\t\t\tsmt.setString(1, member.getAccount());\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tsmt.executeQuery();\t\r\n\t\t\trs.close();\r\n\t\t\tsmt.close();\r\n \r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n \r\n\t\t} finally {\r\n\t\t\tif (conn != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tconn.close();\r\n\t\t\t\t} catch (SQLException e) {}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void checkStorageGroupAlreadySet(PartialPath path) throws StorageGroupAlreadySetException {\n String[] nodeNames = path.getNodes();\n IMNode cur = root;\n if (!nodeNames[0].equals(root.getName())) {\n return;\n }\n for (int i = 1; i < nodeNames.length; i++) {\n if (!cur.hasChild(nodeNames[i])) {\n return;\n }\n cur = cur.getChild(nodeNames[i]);\n if (cur.isStorageGroup()) {\n throw new StorageGroupAlreadySetException(cur.getFullPath());\n }\n }\n throw new StorageGroupAlreadySetException(path.getFullPath(), true);\n }", "boolean groupSupports(Object groupID, int groupConstant) throws Exception;", "private boolean isFormsExistInGroup(String groupName)throws CoeusUIException{\r\n RequesterBean requesterBean = new RequesterBean();\r\n boolean isFormExistsInGroup = false;\r\n requesterBean.setFunctionType(FORM_EXISTS_IN_GROUP);\r\n requesterBean.setDataObject(groupName);\r\n AppletServletCommunicator comm = new AppletServletCommunicator(connect,requesterBean);\r\n comm.send();\r\n ResponderBean responder = comm.getResponse();\r\n if(responder != null){\r\n if(responder.isSuccessfulResponse() && responder.getDataObject() != null){\r\n isFormExistsInGroup = ((Boolean)responder.getDataObject()).booleanValue();\r\n }\r\n }else {\r\n throw new CoeusUIException(coeusMessageResources.parseMessageKey(\"coeusApplet_exceptionCode.1147\"));\r\n }\r\n return isFormExistsInGroup;\r\n }", "boolean containsRequirementFor(AResourceType type);", "public abstract boolean isInGroup(String hostname);", "public boolean checkQorder(Connection con)\n throws qdbException, qdbErrMessage\n {\n Vector resCon = dbResourceContent.getChildAss(con,mod_res_id);\n dbResourceContent rcn = new dbResourceContent();\n\n for(int i=1;i<=resCon.size();i++) {\n rcn = (dbResourceContent) resCon.elementAt(i-1);\n if (rcn.rcn_order != i)\n return false;\n }\n\n return true;\n }", "public boolean canContainItem(String item) {\n boolean badRequirementSet;\n for(List<String> requirementSet : listOfRequirementSets) {\n if(requirementSet.contains(item)) {\n continue; // This requirement set doesn't work; try another one.\n }\n if(item.equals(\"Ankh Jewel\")) {\n badRequirementSet = false;\n for(String requirement : requirementSet) {\n if(requirement.contains(\"Amphisbaena Defeated\") || requirement.contains(\"Sakit Defeated\")\n || requirement.contains(\"Ellmac Defeated\") || requirement.contains(\"Bahamut Defeated\")\n || requirement.contains(\"Viy Defeated\") || requirement.contains(\"Baphomet Defeated\")\n || requirement.contains(\"Palenque Defeated\") || requirement.contains(\"Tiamat Defeated\")) {\n badRequirementSet = true;\n break;\n }\n }\n if(badRequirementSet) {\n continue; // Minimize Ankh Jewel lock.\n }\n }\n return true;\n }\n return false;\n }", "private boolean itemListContains(Item item){\r\n\t\treturn items.containsKey(item.getItemIdentifier());\r\n\t}", "public interface Group extends Item {\n\n /**\n * Gets all parents of this group in no particular order.\n * \n * @return array of parent groups, or empty array if there are no parent groups.\n * @throws AccessManagementException\n */\n Group[] getParents() throws AccessManagementException;\n\n /**\n * Gets all members of this group in no particular order.\n * \n * @return array of members, or empty array if there are no members.\n * @throws AccessManagementException\n */\n Item[] getMembers() throws AccessManagementException;\n\n // TODO: Because of scalability issues We should introduce an iterator for getting all members\n\n /**\n * Adds a member to this group.\n * The group is not saved automatically.\n * \n * @param item\n * @throws AccessManagementException\n * if item already is a member of this group, or if something\n * else goes wrong.\n */\n void addMember(Item item) throws AccessManagementException;\n\n /**\n * Removes item from this group.\n * The group is not saved automatically.\n * \n * @param item\n * @throws AccessManagementException\n * if item is not a member of this group, or if something else\n * goes wrong.\n */\n void removeMember(Item item) throws AccessManagementException;\n\n /**\n * Indicates whether the item is a member of this group.\n * \n * @param item\n * @return true if the item is a member of this group, false otherwise.\n * @throws AccessManagementException\n */\n boolean isMember(Item item) throws AccessManagementException;\n}", "public static boolean isInAppBlackList(ContentResolver cr,String packageName){\n Cursor cursor=null;\n int count=0;\n cursor = cr.query(APP_CONTENT_URI, new String[]{\"package_name\"},\n \" package_name=? \", new String[]{packageName}, null);\n if (cursor!=null) {\n try {\n count = cursor.getCount();\n } finally{\n cursor.close();\n }\n }\n return count > 0;\n }", "private boolean isValid(){\n\n Set<ResourceSingle> checkSet = new HashSet<>();\n return shelves.stream()\n .map(Shelf::getCurrentType)\n .filter(Objects::nonNull)\n .allMatch(checkSet::add);\n }", "@Test\n\tvoid findAllForMySubGroup() {\n\t\tinitSpringSecurityContext(\"mmartin\");\n\t\tfinal TableItem<UserOrgVo> tableItem = resource.findAll(null, \"biz agency\", \"fdoe2\", newUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(1, tableItem.getRecordsTotal());\n\t\tAssertions.assertEquals(1, tableItem.getRecordsFiltered());\n\t\tAssertions.assertEquals(1, tableItem.getData().size());\n\n\t\t// Check the users\n\t\tAssertions.assertEquals(\"fdoe2\", tableItem.getData().get(0).getId());\n\t\tAssertions.assertFalse(tableItem.getData().get(0).isCanWrite());\n\t\tAssertions.assertTrue(tableItem.getData().get(0).isCanWriteGroups());\n\n\t\t// Check the groups\n\t\t// \"Biz Agency\" is visible since \"mmartin\" is in the parent group \"\n\t\tAssertions.assertEquals(2, tableItem.getData().get(0).getGroups().size());\n\t\tAssertions.assertEquals(\"Biz Agency\", tableItem.getData().get(0).getGroups().get(0).getName());\n\t\tAssertions.assertTrue(tableItem.getData().get(0).getGroups().get(0).isCanWrite());\n\t\tAssertions.assertEquals(\"DIG RHA\", tableItem.getData().get(0).getGroups().get(1).getName());\n\t\tAssertions.assertFalse(tableItem.getData().get(0).getGroups().get(1).isCanWrite());\n\t}", "public boolean f(Context ctx, Object obj)\r\n {\n if (groupIds_ == null)\r\n {\r\n new MinorLogMsg(\r\n this,\r\n \"Unable to filter because the contract group ids is unspecified.\",\r\n null).log(ctx);\r\n return true;\r\n }\r\n \r\n ContractGroup group = (ContractGroup) obj;\r\n\r\n if (groupIds_.contains(group.getIdentifier()))\r\n {\r\n return true;\r\n }\r\n \r\n return false;\r\n }", "public boolean isStorageGroupAlreadySet(PartialPath path) {\n String[] nodeNames = path.getNodes();\n IMNode cur = root;\n if (!nodeNames[0].equals(root.getName())) {\n return false;\n }\n for (int i = 1; i < nodeNames.length; i++) {\n if (!cur.hasChild(nodeNames[i])) {\n return false;\n }\n cur = cur.getChild(nodeNames[i]);\n if (cur.isStorageGroup()) {\n return true;\n }\n }\n return true;\n }", "public boolean existsGroup(String groupId) {\n\t\treturn true;\n\t}", "public boolean isSetResources() {\n return this.resources != null;\n }", "public boolean isSetResources() {\n return this.resources != null;\n }", "public boolean haveItem(Items item)\n {\n //boolean haveItem = Inventory.values().contains(item);\n return Inventory.containsValue(item);\n }", "public boolean isGroup(String name) {\n return grouptabs.containsKey(name);\n }", "private boolean findEmptyGroup(){\r\n boolean isEmpty = true;\r\n TreeNode root = (TreeNode)sponsorHierarchyTree.getModel().getRoot();\r\n TreePath result = findEmptyGroup(sponsorHierarchyTree, new TreePath(root));\r\n if( result != null && result.getLastPathComponent() instanceof Integer ){\r\n CoeusOptionPane.showInfoDialog(\r\n coeusMessageResources.parseMessageKey(\"sponsorHierarchyList_exceptionCode.1204\"));\r\n isEmpty = false;\r\n }\r\n return isEmpty;\r\n }", "@Test\n\tvoid addUserToGroup() {\n\t\t// Pre condition\n\t\tAssertions.assertTrue(resource.findById(\"wuser\").getGroups().contains(\"Biz Agency Manager\"));\n\n\t\tresource.addUserToGroup(\"wuser\", \"biz agency manager\");\n\n\t\t// Post condition -> no change\n\t\tAssertions.assertTrue(resource.findById(\"wuser\").getGroups().contains(\"Biz Agency Manager\"));\n\t}", "boolean hasHotelGroupView();", "@Test\n\tpublic void testNameExistsInGroupSuccess() {\n\n\t\tgrupo.addColaborador(col2);\n\t\tcol2.setNome(\"Sergio\");\n\t\tboolean result = grupo.nameExistsInGroup(\"Sergio\");\n\n\t\tassertTrue(result);\n\t}", "public boolean checkEventsAndGroupsLink();", "boolean hasFeedItemSet();", "@Test\n\tpublic void testFindAllGroupsForUser() throws PaaSApplicationException {\n\n\t\tUser user = new User();\n\t\tuser.setName(\"tstsys\");\n\n\t\tList<Group> groups = repo.findAllGroupsForUser(user);\n\n\t\tList<String> names = groups.stream().map(g -> g.getName()).collect(Collectors.toList());\n\n\t\tAssertions.assertEquals(2, groups.size(), \"Find all groups for a given user\");\n\t\tassertThat(names, hasItems(\"tstsys\", \"tstadm\"));\n\t}", "public boolean inGroup(Person p){\n\t return false;\n }", "public static boolean itemExists(String itemName)\n {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n\n String query = \"SELECT count(*) FROM Item \" +\n \"WHERE itemName\"+ \"=\" + \"'\" + itemName + \"'\";\n try\n {\n ps = connection.prepareStatement(query);\n //ps.setString(1, emailAddress);\n rs = ps.executeQuery();\n if (rs.next()) {\n\t\tif (rs.getInt(1) > 0) {\n\t\t return true;\n\t\t}\n\t }\n }\n catch(SQLException e)\n {\n e.printStackTrace();\n return false;\n }\n finally\n {\n DButil.closeResultSet(rs);\n DButil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n return false;\n }", "public static boolean checkResources(){\n for(Instruction i : waitingList){\n if(resourceArr[i.resourceType - 1] >= i.resourceAmount){\n return true;\n }\n }\n for(int i = 0 ; i < taskPointers.length; i ++){\n int pointerIndex = taskPointers[i];\n Task currTask = taskList.get(i);\n if(currTask.terminateTime == - 1 && (currTask.isAborted == false) && Collections.disjoint(waitingList, currTask.instructionList)){\n Instruction currInstruction = currTask.instructionList.get(pointerIndex);\n Type instructionType = currInstruction.instructionType;\n int resourceType = currInstruction.resourceType;\n if(instructionType != Type.request){\n return true;\n }else{\n if(resourceArr[currInstruction.resourceType - 1] >= currInstruction.resourceAmount){\n return true;\n }\n }\n }\n\n }\n return false;\n }", "public boolean isGroupLinkPathPresent() {\r\n\t\treturn isElementPresent(manageVehiclesSideBar.replace(\"Manage Vehicles\", \"Group List\"), SHORTWAIT);\r\n\t}", "public boolean resourceExists(TIdentifiable resource) {\r\n return (m_resources.getIndex(resource) >= 0);\r\n }", "boolean isStoreInGroup(String code) throws ServiceException;", "protected boolean isValid() {\n return COLLECTION.getList().contains(this);\n }", "public boolean isIdExist(int projectId) throws EmployeeManagementException;", "private void checkCollisionGroupInternal() {\n\t\tcheckInternalCollisions();\r\n\t\t\r\n\t\t// for every composite in this Group..\r\n\t\tint clen = _composites.size();\r\n\t\tfor (int j = 0; j < clen; j++) {\r\n\t\t\t\r\n\t\t\tComposite ca = _composites.get(j);\r\n\t\t\t\r\n\t\t\t// .. vs non composite particles and constraints in this group\r\n\t\t\tca.checkCollisionsVsCollection(this);\r\n\t\t\t\r\n\t\t\t// ...vs every other composite in this Group\r\n\t\t\tfor (int i = j + 1; i < clen; i++) {\r\n\t\t\t\tComposite cb = _composites.get(i);\r\n\t\t\t\tca.checkCollisionsVsCollection(cb);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean isNotNullGroupId() {\n return genClient.cacheValueIsNotNull(CacheKey.groupId);\n }", "boolean isXMLGroup(Object groupID) throws Exception;", "public boolean isItemGroup() {\n return itemGroup;\n }", "private boolean canView(final AbstractItem item) throws AccessDeniedException {\n\t\tif (item.isRssAllowed())\n\t\t\treturn true;\n\t\tList<Subscriber> subscribers = Lists.newArrayList(subscriberRepository.findAll(SubscriberPredicates.onCtx(item\n\t\t\t\t.getContextKey())));\n\t\t// TODO we consider that all items have targets directly on\n\t\t// for targets defined only on classification a check will be needed\n\t\tif (subscribers.isEmpty()) {\n\t\t\tlog.trace(\"Subscribers on item {} are empty -> true\", item.getContextKey());\n\t\t\treturn true;\n\t\t}\n\t\tfinal CustomUserDetails user = SecurityUtils.getCurrentUserDetails();\n\t\tif (user == null) {\n\t\t\tlog.trace(\"user is not authenticated -> throw an error to redirect on authentication\");\n\t\t\tthrow new AccessDeniedException(\"Access is denied to anonymous !\");\n\t\t} else if (user.getRoles().contains(AuthoritiesConstants.ADMIN)\n\t\t\t\t|| user.getUser().getLogin().equalsIgnoreCase(item.getCreatedBy().getLogin())\n\t\t\t\t|| user.getUser().getLogin().equalsIgnoreCase(item.getLastModifiedBy().getLogin())) {\n\t\t\treturn true;\n\t\t}\n\n\t\tfinal UserDTO userDTO = user.getUser();\n\t\tif (userDTO != null) {\n\t\t\tList<String> groups = null;\n\t\t\tif (userDTO.getAttributes() != null) {\n\t\t\t\tgroups = userDTO.getAttributes().get(externalUserHelper.getUserGroupAttribute());\n\t\t\t}\n\t\t\tfor (Subscriber subscriber : subscribers) {\n\t\t\t\tlog.trace(\"Check if {} is in {}\", userDTO, subscriber);\n\t\t\t\tfinal SubjectKeyExtended subject = subscriber.getSubjectCtxId().getSubject();\n\t\t\t\tswitch (subject.getKeyType()) {\n\t\t\t\tcase GROUP:\n\t\t\t\t\tif (groups == null || groups.isEmpty()) {\n\t\t\t\t\t\tlog.trace(\"The user doesn't have a group -> break loop\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t// test on startWith as some groups in IsMemberOf has only a part the\n\t\t\t\t\t// real group name.\n\t\t\t\t\tfor (String val : groups) {\n\t\t\t\t\t\tif (val.startsWith(subject.getKeyValue())) {\n\t\t\t\t\t\t\tlog.trace(\"Check if the user group {} match subscriber group {} -> return true\", val,\n\t\t\t\t\t\t\t\t\tsubject.getKeyValue());\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase PERSON:\n\t\t\t\t\tif (subject.getKeyValue().equalsIgnoreCase(userDTO.getLogin())) {\n\t\t\t\t\t\tlog.trace(\"Check if the user key {} match subscriber key {} -> true\", userDTO.getLogin(),\n\t\t\t\t\t\t\t\tsubject.getKeyValue());\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase PERSON_ATTR:\n\t\t\t\t\tif (subject.getKeyAttribute() != null\n\t\t\t\t\t\t\t&& userDTO.getAttributes().containsKey(subject.getKeyAttribute())\n\t\t\t\t\t\t\t&& userDTO.getAttributes().get(subject.getKeyAttribute()).contains(subject.getKeyValue())) {\n\t\t\t\t\t\tlog.trace(\"Check if the user attribute {} with values {} contains value {} -> true\",\n\t\t\t\t\t\t\t\tsubject.getKeyAttribute(), userDTO.getAttributes().get(subject.getKeyAttribute()),\n\t\t\t\t\t\t\t\tsubject.getKeyValue());\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase PERSON_ATTR_REGEX:\n\t\t\t\t\tif (subject.getKeyAttribute() != null\n\t\t\t\t\t\t\t&& userDTO.getAttributes().containsKey(subject.getKeyAttribute())) {\n\t\t\t\t\t\tfor (final String value : userDTO.getAttributes().get(subject.getKeyAttribute())) {\n\t\t\t\t\t\t\tif (value.matches(subject.getKeyValue())) {\n\t\t\t\t\t\t\t\tlog.trace(\"Check if the user attribute {} with values {} match regex {} -> true\",\n\t\t\t\t\t\t\t\t\t\tsubject.getKeyAttribute(),\n\t\t\t\t\t\t\t\t\t\tuserDTO.getAttributes().get(subject.getKeyAttribute()), subject.getKeyValue());\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new IllegalStateException(\"Warning Subject Type '\" + subject.getKeyType()\n\t\t\t\t\t\t\t+ \"' is not managed\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlog.trace(\"End of all checks -> false\");\n\t\treturn false;\n\t}", "boolean hasResMineID();", "protected boolean resourceExists() {\n\t\tIWorkspace workspace = ResourcesPlugin.getWorkspace();\n\t\tif (workspace == null)\n\t\t\treturn false;\n\t\treturn RodinDB.getTarget(workspace.getRoot(), this.getPath()\n\t\t\t\t.makeRelative(), true) != null;\n\t}", "boolean validateUserGroups(SessionState state, String userId, Assignment asn)\n\t{\n\t\tSite site = getSite(asn);\n\n\t\t// finding any of the user's groups is sufficient, if they are in multiple groups the check\n\t\t// will fail no matter which of their groups is used\n\t\tOptional<Group> userGroup = getGroupsWithUser(userId, asn, site).stream().findAny();\n\t\tif (userGroup.isPresent())\n\t\t{\n\t\t\treturn checkSubmissionForUsersInMultipleGroups(asn, userGroup.get(), state, true).isEmpty();\n\t\t}\n\n\t\t// user is not in any assignment groups, if they are an instructor this is probably the Student View feature so let them through\n\t\treturn assignmentService.allowAddAssignment(site.getId()) || assignmentService.allowUpdateAssignmentInContext(site.getId());\n\t}", "boolean hasRegistry();", "@Override\n public boolean isItemCached(String groupId, String itemId) {\n File file = new Item(groupId, itemId).getFile();\n deleteIfState(file);\n return file.exists();\n }", "public boolean isSetComparesource()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(COMPARESOURCE$2) != 0;\r\n }\r\n }", "public void testRequiredRolesMultipleRequiredGroupsOk() {\n User elmer = RoleFactory.createUser(\"elmer\");\n User pepe = RoleFactory.createUser(\"pepe\");\n User bugs = RoleFactory.createUser(\"bugs\");\n User daffy = RoleFactory.createUser(\"daffy\");\n \n Group administrators = RoleFactory.createGroup(\"administrators\");\n administrators.addRequiredMember(m_anyone);\n administrators.addMember(elmer);\n administrators.addMember(pepe);\n administrators.addMember(bugs);\n\n Group family = RoleFactory.createGroup(\"family\");\n family.addRequiredMember(m_anyone);\n family.addMember(elmer);\n family.addMember(pepe);\n family.addMember(daffy);\n\n Group alarmSystemActivation = RoleFactory.createGroup(\"alarmSystemActivation\");\n alarmSystemActivation.addMember(m_anyone);\n alarmSystemActivation.addRequiredMember(administrators);\n alarmSystemActivation.addRequiredMember(family);\n\n assertTrue(m_roleChecker.isImpliedBy(alarmSystemActivation, elmer));\n assertTrue(m_roleChecker.isImpliedBy(alarmSystemActivation, pepe));\n assertFalse(m_roleChecker.isImpliedBy(alarmSystemActivation, bugs));\n assertFalse(m_roleChecker.isImpliedBy(alarmSystemActivation, daffy));\n }", "private boolean dateAvailable(List<DateGroup> dateGroups) {\n final int NOT_AVAILABLE = 0;\n return dateGroups.size() > NOT_AVAILABLE;\n }", "public boolean inGroup(String groupName) {\r\n return true;\r\n }", "@Override\r\n\tpublic boolean isSameGroup(EyeTrackerItem element) {\n\t\treturn this.group.items.contains(element);\r\n\t}", "@Test\n\tpublic void testVerifyExistenceOfRoleSeedData() {\n\n\t\tfinal List<Industry> industries = industryDao.getAll();\n\n\t\tAssert.assertTrue(industries.size() == 16);\n\n\t\tboolean otherIndustryFound = false;\n\t\tboolean perimeterIndustryFound = false;\n\n\t\tfor (final Industry industry : industries) {\n\n\t\t\tif (industry.getName().equals(\"Transportation\")) {\n\t\t\t\tperimeterIndustryFound = true;\n\t\t\t} else if (industry.getName().equals(\"Other\")) {\n\t\t\t\totherIndustryFound = true;\n\t\t\t}\n\n\t\t}\n\n\t\tAssert.assertTrue(\"Expected the industry named 'Transportation'. Is seed data populated?\", perimeterIndustryFound);\n\t\tAssert.assertTrue(\"Expected the industry named 'Other'. Is seed data populated?\", otherIndustryFound);\n\n\t}", "boolean hasAdGroupCriterion();", "public boolean hasItem() {\n return null != item;\n }", "public boolean inGroup(String groupName);", "boolean hasAdGroupAd();", "boolean hasGroupByCategory();", "private boolean hasResourceActionAllowPermissions(Resource resource,\n String action) {\n String whereClause = \"p.resource = :resource AND (\"\n + \"(p.action = :action AND p.type = :typeAllow) OR \"\n + \"(p.type = :typeAllowAll))\";\n Map<String, Object> parameters = new HashMap<String, Object>();\n parameters.put(\"resource\", resource.getIdentifier());\n parameters.put(\"action\", action);\n parameters.put(\"typeAllow\", PermissionType.ALLOW);\n parameters.put(\"typeAllowAll\", PermissionType.ALLOW_ALL);\n\n Long count = FacadeFactory.getFacade().count(PermissionEntity.class,\n whereClause, parameters);\n\n return count > 0 ? true : false;\n }", "@Test\n\tvoid findAllForMyGroup() {\n\t\tinitSpringSecurityContext(\"mmartin\");\n\t\tfinal TableItem<UserOrgVo> tableItem = resource.findAll(null, \"dig as\", null, newUriInfoAsc(\"id\"));\n\n\t\t// 4 users from delegate and 1 from my company\n\t\tAssertions.assertEquals(5, tableItem.getRecordsTotal());\n\t\tAssertions.assertEquals(5, tableItem.getRecordsFiltered());\n\t\tAssertions.assertEquals(5, tableItem.getData().size());\n\n\t\t// Check the users (from delegate)\n\t\tAssertions.assertEquals(\"fdoe2\", tableItem.getData().get(0).getId());\n\t\tAssertions.assertFalse(tableItem.getData().get(0).isCanWrite());\n\t\tAssertions.assertTrue(tableItem.getData().get(0).isCanWriteGroups());\n\t}", "boolean capabilityExist( String id );", "boolean hasAdGroupLabel();" ]
[ "0.60597545", "0.5959568", "0.5848063", "0.5790202", "0.56942254", "0.56694156", "0.5657831", "0.5655353", "0.5597885", "0.55766535", "0.554223", "0.55403733", "0.5532502", "0.5524109", "0.55240345", "0.55187345", "0.5505507", "0.54915303", "0.5486895", "0.54113364", "0.53930134", "0.5392851", "0.53888935", "0.5379014", "0.5379014", "0.5379014", "0.5379014", "0.5379014", "0.5379014", "0.5379014", "0.5374804", "0.5366729", "0.53657067", "0.53578323", "0.53545165", "0.532552", "0.5310163", "0.5287527", "0.52650404", "0.5247352", "0.5234147", "0.5226296", "0.52148354", "0.5207018", "0.5202217", "0.520085", "0.5183997", "0.5164314", "0.51634616", "0.51589733", "0.5155767", "0.5155556", "0.5144584", "0.51242864", "0.5118347", "0.51011574", "0.5096883", "0.5096294", "0.5096294", "0.50929654", "0.50861245", "0.508204", "0.5080757", "0.50793874", "0.5074953", "0.50647277", "0.50606143", "0.50572944", "0.5045822", "0.5036912", "0.5031042", "0.5015669", "0.5014048", "0.5012832", "0.5005633", "0.49922523", "0.49893856", "0.49817637", "0.49795073", "0.49696314", "0.4948958", "0.49388695", "0.49316776", "0.4922081", "0.49188602", "0.49181253", "0.49044174", "0.49012923", "0.4897739", "0.48949784", "0.4884538", "0.48840377", "0.48828772", "0.48772043", "0.4874245", "0.4870799", "0.48707613", "0.48678038", "0.48569876", "0.48539412", "0.4852376" ]
0.0
-1
get owner_id for resource_group items
public Future<Map<String, UUID>> getResGrpOwners(List<String> resGrpId) { Promise<Map<String, UUID>> p = Promise.promise(); Collector<Row, ?, Map<String, UUID>> ownerCollector = Collectors.toMap(row -> row.getString(CAT_ID), row -> row.getUUID(PROVIDER_ID)); pool.withConnection( conn -> conn.preparedQuery(GET_RES_GRP_OWNER) .collecting(ownerCollector) .execute(Tuple.of(resGrpId.toArray())) .onFailure( obj -> { LOGGER.error("getResGrpOwners db fail :: " + obj.getLocalizedMessage()); p.fail(INTERNALERROR); }) .onSuccess( success -> { p.complete(success.value()); })); return p.future(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic UUID getOwnerId() {\n\t\treturn this.dataManager.get(OWNER_UUID).orNull();\n\t}", "int getOwnerID();", "public Integer getOwnerId() {\n return ownerId;\n }", "public String getOwnerId() {\n return ownerId;\n }", "java.lang.String getOwner();", "java.lang.String getOwner();", "long getOwnerIdLong();", "public java.lang.String getOwnerId() {\r\n return ownerId;\r\n }", "final int GetOwner() {\n return owner;\n }", "@Override\n public final Long getOwnerId() {\n return null;\n }", "public int getOwnerID() {\r\n\t\treturn ownerID;\r\n\t}", "public Long getIdOwner() {\r\n return idOwner;\r\n }", "default String getOwnerId()\n {\n return Long.toUnsignedString(getOwnerIdLong());\n }", "public String getOwner();", "public final UUID getOwnerUniqueId() {\n\t\treturn ownerUniqueId;\n\t}", "String getOwner();", "String getOwner();", "public Long getOwnerEntityId()\r\n\t{\r\n\t\treturn ownerEntityId;\r\n\t}", "@objid (\"8b942215-f0a1-454e-9f8a-596315ee40d5\")\n Instance getOwner();", "public UUID getOwner() {\n return owner;\n }", "public UUID getOwner() {\n return owner;\n }", "public String getOwner(){\r\n \ttry{\r\n \t\t_lockObject.lock();\r\n \t\treturn _owner;\r\n \t}finally{\r\n \t\t_lockObject.unlock();\r\n \t}\r\n }", "public long getOwner() {\n\t\treturn owner;\n\t}", "public Integer getPrimaryOwnerId() {\n return primaryOwnerId;\n }", "public synchronized String getGroupOwner(String groupName) {\n\t\t\treturn groupList.get(groupName).getCreator();\n\t\t}", "User getOwner();", "public String getOwner() {\r\n if (mOwner==null) {\r\n return \"n/a\";\r\n }\r\n return mOwner;\r\n }", "public String getOwnerAccountId() {\n return this.ownerAccountId;\n }", "public IPermissionOwner getPermissionOwner(long id);", "public Long getOwnerUserId() {\n return ownerUserId;\n }", "public String getOwner() {\r\n return owner;\r\n }", "public User getOwner()\r\n\t\tthrows PermissionDeniedException, BaseException\r\n\t{\r\n throw new UnsupportedOperationException(\"Fix This\"); // ToDo\r\n//\t\treturn getDbControl().getItem(User.class, getData().getOwner());\r\n\t}", "public String getOwner() {\r\n\t\treturn owner;\r\n\t}", "public Organisation getOwner() {\n for (final DeviceAuthorization authorization : this.authorizations) {\n if (authorization.getFunctionGroup().equals(DeviceFunctionGroup.OWNER)) {\n return authorization.getOrganisation();\n }\n }\n\n return null;\n }", "public String getOwner() {\n return owner;\n }", "public String getOwner() {\n return owner;\n }", "public String getOwner() {\n return owner;\n }", "public String getOwner() {\n return owner;\n }", "public String getOwner() {\n return owner;\n }", "public String getOwner() {\n return owner;\n }", "public int getOwner() {\n validify();\n return Client.INSTANCE.pieceGetOwner(ptr);\n }", "String getLockOwner();", "long getLockOwnersID(String uuid) throws DatabaseException;", "public String getOwner() {\n return mOwner;\n }", "public String getOwner() {\n\n return owner;\n\n }", "@Test\n public void ownerArgumentNotAddedIfOwnerIsInGroupWithUserPools() throws AmplifyException {\n final AuthorizationType mode = AuthorizationType.AMAZON_COGNITO_USER_POOLS;\n\n // OwnerInGroup class uses combined owner and group-based auth,\n // and user is in the read-restricted group.\n for (SubscriptionType subscriptionType : SubscriptionType.values()) {\n GraphQLRequest<OwnerInGroup> originalRequest =\n createRequest(OwnerInGroup.class, subscriptionType);\n GraphQLRequest<OwnerInGroup> modifiedRequest =\n decorator.decorate(originalRequest, mode);\n assertNull(getOwnerField(modifiedRequest));\n }\n }", "public String getOwnerName() {\r\n return this.ownerName;\r\n }", "public String getOwner() { return owner; }", "public String getOwner() {\n return lockOwner;\n }", "public String getOwner(){\n return owner;\r\n }", "public String getOwner(){\n\t\treturn new SmartAPIModel().getCpOwner(cp.getLocalName());\n\t}", "public String owner() {\n return this.owner;\n }", "public String getOwner() {\n\n return Owner;\n }", "public String getProjectOwnerId() {\n\t\treturn projectOwnerId;\n\t}", "public java.lang.String getGroupOwnerName() {\n return groupOwnerName;\n }", "public synchronized static String getRew3GroupId() {\n return \"userId\";\n }", "public String getownerName() {\n\t return this.ownerName;\n\t}", "public GroupOwnerModel getGroupOwnerModel() {\r\n\t\treturn groupOwnerModel;\r\n\t}", "String getCreatorId();", "public ID owner() {\n\treturn ((BeGrandMap) CurrentGrandMap.fluidGet()).placeOwnerID(myID);\n/*\nudanax-top.st:21970:FeGrandPlaceHolder methodsFor: 'client accessing'!\n{ID} owner\n\t\"Ask the GrandMap who owns this ID\"\n\t^CurrentGrandMap fluidGet placeOwnerID: myID!\n*/\n}", "public Future<Map<String, UUID>> getOwnerId(Map<String, List<String>> request) {\n Promise<Map<String, UUID>> p = Promise.promise();\n\n Future<Map<String, UUID>> resGrp;\n Future<Map<String, UUID>> resItem;\n /* if(request.containsKey(RES_SERVER))\n {\n List<String> resSerIds = request.get(RES_SERVER);\n Future<Map<String,UUID>> resSer = getResGrpOwners(resSerIds);\n } else {*/\n if (request.containsKey(RES_GRP)) {\n\n List<String> resGrpIds = request.get(RES_GRP);\n resGrp = getResGrpOwners(resGrpIds);\n } else resGrp = Future.succeededFuture(new HashMap<>());\n\n if (request.containsKey(RES)) {\n List<String> resIds = request.get(RES);\n resItem = getResOwners(resIds);\n } else resItem = Future.succeededFuture(new HashMap<>());\n\n CompositeFuture.all(resGrp, resItem)\n .onSuccess(\n obj -> {\n Map<String, UUID> resp = new HashMap<>();\n if (!resGrp.result().isEmpty()) resp.putAll(resGrp.result());\n\n if (!resItem.result().isEmpty()) resp.putAll(resItem.result());\n\n p.complete(resp);\n })\n .onFailure(fail -> p.fail(INTERNALERROR));\n // }\n return p.future();\n }", "public User getObjectOwner() {\r\n\t\treturn objectOwner;\r\n\t}", "public String getOwnerString() {\n return String.valueOf(enteredBy);\n }", "public Owner getOwner()\n {\n return owner;\n }", "public AccountEntity getOwner() {\n\t\treturn owner;\n\t}", "public Owner getOwner() {\n return owner;\n }", "@ApiModelProperty(example = \"de.bluerain\", value = \"Owner of the history item\")\n public String getOwnerOrganizationId() {\n return ownerOrganizationId;\n }", "public String ownerName() {\n\t\t\treturn null;\n\t\t}", "public String getOwnerName() {\n\n return ownerName;\n }", "public String getOwnerName() {\r\n\t\treturn ownerName;\r\n\t}", "public User getOwner() {\n return owner;\n }", "String galleryItemIdentity();", "@Override\r\n\tpublic Principal getOwner() {\n\t\treturn null;\r\n\t}", "protected Object getOwner(){\n return owner;\n }", "public String getOwnerName() {\n\t\treturn ownerName;\n\t}", "com.google.protobuf.ByteString getOwner();", "com.google.protobuf.ByteString getOwner();", "public OwnerReference getOwnerReference() {\n return new OwnerReferenceBuilder()\n .withController(true)\n .withApiVersion(getApiVersion())\n .withKind(getKind())\n .withName(getMetaName())\n .withUid(getMetadata().getUid())\n .build();\n }", "public String getProductOwner();", "public synchronized static String getOwner() {\n return owner;\n }", "Optional<String> getOwner();", "public Account getOrganizationOwnerAccount() {\n return organizationOwnerAccount;\n }", "String managedBy();", "public String getAccountOwner() {\n return accountOwner;\n }", "Participant getOwner();", "public Integer getSecondaryOwnerId() {\n return secondaryOwnerId;\n }", "OwnerModel getOwnerByID(int ownerID) throws Exception;", "@Test\n public void ownerArgumentNotAddedIfOwnerIsInCustomGroup() throws AmplifyException {\n final AuthorizationType mode = AuthorizationType.OPENID_CONNECT;\n\n // OwnerInCustomGroup class uses combined owner and group-based auth,\n // and user is in the read-restricted custom group.\n for (SubscriptionType subscriptionType : SubscriptionType.values()) {\n GraphQLRequest<OwnerInCustomGroup> originalRequest =\n createRequest(OwnerInCustomGroup.class, subscriptionType);\n GraphQLRequest<OwnerInCustomGroup> modifiedRequest =\n decorator.decorate(originalRequest, mode);\n assertNull(getOwnerField(modifiedRequest));\n }\n }", "public com.sforce.soap.enterprise.sobject.SObject getOwner() {\r\n return owner;\r\n }", "public abstract User getOwner();", "public String getDataOwner();", "String getParentGroupId();", "public String getOwnership() {\n String ownership = null;\n\n if (getPrimaryInvestigator() != null\n && getDataProvider() != null\n && getPrimaryInvestigator().equals(getDataProvider())) {\n ownership = PROJECT_OWNERSHIP_PI_EQ_DP;\n\n } else if (getPrimaryInvestigator() != null\n && getDataProvider() != null\n && !getPrimaryInvestigator().equals(getDataProvider())) {\n ownership = PROJECT_OWNERSHIP_PI_NE_DP;\n\n } else if (getPrimaryInvestigator() != null) {\n ownership = PROJECT_OWNERSHIP_PI_ONLY;\n\n } else if (getDataProvider() != null) {\n ownership = PROJECT_OWNERSHIP_DP_ONLY;\n\n } else {\n ownership = PROJECT_OWNERSHIP_NONE;\n }\n return ownership;\n }", "public Player getOwner() {\n\t\tif (owner == null && possibleOwners.size() == 1)\n\t\t\towner = possibleOwners.get(0);\n\t\t\n\t\treturn owner;\n\t}", "public int getObjectID(){\n\t\treturn _groupNodeData.getObjectID();\n\t}", "List<ManagementLockOwner> owners();", "@DISPID(75)\r\n\t// = 0x4b. The runtime will prefer the VTID if present\r\n\t@VTID(73)\r\n\tjava.lang.String owner();", "public T getOwner() {\n return owner;\n }", "@JsonGetter(\"owner\")\r\n public String getOwner() {\r\n return owner;\r\n }", "@Test\n public void ownerArgumentAddedIfOwnerIsNotInGroupWithUserPools() throws AmplifyException {\n final AuthorizationType mode = AuthorizationType.AMAZON_COGNITO_USER_POOLS;\n final String expectedOwner = FakeCognitoAuthProvider.USERNAME;\n\n // OwnerNotInGroup class uses combined owner and group-based auth,\n // but user is not in the read-restricted group.\n for (SubscriptionType subscriptionType : SubscriptionType.values()) {\n GraphQLRequest<OwnerNotInGroup> originalRequest =\n createRequest(OwnerNotInGroup.class, subscriptionType);\n GraphQLRequest<OwnerNotInGroup> modifiedRequest =\n decorator.decorate(originalRequest, mode);\n assertEquals(expectedOwner, getOwnerField(modifiedRequest));\n }\n }", "@Column(name=\"owner\")\n\tpublic String getOwner() {\n\t\treturn owner;\n\t}" ]
[ "0.6816341", "0.681396", "0.6640363", "0.661915", "0.6523012", "0.6523012", "0.6447264", "0.6446513", "0.639084", "0.6361947", "0.6354002", "0.63043755", "0.6301358", "0.62756974", "0.6260875", "0.62496066", "0.62496066", "0.61761534", "0.6119737", "0.6116363", "0.6116363", "0.6065599", "0.60560083", "0.6022009", "0.599875", "0.5992762", "0.59749115", "0.5971399", "0.5956712", "0.5916375", "0.5904669", "0.5895899", "0.5875361", "0.58734894", "0.58712226", "0.58712226", "0.58712226", "0.58712226", "0.58712226", "0.58712226", "0.5840327", "0.5835144", "0.5820799", "0.5815535", "0.5804419", "0.5760396", "0.5756979", "0.5754403", "0.57483983", "0.5729644", "0.57091695", "0.5706662", "0.57065046", "0.57049525", "0.5699008", "0.5695349", "0.56699836", "0.56591296", "0.5650409", "0.5639217", "0.56367034", "0.5619805", "0.5616664", "0.5615946", "0.5613866", "0.5599582", "0.5590814", "0.55823946", "0.55757654", "0.5569961", "0.5558564", "0.5544631", "0.55298805", "0.5517573", "0.550014", "0.5497936", "0.5497936", "0.5497219", "0.5492508", "0.5443529", "0.5439237", "0.5429587", "0.54246193", "0.54244846", "0.5413427", "0.53927654", "0.5376884", "0.53763586", "0.5368809", "0.53588206", "0.5351591", "0.535072", "0.5349695", "0.5348162", "0.5342614", "0.5342091", "0.53413796", "0.53410745", "0.5339625", "0.53360313", "0.5334933" ]
0.0
-1
get owner_id for resource items
public Future<Map<String, UUID>> getResOwners(List<String> resId) { { Promise<Map<String, UUID>> p = Promise.promise(); Collector<Row, ?, Map<String, UUID>> ownerCollector = Collectors.toMap(row -> row.getString(CAT_ID), row -> row.getUUID(PROVIDER_ID)); pool.withConnection( conn -> conn.preparedQuery(GET_RES_OWNERS) .collecting(ownerCollector) .execute(Tuple.of(resId.toArray())) .onFailure( obj -> { LOGGER.error("getResOwners db fail :: " + obj.getLocalizedMessage()); p.fail(INTERNALERROR); }) .onSuccess( success -> { p.complete(success.value()); })); return p.future(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getOwnerID();", "@Override\n\tpublic UUID getOwnerId() {\n\t\treturn this.dataManager.get(OWNER_UUID).orNull();\n\t}", "public Integer getOwnerId() {\n return ownerId;\n }", "public String getOwnerId() {\n return ownerId;\n }", "long getOwnerIdLong();", "public int getOwnerID() {\r\n\t\treturn ownerID;\r\n\t}", "public Long getIdOwner() {\r\n return idOwner;\r\n }", "public java.lang.String getOwnerId() {\r\n return ownerId;\r\n }", "java.lang.String getOwner();", "java.lang.String getOwner();", "@Override\n public final Long getOwnerId() {\n return null;\n }", "public Long getOwnerEntityId()\r\n\t{\r\n\t\treturn ownerEntityId;\r\n\t}", "final int GetOwner() {\n return owner;\n }", "default String getOwnerId()\n {\n return Long.toUnsignedString(getOwnerIdLong());\n }", "public String getOwner();", "public Integer getPrimaryOwnerId() {\n return primaryOwnerId;\n }", "String getOwner();", "String getOwner();", "public UUID getOwner() {\n return owner;\n }", "public UUID getOwner() {\n return owner;\n }", "public final UUID getOwnerUniqueId() {\n\t\treturn ownerUniqueId;\n\t}", "User getOwner();", "public Long getOwnerUserId() {\n return ownerUserId;\n }", "public long getOwner() {\n\t\treturn owner;\n\t}", "@objid (\"8b942215-f0a1-454e-9f8a-596315ee40d5\")\n Instance getOwner();", "OwnerModel getOwnerByID(int ownerID) throws Exception;", "public String getOwnerAccountId() {\n return this.ownerAccountId;\n }", "public String getOwner() {\r\n if (mOwner==null) {\r\n return \"n/a\";\r\n }\r\n return mOwner;\r\n }", "public String getOwner() {\r\n return owner;\r\n }", "long getID(Object item);", "public String getOwner() {\n return owner;\n }", "public String getOwner() {\n return owner;\n }", "public String getOwner() {\n return owner;\n }", "public String getOwner() {\n return owner;\n }", "public String getOwner() {\n return owner;\n }", "public String getOwner() {\n return owner;\n }", "public String getOwner() {\r\n\t\treturn owner;\r\n\t}", "public String getOwner() {\n return mOwner;\n }", "public int getOwner() {\n validify();\n return Client.INSTANCE.pieceGetOwner(ptr);\n }", "public User getOwner()\r\n\t\tthrows PermissionDeniedException, BaseException\r\n\t{\r\n throw new UnsupportedOperationException(\"Fix This\"); // ToDo\r\n//\t\treturn getDbControl().getItem(User.class, getData().getOwner());\r\n\t}", "public String getOwner(){\n return owner;\r\n }", "public Owner getOwner()\n {\n return owner;\n }", "public String getOwner(){\r\n \ttry{\r\n \t\t_lockObject.lock();\r\n \t\treturn _owner;\r\n \t}finally{\r\n \t\t_lockObject.unlock();\r\n \t}\r\n }", "public String getOwner() {\n\n return owner;\n\n }", "public String getOwner() { return owner; }", "String getCreatorId();", "public Owner getOwner() {\n return owner;\n }", "public User getOwner() {\n return owner;\n }", "long getLockOwnersID(String uuid) throws DatabaseException;", "public AccountEntity getOwner() {\n\t\treturn owner;\n\t}", "public ID owner() {\n\treturn ((BeGrandMap) CurrentGrandMap.fluidGet()).placeOwnerID(myID);\n/*\nudanax-top.st:21970:FeGrandPlaceHolder methodsFor: 'client accessing'!\n{ID} owner\n\t\"Ask the GrandMap who owns this ID\"\n\t^CurrentGrandMap fluidGet placeOwnerID: myID!\n*/\n}", "public String getOwner() {\n\n return Owner;\n }", "public IPermissionOwner getPermissionOwner(long id);", "public String getOwner(){\n\t\treturn new SmartAPIModel().getCpOwner(cp.getLocalName());\n\t}", "public User getObjectOwner() {\r\n\t\treturn objectOwner;\r\n\t}", "@ApiModelProperty(example = \"de.bluerain\", value = \"Owner of the history item\")\n public String getOwnerOrganizationId() {\n return ownerOrganizationId;\n }", "public String getOwnerName() {\r\n return this.ownerName;\r\n }", "public abstract User getOwner();", "protected Object getOwner(){\n return owner;\n }", "@JsonGetter(\"owner\")\r\n public String getOwner() {\r\n return owner;\r\n }", "public String owner() {\n return this.owner;\n }", "public OwnerReference getOwnerReference() {\n return new OwnerReferenceBuilder()\n .withController(true)\n .withApiVersion(getApiVersion())\n .withKind(getKind())\n .withName(getMetaName())\n .withUid(getMetadata().getUid())\n .build();\n }", "private int getOwnerId(String email) {\n\t\tint ownerId=-1;\n\t\tResultSet rs=null;\n\t\tString query1=\"select ownerId from ApartmentOwner where oEmail=?\";\n\t\tPreparedStatement pstmt;\n\t\ttry {\n\t\t\tpstmt = dataSource.getConnection().prepareStatement(query1);\n\t\t\tpstmt.setString(1, email);\n\t\t\trs = pstmt.executeQuery();\n\t\t\trs.next();\n\t\t\townerId=rs.getInt(1);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn ownerId;\n\t}", "public Owner getOwnerInformation(int id){\n\t\tOwner owner = entityManager.find(Owner.class, id); //find Owner by primary key(int id)\n\t\treturn owner;\n\t}", "@Column(name=\"owner\")\n\tpublic String getOwner() {\n\t\treturn owner;\n\t}", "public Integer getVehicleOwnerId() {\n return vehicleOwnerId;\n }", "public String getProductOwner();", "@Override\r\n\tpublic Principal getOwner() {\n\t\treturn null;\r\n\t}", "public void setOwnerId(String ownerId) {\n this.ownerId = ownerId;\n }", "Optional<String> getOwner();", "public com.sforce.soap.enterprise.sobject.SObject getOwner() {\r\n return owner;\r\n }", "public String getOwnerString() {\n return String.valueOf(enteredBy);\n }", "public T getOwner() {\n return owner;\n }", "public String getownerName() {\n\t return this.ownerName;\n\t}", "public String getOwnerHref() {\n return ownerHref;\n }", "com.google.protobuf.ByteString getOwner();", "com.google.protobuf.ByteString getOwner();", "public String getProjectOwnerId() {\n\t\treturn projectOwnerId;\n\t}", "public Integer retrieveResourceIDByUserName(String username);", "public String getOwnerName() {\n\n return ownerName;\n }", "public String getOwnerName() {\r\n\t\treturn ownerName;\r\n\t}", "public Integer getSecondaryOwnerId() {\n return secondaryOwnerId;\n }", "public com.hps.july.persistence.OrganizationAccessBean getOwner() {\n\treturn owner;\n}", "public Player getOwner() {\n\t\tif (owner == null && possibleOwners.size() == 1)\n\t\t\towner = possibleOwners.get(0);\n\t\t\n\t\treturn owner;\n\t}", "public String getAccountOwner() {\n return accountOwner;\n }", "public int getDoc_User_ID() {\n return getCreatedBy();\n }", "public Future<Map<String, UUID>> getOwnerId(Map<String, List<String>> request) {\n Promise<Map<String, UUID>> p = Promise.promise();\n\n Future<Map<String, UUID>> resGrp;\n Future<Map<String, UUID>> resItem;\n /* if(request.containsKey(RES_SERVER))\n {\n List<String> resSerIds = request.get(RES_SERVER);\n Future<Map<String,UUID>> resSer = getResGrpOwners(resSerIds);\n } else {*/\n if (request.containsKey(RES_GRP)) {\n\n List<String> resGrpIds = request.get(RES_GRP);\n resGrp = getResGrpOwners(resGrpIds);\n } else resGrp = Future.succeededFuture(new HashMap<>());\n\n if (request.containsKey(RES)) {\n List<String> resIds = request.get(RES);\n resItem = getResOwners(resIds);\n } else resItem = Future.succeededFuture(new HashMap<>());\n\n CompositeFuture.all(resGrp, resItem)\n .onSuccess(\n obj -> {\n Map<String, UUID> resp = new HashMap<>();\n if (!resGrp.result().isEmpty()) resp.putAll(resGrp.result());\n\n if (!resItem.result().isEmpty()) resp.putAll(resItem.result());\n\n p.complete(resp);\n })\n .onFailure(fail -> p.fail(INTERNALERROR));\n // }\n return p.future();\n }", "Owner selectByPrimaryKey(String id);", "public String ownerName() {\n\t\t\treturn null;\n\t\t}", "String galleryItemIdentity();", "public String getOwner() {\n return lockOwner;\n }", "String getLockOwner();", "public String getOwnerName() {\n\t\treturn ownerName;\n\t}", "Participant getOwner();", "public UserModel getOwner() {\n return localOwner;\n }", "com.google.protobuf.ByteString\n getOwnerBytes();", "@Test\n public void ownerArgumentAddedForRestrictedReadWithOidc() throws AmplifyException {\n final AuthorizationType mode = AuthorizationType.OPENID_CONNECT;\n final String expectedOwner = FakeOidcAuthProvider.SUB;\n\n // OwnerOidc class has restriction on every operation including READ\n for (SubscriptionType subscriptionType : SubscriptionType.values()) {\n GraphQLRequest<OwnerOidc> originalRequest = createRequest(OwnerOidc.class, subscriptionType);\n GraphQLRequest<OwnerOidc> modifiedRequest = decorator.decorate(originalRequest, mode);\n assertEquals(expectedOwner, getOwnerField(modifiedRequest));\n }\n }", "com.google.protobuf.ByteString\n getOwnerBytes();", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();" ]
[ "0.7313634", "0.6985652", "0.69363034", "0.6903274", "0.68300337", "0.67219865", "0.6698851", "0.66915375", "0.6690175", "0.6690175", "0.666285", "0.6662611", "0.665658", "0.6571009", "0.6490414", "0.64867866", "0.6440448", "0.6440448", "0.63549805", "0.63549805", "0.634824", "0.6347163", "0.6340177", "0.6328286", "0.6288765", "0.62306637", "0.61673915", "0.60543954", "0.603556", "0.60213286", "0.6014041", "0.6014041", "0.6014041", "0.6014041", "0.6014041", "0.6014041", "0.60011595", "0.59825546", "0.596268", "0.5960943", "0.59598273", "0.595827", "0.5957558", "0.5955041", "0.59528303", "0.5937977", "0.5917696", "0.58975726", "0.58908165", "0.58869714", "0.58731395", "0.5865893", "0.5862351", "0.58575386", "0.58245933", "0.5812007", "0.580484", "0.57936555", "0.5786669", "0.5783941", "0.57363874", "0.5720178", "0.5717465", "0.57103705", "0.56788814", "0.56690943", "0.5654993", "0.56526464", "0.5649202", "0.56360215", "0.5636018", "0.5634782", "0.56345236", "0.5630482", "0.56207997", "0.5616839", "0.5616839", "0.5611976", "0.56010514", "0.55868065", "0.557751", "0.5576349", "0.5570006", "0.5569378", "0.5561181", "0.5560255", "0.55479926", "0.5547098", "0.5543422", "0.55412126", "0.5540049", "0.5522386", "0.55208415", "0.5500584", "0.5473347", "0.5464009", "0.5462981", "0.5462415", "0.54563075", "0.54563075", "0.54563075" ]
0.0
-1
checks if there is a policy for user by auth admin
public Future<Boolean> checkAuthPolicy(String userId) { Promise<Boolean> p = Promise.promise(); pool.withConnection( conn -> conn.preparedQuery(CHECK_AUTH_POLICY) .execute(Tuple.of(userId, authUrl, status.ACTIVE)) .onFailure( obj -> { LOGGER.error("checkAuthPolicy db fail :: " + obj.getLocalizedMessage()); p.fail(INTERNALERROR); }) .onSuccess( obj -> { if (obj.rowCount() > 0) p.complete(true); else p.fail(NO_AUTH_POLICY); })); return p.future(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean checkPolicy(User user);", "boolean existsAdminPreference(AuthenticationToken admin);", "boolean isAdmin();", "public boolean isAdmin();", "private void checkUser() {\n\t\tlog.info(\"___________checkUser\");\n\t\tList<User> adminUser = userRepository.getByAuthority(AuthorityType.ROLE_ADMIN.toString());\n\t\tif (adminUser == null || adminUser.isEmpty()) {\n\t\t\tgenerateDefaultAdmin();\n\t\t}\n\t}", "public boolean checkAdmin()\r\n\t{\r\n\t\tboolean admin=false;\r\n\t\tint length=user_records.size();\r\n\t\tfor(int i=0;i<length;i++)\r\n\t\t{\r\n\t\t\tif(((User)user_records.get(i)).get_username().equals(\"administrator\"))\r\n\t\t\t{\r\n\t\t\t\tadmin=true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn admin;\r\n\t}", "public boolean isCurrentUserAdmin(){\n if (getAdminUserFromId(currentUserId)!=null){\n return true;\n }\n else{\n return false;\n }\n }", "private boolean isAdmin() {\n\t\tString name = (String) session.getAttribute(\"name\");\n\t\tif (name.equals(ADMIN)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public Boolean isAuthorized(String userId);", "private void checkAdminOrModerator(HttpServletRequest request, String uri)\n throws ForbiddenAccessException, ResourceNotFoundException {\n if (isAdministrator(request)) {\n return;\n }\n\n ModeratedItem moderatedItem = getModeratedItem(uri);\n if (moderatedItem == null) {\n throw new ResourceNotFoundException(uri);\n }\n\n String loggedInUser = getLoggedInUserEmail(request);\n if (moderatedItem.isModerator(loggedInUser)) {\n return;\n }\n\n throw new ForbiddenAccessException(loggedInUser);\n }", "public boolean hasAdminAccess(User user){\n return (user.hasOneOf(RoleValue.COMPANY_ADMIN, RoleValue.APP_ADMIN) && hasAccess(user));\n }", "void checkAdmin() throws HsqlException {\n Trace.check(isAdmin(), Trace.ACCESS_IS_DENIED);\n }", "boolean isAdmin() {\n\n if (isAdminDirect()) {\n return true;\n }\n\n RoleManager rm = getRoleManager();\n Iterator it = getAllRoles().iterator();\n\n while (it.hasNext()) {\n try {\n if (((Grantee) rm.getGrantee(\n (String) it.next())).isAdminDirect()) {\n return true;\n }\n } catch (HsqlException he) {\n throw Trace.runtimeError(Trace.RETRIEVE_NEST_ROLE_FAIL,\n he.getMessage());\n }\n }\n\n return false;\n }", "public boolean isAdmin(String accessToken, String appName) {\n if (accessToken == null) {\n return false;\n }\n AuthAccessInfo access = accessTokens.get(accessToken);\n if (access != null) {\n return !access.getReadonly() && appName.equals(access.getAppName());\n }\n return false;\n }", "public boolean isUserAdmin(int userId){\n if (getAdminUserFromId(userId)!=null){\n return true;\n }\n else{\n return false;\n }\n }", "private void checkUserAuthorities() {\n\t\tAuthority auth = authorityRepository.findTop1ByName(AuthorityType.ROLE_ADMIN);\n\t\tif (null == auth) {\n\t\t\tauth = Authority.createAdmin();\n\t\t\tauthorityRepository.save(auth);\n\t\t}\n\t\tAuthority authUser = authorityRepository.findTop1ByName(AuthorityType.ROLE_USER);\n\t\tif (null == authUser) {\n\t\t\tauthUser = Authority.createUser();\n\t\t\tauthorityRepository.save(authUser);\n\t\t}\n\t}", "private boolean isAuthorized() {\n return true;\n }", "boolean hasCustomerUserAccess();", "private boolean isUserAnAdmin(String login) {\n EUser user = null;\n try {\n user = eUserController.findUserByLogin(login);\n if (user.getStatus().equals(EUser.statusAdmin)) {\n return true;\n } else {\n return false;\n }\n } catch (Exception ex) {\n return false;\n //throw new AuthenticationException(\"Incorrect login.\");\n }\n }", "public boolean isAdmin()\n {\n return admin;\n }", "public boolean isAdmin()\n {\n return admin;\n }", "@GetMapping(\"/users/is-admin\")\n @ResponseStatus(HttpStatus.OK)\n public boolean isAdmin(@AuthenticationPrincipal User user) {\n return userService.isAdmin(user);\n }", "@Override\r\n\tpublic boolean checkAdmin(String email) {\n\t\treturn adminDAO.checkAdmin(email);\r\n\t}", "boolean getIsAuthorized();", "private void checkAdminInDB(DB db) {\n\t\tMap<Long, UtenteBase> users = db.getTreeMap(\"users\");\n\t\tlong hashCode = (long) \"admin\".hashCode();\n\t\tif(!users.containsKey(hashCode))\n\t\t\tusers.put(hashCode, new Admin(\"admin\", \"admin\"));\n\t}", "@Override\n\tpublic boolean verifyIfAdmin(String eventToken) throws Exception {\n\t\tString userId = flockService.getUserIdFromEventToken(eventToken);\n\t\tif(flockService.verifyToken(eventToken, userId)){\n\t\t\tList<Employee> employees = employeeRepository.findByUserId(userId);\n\t\t\tif(employees.isEmpty()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tEmployee employee = employees.get(0);\n\t\t\tif(employee.getRole().equals(\"user\")){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public boolean hasAccess(User user) {\n return user.hasRole(RoleValue.APP_ADMIN) || this.equals(user.company);\n }", "public boolean isAdmin() {\r\n return admin;\r\n }", "boolean hasUserManaged();", "public boolean isAdmin() {\n return admin;\n }", "boolean policyDetailExist(PolicyDetail policyDetail);", "public boolean isGroupAdmin(int userId){\n return userId == groupAdmin;\n }", "public int checkPolicy(String sub, String obj, int operation) {\n try {\n if(mService == null) {\n this.mService = ICAGADroidSecurityManagerInterface.Stub.asInterface(ServiceManager.getService(REMOTE_SERVICE_NAME));\n }\n if (mService != null) {\n return mService.checkPolicy(sub, obj, operation);\n }\n } catch (RemoteException ex) {\n Log.e(TAG, \"Unable to connect the remote CAGADroidSecurityManager\");\n }\n\n // CAGADroid operates in targeted (default to allow) mode\n return CAGADroidConstants.ACTION_ALLOW;\n }", "public boolean isAdmin() {\r\n admin = userBean.isAdmin(email);\r\n return admin;\r\n }", "boolean isAdminDirect() {\n return isAdministrator;\n }", "public boolean getAdminPermission(boolean isAdmin)\n {\n return isAdmin;\n }", "@Override\n\tpublic Map<String, Object> isAdminList(Map<String, Object> map) {\n\t\treturn approvalDao.isAdminList(map);\n\t}", "public boolean isIsAdmin() {\r\n return isAdmin;\r\n }", "public Boolean hasLogAccess(XPath xpath, Document doc) throws XPathExpressionException\r\n\t{\n\t\tif(auth.allows(\"admin\")) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\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 makeAdmin(User user);", "public void isAllowed(String user) {\n \r\n }", "@GET\n @Path(\"/admin\")\n public String isAdmin() {\n return ResponseUtil.SendSuccess(response, \"\\\"isAdmin\\\":\\\"\" + SessionUtil.isAdmin(request) + \"\\\"\");\n }", "public synchronized boolean hasAdminPrivilege(UserEntity userEntity) {\n PrincipalEntity principalEntity = userEntity.getPrincipal();\n if (principalEntity != null) {\n Set<PrivilegeEntity> roles = principalEntity.getPrivileges();\n if (roles != null) {\n PermissionEntity adminPermission = permissionDAO.findAmbariAdminPermission();\n Integer adminPermissionId = (adminPermission == null) ? null : adminPermission.getId();\n\n if (adminPermissionId != null) {\n for (PrivilegeEntity privilegeEntity : roles) {\n PermissionEntity rolePermission = privilegeEntity.getPermission();\n if ((rolePermission != null) && (adminPermissionId.equals(rolePermission.getId()))) {\n return true;\n }\n }\n }\n }\n }\n\n return false;\n }", "boolean isHasPermissions();", "private boolean isUserExplicitlyLoggedIn() {\n // User is explicitly logged in, if his securityStatus is more than or equal to security status login.\n String securityStatusPropertyName = getStorePropertyManager().getSecurityStatusPropertyName();\n int securityStatus = ((Integer) getProfile().getPropertyValue(securityStatusPropertyName)).intValue();\n return securityStatus >= getStorePropertyManager().getSecurityStatusLogin();\n }", "@Override\n\tpublic boolean checkAuthorization(HttpServletRequest request) {\n\t\treturn true;\n\t}", "public boolean isAdministrator() {\r\n return doesUserHaveRole(UserRole.ADMINISTRATOR);\r\n }", "boolean hasPrincipal();", "@Override\n public boolean isAdmin(String username) {\n return isMember(GROUPING_ADMINS, username);\n }", "private void checkRights() {\n image.setEnabled(true);\n String user = fc.window.getUserName();\n \n for(IDataObject object : objects){\n ArrayList<IRights> rights = object.getRights();\n \n if(rights != null){\n boolean everybodyperm = false;\n \n for(IRights right : rights){\n String name = right.getName();\n \n //user found, therefore no other check necessary.\n if(name.equals(user)){\n if(!right.getOwner()){\n image.setEnabled(false);\n }else{\n image.setEnabled(true);\n }\n return;\n //if no user found, use everybody\n }else if(name.equals(BUNDLE.getString(\"Everybody\"))){\n everybodyperm = right.getOwner();\n }\n }\n image.setEnabled(everybodyperm);\n if(!everybodyperm){\n return;\n }\n }\n }\n }", "static boolean EsAdmin(String username){\n StringTokenizer stk = new StringTokenizer(username,\"_\");\n while (stk.hasMoreTokens()){\n String token = stk.nextToken();\n if (token.equals(\"admin\")){\n return true;\n }\n }\n return false;\n }", "public boolean adminContent(User user, Object obj) {\n if (hasGrant(user,\n toGrant(getRelevantURIForSecurity(obj, false, false, false), GrantType.ADMIN_CONTENT))) {\n return true;\n }\n return false;\n }", "public void checkAuthority() {\n }", "@Override\n\tpublic boolean isAdmin() {\n\t\treturn isOnline() && bukkitPlayer.hasPermission(Permission.ADMIN_NODE);\n\t}", "@Override\r\n\tpublic boolean getUpdaAdmin(Admins ad) {\n\t\treturn adi.updaAdmin(ad);\r\n\t}", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "public boolean checkAccess(HasUuid object) {\n // Allow newly-instantiated objects\n if (!wasResolved(object)) {\n return true;\n }\n // Allow anything when there are no roles in use\n if (getRoles().isEmpty()) {\n return true;\n }\n Principal principal = getPrincipal();\n // Check for superusers\n if (!principalMapper.isAccessEnforced(principal, object)) {\n return true;\n }\n\n List<PropertyPath> paths = typeContext.getPrincipalPaths(object.getClass());\n PropertyPathChecker checker = checkers.get();\n for (PropertyPath path : paths) {\n path.evaluate(object, checker);\n if (checker.getResult()) {\n return true;\n }\n }\n addWarning(object, \"User %s does not have permission to edit this %s\", principal,\n typeContext.getPayloadName(object.getClass()));\n return false;\n }", "public boolean isConnectedAsAdmin (HttpServletRequest request) {\n return isConnected(request) && getConsumer(request).getRole().equals(Role.ADMIN);\n }", "boolean hasAuth();", "@Override\n public boolean hasAccessPermission(String user, NamespaceKey key, DatasetConfig datasetConfig) {\n return userPredicate.test(user);\n }", "public boolean isAdmin(@NotNull Session session) {\n // ToDo\n return session.getUsername() != null && session.getUsername().equals(\"admin\");\n }", "@WebMethod public boolean isAdmin(String user);", "private void checkIfAddUserDisallowedByAdminOnly(UserRecord userRecord) {\n RestrictedLockUtils.EnforcedAdmin checkIfRestrictionEnforced = RestrictedLockUtilsInternal.checkIfRestrictionEnforced(this.mContext, \"no_add_user\", ActivityManager.getCurrentUser());\n if (checkIfRestrictionEnforced == null || RestrictedLockUtilsInternal.hasBaseUserRestriction(this.mContext, \"no_add_user\", ActivityManager.getCurrentUser())) {\n userRecord.isDisabledByAdmin = false;\n userRecord.enforcedAdmin = null;\n return;\n }\n userRecord.isDisabledByAdmin = true;\n userRecord.enforcedAdmin = checkIfRestrictionEnforced;\n }", "private boolean checkAppInstanceOwnership(){\n\n\t\ttry {\n\t\t\t\n\t\t\t\n\t \tif(getUser() != null){\n\t \t\t\n\t \t\tif(getUser().getRole().equalsIgnoreCase(UserRoles.admin.toString()))\n\t \t\t\treturn true;\n\t \t\telse{\n\t \t\t\t\n\t\t\t\t\tAppInstance app = AHEEngine.getAppInstanceEntity(Long.valueOf(appinst));\n\t \t\t\t\t\t\t\t\t\n\t \t\t\tif(app != null){\n\t \t\t\t\t\n\t \t\t\t\tif(app.getOwner().getId() == getUser().getId())\n\t \t\t\t\t\treturn true;\n\t \t\t\t\telse{\n\t \t\t\t\t\tsetStatus(Status.CLIENT_ERROR_FORBIDDEN);\n\t \t\t\t\t\treturn false;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\t\t\n\t \t\t\t\n\t \t\t}\n\t \t\t\n\t \t}\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (AHEException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tsetStatus(Status.CLIENT_ERROR_FORBIDDEN);\n \treturn false;\n }", "public boolean getIsAdmin() {\n return isAdmin;\n }", "boolean hasPublicProfile();", "boolean hasQueryAuthorizations();", "private boolean validateUser(HttpServletResponse resp, HttpServletRequest req, String username) throws IOException {\n\n SessionHandler session = (SessionHandler) req.getSession().getAttribute(\"authorized\");\n\n String sessionUsername = session.getUsername();\n\n if((!sessionUsername.equalsIgnoreCase(\"admin\")\n && !username.equalsIgnoreCase(sessionUsername))\n || !session.isAuthorized()\n ){\n page.redirectTo(\"/account\", resp, req,\n \"errorMessage\", \"Action not permitted!\");\n return false;\n }\n return true;\n }", "public boolean isAuthorized(){\n\t\treturn authorized;\n\t}", "public static void ShowAdminPreferences() {\n if (Controller.permission.GetUserPermission(\"EditUser\")) {\n ToggleVisibility(UsersPage.adminWindow);\n } else {\n DialogWindow.NoAccessTo(\"Admin options\");\n }\n }", "boolean hasRole();", "void ensureAdminAccess() {\n Account currentAccount = SecurityContextHolder.getContext().getAccount();\n if (!currentAccount.isAdmin()) {\n throw new IllegalStateException(\"Permission denied.\");\n }\n }", "AccessPoliciesStatus getAccessPoliciesStatus();", "private boolean isLoggedInUser(){\n return true;\n }", "@Override\n protected boolean isAuthorized(PipelineData pipelineData) throws Exception\n {\n \t// use data.getACL() \n \treturn true;\n }", "public synchronized boolean isAdmin(String email) {\r\n return (email != null) &&\r\n email2user.containsKey(email) && \r\n email.equals(server.getServerProperties().get(ADMIN_EMAIL_KEY));\r\n }", "@XmlTransient\n\tpublic boolean isCanActivateUser() {\n\t\treturn (isSecurityAdministrator() && isSelfRegistrationEnabled());\n\t}", "boolean hasObjUser();", "@PreAuthorize(\"checkPermission('Legal Entity', 'Manage Legal Entities', {'view','create'})\")\n @GetMapping(\n produces = {\"application/json\"})\n @ResponseStatus(HttpStatus.OK)\n public void sampleEndpointThatRequiresUserToHavePermissionsToViewCreateLegalEnitites() {\n LOGGER.info(\"Preauthorize annotation have checked that user has permissions to view/create legal entities\");\n // continue custom implementation ...\n }", "public boolean onSecurityCheck() {\n boolean continueProcessing = super.onSecurityCheck();\n if (!continueProcessing) {\n return false;\n }\n AuthorizationManager authzMan = getAuthorizationManager();\n try {\n if (!authzMan.canManageApplication(user)) {\n setRedirect(\"authorization-denied.htm\");\n return false;\n }\n return true;\n } catch (AuthorizationSystemException ex) {\n throw new RuntimeException(ex);\n }\n }", "public static String getAdminIdIfLoggedIn(final Http.Context ctx){\n AuthUser u = PlayAuthenticate.getUser(ctx.session());\n if (u == null) return null;\n if (ADMIN_ID.equals(u.getId())) {\n System.out.println(\"SECURED ADMIN nech sa paci\");\n User user = User.find.ref(u.getId());\n if (new Date().getTime() - user.lastUpdate > 1_700_000){\n System.out.println(\"--------------------update access token from SecuredAdmin\");\n try {\n user.updateAccessToken();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n ctx.session().put(\"accessToken\", user.accessToken);\n }else{\n System.out.println(\"Secured Admin A sakra POST sa nerobil ubehlo zatial: \" + (new Date().getTime() - user.lastUpdate));\n }\n return u.getId();\n }\n System.out.println(\"SECURED ADMIN vracia NULL pristup odoporeny\");\n return null;\n }", "private void checkAuthorization(RoutingContext context, List<CaptureMap> resolvedCaptureCollections,\n Handler<AsyncResult<Boolean>> handler) {\n AuthHandler auth = context.get(AuthenticationController.AUTH_HANDLER_PROP);\n if (auth != null && auth instanceof RedirectAuthHandlerBt) {\n MemberUtil.getCurrentUser(context, getNetRelay(), result -> {\n if (result.failed()) {\n handler.handle(Future.failedFuture(result.cause()));\n } else {\n IAuthenticatable member = result.result();\n if (member == null) {\n // this is an error\n handler.handle(Future.failedFuture(\n new IllegalArgumentException(\"This should not happen, we need an instance of IAuthenticatable here\")));\n } else {\n checkAuthorization(resolvedCaptureCollections, auth, member, handler);\n }\n }\n });\n } else {\n handler.handle(Future.succeededFuture(true));\n }\n }", "public boolean isAdminExists(String pIdentifiant, String pMotDePasse);", "@PreAuthorize(\"hasAuthority('ROLE_ADMIN')\")\n @RequestMapping\n public String admin() {\n return \"admin\";\n }", "private boolean hasPermission(String username, SOAPMessage msg) {\r\n\t\ttry {\r\n\t\t\tNodeList email = msg.getSOAPBody().getElementsByTagName(SOAP_EMAIL_TAG);\r\n\r\n\t\t\t// if request has email\r\n\t\t\tif(email.getLength() > 0) {\r\n\t\t\t\treturn username.equals(msg.getSOAPBody().getElementsByTagName(SOAP_EMAIL_TAG).item(0).getTextContent());\r\n\t\t\t}\r\n\t\t\t// if there's no email field, every user has permissions to access\r\n\t\t\treturn true;\r\n\t\t\t\r\n\t\t} catch (SOAPException e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@Override\n public boolean hasPermission(Permission permission) {\n // FacesContext context = FacesContext.getCurrentInstance();\n String imp = (String)ADFContext.getCurrent().getSessionScope().get(\"isImpersonationOn\");\n// String imp = (String)context.getExternalContext().getSessionMap().get(\"isImpersonationOn\");\n if(imp == null || !imp.equals(\"Y\")){\n return super.hasPermission(permission);\n }\n else{\n return true;\n \n }\n \n }", "private static Boolean isAuthorised(Page page, List<GrantedAuthority> userAuthorities ) {\n if ( page.getAllowedRoles().size() == 0 ) {\n return true;\n }\n \n for ( GrantedAuthority role : userAuthorities ) {\n for ( String requiredRole : page.getAllowedRoles() ) {\n if ( role.getAuthority().equals(requiredRole) ) {\n return true;\n }\n }\n }\n return false;\n }", "public boolean publicAdmin() {\n try {\n return getConfig().getPublicAdmin();\n } catch (Throwable t) {\n t.printStackTrace();\n return false;\n }\n }", "public boolean checkShowSubmitPolicy(Integer ctId,Integer snId){\n\n //check if participator first\n String handle = (String)httpSession.getAttribute(Constants.CURRENT_LOGIN_USER_HANDLE);\n boolean flag = false;\n List<AuthorityDTO> lstAuthority = authorityMapper.getContestAuthority(ctId, handle);\n for (AuthorityDTO curAuth : lstAuthority) {\n if (curAuth.getId().equals(Constants.AUTH_VIEW_CONTEST_ID)) {\n return true;\n }\n if (curAuth.getId().equals(Constants.AUTH_PARTICIPATE_CONTEST_ID)) {\n flag = true;\n }\n }\n if (!flag){\n return false;\n }\n\n //then check policy\n ContestEntity contestEntity = getContestById(ctId);\n if (contestEntity.getShowSubmit().equals(Constants.SHOW_SUBMIT_ALL)){\n return true;\n }\n\n SubmissionEntity submissionEntity = new SubmissionEntity();\n submissionEntity.setId(snId);\n List<SubmissionEntity> lstSubmission = submissionMapper.selectWithExample(submissionEntity);\n if (lstSubmission.size() != 1){\n throw new NoSuchPageException(\"Submission not found!\");\n }\n\n //check if submission is from current user\n submissionEntity = lstSubmission.get(0);\n Integer currentUserId = (Integer)httpSession.getAttribute(Constants.CURRENT_LOGIN_USER_ID);\n if (submissionEntity.getUrId().equals(currentUserId)){\n return true;\n }\n\n //else check current user has solved this problem and this contests allow to view solved problem's solutions\n if (contestEntity.getShowSubmit().equals(Constants.SHOW_SUBMIT_SOLVED)){\n Integer solveCnt = submissionMapper.checkSolvedStatusInContest(ctId,submissionEntity.getPmId(),submissionEntity.getUrId());\n return solveCnt > 0;\n }\n return false;\n }", "public boolean isUserApproval() {\n\n if (!ACTION_UserChoice.equals(getAction())) {\n return false;\n }\n\n return (getColumn() != null) && \"IsApproved\".equals(getColumn().getColumnName());\n\n }", "public boolean isInAdminRole(SecurityContextHolderAwareRequestWrapper securityWrapper) {\n return securityWrapper.isUserInRole(Role.ADMIN.name());\n }", "@Override\n protected String requiredPostPermission() {\n return \"admin\";\n }", "public Boolean allowAccess (String token) {\n if (this.userRepository.findByToken(token) == null) {\n return false;\n }\n return true;\n }" ]
[ "0.7437705", "0.69913816", "0.6747886", "0.65739965", "0.6521026", "0.64734995", "0.6356319", "0.6249673", "0.6225645", "0.6168201", "0.609397", "0.60524994", "0.60319257", "0.60271364", "0.60247207", "0.60136896", "0.6007075", "0.5997521", "0.5994012", "0.5992291", "0.5992291", "0.591796", "0.5902071", "0.5900218", "0.5869837", "0.58642936", "0.58557236", "0.58446515", "0.5837254", "0.5832474", "0.5819932", "0.5806591", "0.57625806", "0.5760833", "0.57217", "0.56748545", "0.5668604", "0.5654271", "0.56494004", "0.56478953", "0.56444246", "0.5641569", "0.5627942", "0.5609508", "0.55946356", "0.55899936", "0.5587359", "0.55860215", "0.5585589", "0.5553962", "0.55507296", "0.55239224", "0.55147773", "0.5510216", "0.5509148", "0.5496583", "0.54827595", "0.54827595", "0.54827595", "0.54827595", "0.54827595", "0.54827595", "0.54827595", "0.5461672", "0.54608864", "0.5460145", "0.5459454", "0.5458058", "0.54560643", "0.54553676", "0.5449981", "0.5446341", "0.5445813", "0.5437856", "0.5437277", "0.5436384", "0.54316825", "0.5422943", "0.541737", "0.5412663", "0.54099625", "0.5402774", "0.5397707", "0.53931123", "0.5392643", "0.53922623", "0.53893346", "0.538225", "0.5377924", "0.53708017", "0.53473884", "0.5346836", "0.53468025", "0.53417987", "0.53152233", "0.5314803", "0.53139937", "0.53057325", "0.5297633", "0.5293466" ]
0.5962609
21
Paint the marker on given gc and axes.
public void paint(final GC gc, final SWTMediaPool media, final Rectangle bounds, final AxisPart<XTYPE> xaxis) { int x = xaxis.getScreenCoord(getPosition()); if (x >= bounds.x && x <= bounds.x + bounds.width) { gc.setForeground(media.get(getColor())); gc.setLineWidth(getLineWidth()); gc.drawLine(x, bounds.y, x, bounds.y + bounds.height); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void drawMarker(PGraphics pg, float x, float y)\n {\n pg.noFill();\n pg.rectMode(CENTER);\n pg.rect(x,y,this.radius*2,this.radius*2,10);\n }", "public void drawMark(int x, int y, Color color)\n {\n \tg.setColor(color);\n g.fillRect(x * xScale, y * yScale, xScale-1, yScale-1);\n }", "public void drawMark(int x, int y, Color color)\n {\n g.setColor(color);\n g.fillRect(x * xScale, y * yScale, xScale-1, yScale-1);\n }", "@Override\r\n\tpublic void drawMarker(PGraphics pg, float x, float y) {\r\n\t\t// save previous styling\r\n\t\tpg.pushStyle();\r\n\t\t\t\r\n\t\t// determine color of marker from depth\r\n\t\tcolorDetermine(pg);\r\n\t\t\r\n\t\t// call abstract method implemented in child class to draw marker shape\r\n\t\tdrawEarthquake(pg, x, y);\r\n\t\t\r\n\t\t// Adds X over marker if within past day\t\t\r\n\t\tString age = getStringProperty(\"age\");\r\n\t\tif (\"Past Hour\".equals(age) || \"Past Day\".equals(age)) {\r\n\t\t\t\r\n\t\t\tpg.strokeWeight(2);\r\n\t\t\tint buffer = 2;\r\n\t\t\tpg.line(x-(radius+buffer), \r\n\t\t\t\t\ty-(radius+buffer), \r\n\t\t\t\t\tx+radius+buffer, \r\n\t\t\t\t\ty+radius+buffer);\r\n\t\t\tpg.line(x-(radius+buffer), \r\n\t\t\t\t\ty+(radius+buffer), \r\n\t\t\t\t\tx+radius+buffer, \r\n\t\t\t\t\ty-(radius+buffer));\r\n\t\t}\r\n\t\t\r\n\t\t// reset to previous styling\r\n\t\tpg.popStyle();\r\n\t\t\r\n\t}", "public void drawMark (Graphics g) {\r\n\r\n\t\tGraphics2D graph = (Graphics2D) g;\r\n\r\n\t\tgraph.setColor(color);\r\n\t\t\r\n\t\t//For each sector draw the same mark\r\n\t\tfor (int i = 0; i < dolly.getNumberOfSectors(); i++) {\r\n\t\t\t\r\n\t\t\tgraph.setStroke(new BasicStroke(penSize));\r\n\t\t\tIterator<Point> iter = listOfPoints.iterator();\r\n\t\t\tPoint firstPoint = null; \r\n\t\t\tPoint secondPoint = null;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (listOfPoints.size() == 1) {\r\n\t\t\t\t\r\n\t\t\t\tfirstPoint = listOfPoints.get(0);\r\n\t\t\t\tgraph.drawRect((int) firstPoint.getX(), (int) firstPoint.getY(), dolly.getPenSize(), dolly.getPenSize());\r\n\t\t\t\t\r\n\t\t\t\tif (reflected) { \r\n\t\t\t\t\t\r\n\t\t\t\t\tgraph.drawRect(-(int) firstPoint.getX(), (int) firstPoint.getY(), dolly.getPenSize(), dolly.getPenSize());\r\n\t\t\t\t}\r\n\t\t\t\tgraph.rotate(Math.toRadians(dolly.getAngle()));\r\n\t\t\t\t\r\n\t\t\t} else if (listOfPoints.size() > 1) { \r\n\t\t\t\t\r\n\t\t\t\tfirstPoint = iter.next();\r\n\r\n\t\t\t\twhile (iter.hasNext()) {\r\n\t\t\t\t\tsecondPoint = iter.next();\r\n\r\n\t\t\t\t\tgraph.drawLine((int) firstPoint.getX(), (int) firstPoint.getY(), (int) secondPoint.getX(), (int) secondPoint.getY());\r\n\r\n\t\t\t\t\tif (reflected) { \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tgraph.drawLine(-(int) firstPoint.getX(), (int) firstPoint.getY(), -(int) secondPoint.getX(),\r\n\t\t\t\t\t\t\t\t(int) secondPoint.getY());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfirstPoint = secondPoint;\r\n\t\t\t\t}\r\n\t\t\t\tgraph.rotate(Math.toRadians(dolly.getAngle()));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void draw(PGraphics pg, float x, float y) {\n\t\t// save previous styling\n\t\tpg.pushStyle();\n\t\t\t\t\n\t\t// determine color of marker from depth\n\t\tcolorDetermine(pg);\n\t\t\t\n\t\t// call abstract method implemented in child class to draw marker shape\n\t\tdrawEarthquake(pg, x, y);\n\t\t\t\n\t\t//draw X over marker if within past day\n\t\tif(age.contentEquals(\"Past Day\")){\n\t\t\tpg.line(x-10, y-10, x+10, y+10);\n\t\t\tpg.line(x+10, y-10, x-10, y+10);\n\t\t}\n\t\t\t\n\t\t// reset to previous styling\n\t\tpg.popStyle();\n\t}", "public void draw(PApplet marker) {\n\t\tsuper.draw(marker);\n\n\t}", "@Override\n public void draw(GraphicsContext gc) {\n gc.setFill(getFillColor());\n gc.setStroke(getStrokeColor());\n gc.setLineWidth(getStrokeWidth());\n gc.fillRect(getX1(), getY1(), getX2() - getX1(), getX2() - getX1());\n gc.strokeRect(getX1(), getY1(), getX2() - getX1(), getX2() - getX1());\n }", "@Override\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\n\t\tg.setColor(Color.BLACK);\n\n\t\tg.setFont(numFont);\n\n\t\tif (param.showaxis) {\n\t\t\t// pixels\n\t\t\tint actualcenterx = (int) math.Math.scale(0, param.minx, param.maxx, 0, getWidth());\n\t\t\tint actualcentery = (int) math.Math.scale(0, param.miny, param.maxy, getHeight(), 0);\n\n\t\t\tg.drawLine(actualcenterx, 0, actualcenterx, getHeight());\n\t\t\tg.drawLine(0, actualcentery, getWidth(), actualcentery);\n\t\t\tg.drawString(0 + \"\", actualcenterx - xoffset, actualcentery + yoffset);\n\n\t\t\tg.drawString(param.maxx + \"\", getWidth() - xoffset * (param.maxx + \"\").length(), actualcentery + yoffset);\n\t\t\tg.drawString(param.minx + \"\", 0, actualcentery + yoffset);\n\t\t\tg.drawString(param.maxy + \"\", actualcenterx - xoffset * (param.maxy + \"\").length(), yoffset);\n\t\t\tg.drawString(param.miny + \"\", actualcenterx - xoffset * (param.miny + \"\").length(), getHeight() - yoffset);\n\t\t}\n\n\t\tfor (UIPointSet pointSet : pointSets) {\n\n\t\t\tint prevpx = 0, prevpy = 0;\n\t\t\tfor (int i = 0; i < pointSet.getPoints().length; i++) {\n\n\t\t\t\tdouble[] point = pointSet.getPoints()[i];\n\t\t\t\t// pixels\n\t\t\t\tint px = (int) math.Math.scale(point[0], param.minx, param.maxx, 0, getWidth());\n\t\t\t\tint py = (int) math.Math.scale(point[1], param.miny, param.maxy, getHeight(), 0);\n\n\t\t\t\tif (pointSet.getPointColor() != null) {\n\t\t\t\t\tint pointWidth = 10;\n\t\t\t\t\tg.setColor(pointSet.getPointColor());\n\t\t\t\t\tg.fillOval(px - pointWidth / 2, py - pointWidth / 2, pointWidth, pointWidth);\n\t\t\t\t}\n\n\t\t\t\tif (pointSet.getLineColor() != null && i > 0) {// if (Math.abs(y2 - y) < (getHeight())) {\n\t\t\t\t\tg.setColor(pointSet.getLineColor());\n\t\t\t\t\tg.drawLine(prevpx, prevpy, px, py);\n\t\t\t\t\tfor (int ii = 1; ii < 2; ii++) {\n\t\t\t\t\t\tg.drawLine(prevpx, prevpy - ii, px, py - ii);\n\t\t\t\t\t\tg.drawLine(prevpx, prevpy + ii, px, py + ii);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tprevpx = px;\n\t\t\t\tprevpy = py;\n\n\t\t\t}\n\t\t}\n\n\t\tfor (PointBox bx : savedBoxes) {\n\t\t\tbx.updatePixCoordinate();\n\t\t\tg.setColor(bx.pointSet.getPointColor());\n\t\t\tbx.paint(g, clickingmBox && mBox.equals(bx), false);\n\t\t}\n\t\tif (showmBox) {\n\t\t\tint index = savedBoxes.indexOf(mBox);\n\t\t\tg.setColor(mBox.pointSet.getPointColor());\n\t\t\tif (index < 0) {\n\t\t\t\tmBox.paint(g, clickingmBox, false);\n\t\t\t} else {\n\t\t\t\tsavedBoxes.get(index).paint(g, clickingmBox, true);\n\t\t\t}\n\t\t\t// now draw the box (top left)\n\t\t\tint corneroffset = 10;\n\t\t\tString eqS = \"y = \" + mBox.pointSet.getTitle();\n\t\t\tString fnumS = pointSets.indexOf(mBox.pointSet) + \"\";\n\n\t\t\tint boxx = corneroffset + 10;\n\t\t\tint boxy = corneroffset;\n\t\t\tint boxw = eqS.length() * (xoffset - 4) + 8 + corneroffset;\n\t\t\tint boxh = yoffset + corneroffset;\n\n\t\t\tg.clearRect(boxx, boxy, boxw, boxh);\n\n\t\t\tg.drawString(eqS, xoffset + corneroffset, yoffset + corneroffset);\n\n\t\t\tg.setFont(subFont);\n\t\t\tg.drawString(fnumS, xoffset * 2 + corneroffset, (yoffset * 4 / 3) + corneroffset);\n\n\t\t\tg.drawRect(boxx, boxy, boxw, boxh);\n\n\t\t}\n\t}", "public MarkerOverlay drawMarker(Point point, Color outer, Color inner, AlphaMode mode);", "private void drawAxes()\r\n {\r\n Rectangle rectangle = this.getBounds();\r\n rectangle.setBounds(0,0,300,300);\r\n \r\n xOrigin_ = (int)(rectangle.x);\r\n yOrigin_ = (int)(rectangle.y);\r\n \r\n // Draw x axis\r\n graphics_.drawLine(xOrigin_ + OFFSET,\r\n yOrigin_ + OFFSET,\r\n MAX_AXIS_LENGTH + OFFSET,\r\n yOrigin_ + OFFSET);\r\n \r\n // Draw y axis\r\n graphics_.drawLine(xOrigin_ + OFFSET,\r\n yOrigin_ + OFFSET,\r\n xOrigin_ + OFFSET,\r\n MAX_AXIS_LENGTH + OFFSET);\r\n \r\n // Put labels on Axes\r\n graphics_.drawString(xLabel_, \r\n MAX_AXIS_LENGTH, \r\n (yOrigin_+ X_LABEL_OFFSET));\r\n \r\n graphics_.drawString(yLabel_, \r\n (xOrigin_ + X_LABEL_OFFSET), \r\n (MAX_AXIS_LENGTH + Y_LABEL_OFFSET));\r\n \r\n // Write description of plot below graph\r\n graphics_.drawString(\"PLOT OF \" + xLabel_ + \" VS \" + yLabel_, \r\n PLOT_DESCRIP_X,\r\n PLOT_DESCRIP_Y);\r\n \r\n // Draw tick marks on x axis\r\n final int axisMarkerDist = MAX_AXIS_LENGTH/NUM_MARKERS;\r\n \r\n // Temporary variable representing location where tick marks \r\n // should be drawn\r\n int axisTemp;\r\n \r\n for (int i=1; i<=NUM_MARKERS; i++)\r\n {\r\n axisTemp = i*axisMarkerDist;\r\n \r\n // Draw tick mark\r\n graphics_.drawLine(OFFSET + (axisTemp),\r\n OFFSET,\r\n OFFSET + (axisTemp),\r\n OFFSET - 5 );\r\n \r\n // Draw value above tick mark\r\n graphics_.drawString(String.valueOf( (maxX_/NUM_MARKERS)*i ),\r\n (OFFSET + (axisTemp)),\r\n OFFSET - 20);\r\n }\r\n \r\n // Draw tick marks on y axis\r\n for (int i=1; i<=NUM_MARKERS; i++)\r\n {\r\n axisTemp = i*axisMarkerDist;\r\n // Draw tick mark\r\n graphics_.drawLine( OFFSET - 5,\r\n (OFFSET + (axisTemp)),\r\n OFFSET,\r\n (OFFSET + (axisTemp)));\r\n \r\n // Draw value above tick mark\r\n graphics_.drawString(String.valueOf((maxY_/NUM_MARKERS)*i),\r\n xOrigin_ + X_LABEL_OFFSET,\r\n (OFFSET + (axisTemp)));\r\n }\r\n\r\n\r\n }", "@Override\n\tpublic void draw(GraphicsContext gc) {\n\t\tgc.setFill(this.color.getColor());\n\t\tgc.fillRect(MyPoint.point[0], MyPoint.point[1], this.width, this.height);\n\t}", "@Override\n\t\tpublic void paint(Graphics g) {\n\t\t\tg.setColor(Color.white);\n\t g.fillRect(0, 0, 700, 700);\n\t g.setColor(Color.black);\n\t g.drawLine(0, 700, 700, 700); // the graph lines\n\t g.drawLine(0, 0, 0, 700);\n\t g.drawLine(300, 700, 300, 690); // the tick marks\n\t g.drawLine(600, 700, 600, 690);\n\t g.drawLine(0, 400, 10, 400);\n\t g.drawLine(0, 100, 10, 100);\n\t \n\t for (int i=0; i<clusters.size(); i++) { // the points in the cluster\n\t \tcluster cl = clusters.get(i);\n\t \tg.setColor(cl.getColor());\n\t \tfor (int j=0; j<cl.getPoints().size(); j++) {\n\t \t\tpoint p = cl.getPoints().get(j);\n\t\t \tg.fillOval(p.x(), p.y(), 7, 7);\n\t \t}\n\t \t\n\t }\n\t\t}", "public void paintComponent(Graphics g) {\n\n super.paintComponent(g); //Paint background\n Graphics2D g2 = (Graphics2D) g; //Cast Graphics object to Graphics2D\n\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n Dimension d = getSize();\n\n //Defines the corners of the plot area in pixels\n int iMin = (int) (PA_XO * d.width);\n int iMax = (int) ((PA_XO + PA_XS) * d.width);\n int jMin = (int) (PA_YO * d.height);\n int jMax = (int) ((PA_YO + PA_YS) * d.height);\n\n //Define the scaling between the plot area in x-y and the plot area in pixels\n double xScale = (double) (iMax - iMin) / (xMax - xMin);\n double yScale = (double) (jMax - jMin) / (yMax - yMin);\n\n //Draws x-axis and y-axis\n g2.setColor(Color.black); //Sets color of axes to black\n g2.draw(new Rectangle2D.Double(PA_XO * d.width, PA_YO * d.height,\n PA_XS * d.width, PA_YS * d.height));\n\n double ix;\n double iy;\n for (int i = 0; i < nPts; i++) {\n //Draws the points (JPanel y starts at TOP of the panel)\n ix = iMin + ((x[i] - xMin) * xScale);\n iy = jMax - ((y[i] - yMin) * yScale);\n g2.setColor(Color.red); //Sets color of data points to red\n g2.fill(new Ellipse2D.Double(ix - dotSize / 2., iy - dotSize / 2.,\n dotSize, dotSize));\n\n }\n\n // Adds labels of xMin, xMax, yMin, yMax to drawing and positions them on the screen\n // String.valueOf(xMin) turns the number xMin into a String that you can draw.\n g2.setColor(Color.black);\n g2.drawString(\"Input Size (n)\", (float) (PA_XO * d.width + 150),\n (float) ((PA_YO + PA_YS) * d.height + 20));\n g2.drawString(\"Time (ms)\", (float) (PA_XO * d.width - 70),\n (float) ((PA_YO + PA_YS) * d.height - 200));\n g2.drawString(String.valueOf(xMin), (float) (PA_XO * d.width - 10.),\n (float) ((PA_YO + PA_YS) * d.height + 15.));\n g2.drawString(String.valueOf(xMax),\n (float) ((PA_XO + PA_XS) * d.width - 20.),\n (float) ((PA_YO + PA_YS) * d.height + 15.));\n g2.drawString(String.valueOf(yMin), (float) (PA_XO * d.width - 50.),\n (float) ((PA_YO + PA_YS) * d.height + 5.));\n g2.drawString(String.valueOf(yMax), (float) (PA_XO * d.width - 50.),\n (float) (PA_YO * d.height + 5.));\n }", "public void draw(GraphicsContext gc) {\r\n gc.setStroke(Color.BLACK);\r\n gc.setFill(Color.BLUE);\r\n gc.setLineWidth(5.0);\r\n double r = radius / 2;\r\n gc.fillRect(x - r, y - r, radius * 2, radius * 2);\r\n gc.strokeRect(x - r, y - r, radius * 2, radius * 2);\r\n }", "public void draw(Graphics g, int... paneOffsets) { }", "void drawInterior(DrawContext dc, Object shape);", "protected abstract void paintCoordinates(Graphics2D g);", "public void mark_icon(Graphics g, int log_num, int x, int y, int h, float track);", "public void draw(PApplet marker) {\n\t\tif (whiteSquares) {\n\t\t\tmarker.pushStyle();\n\t\t\tmarker.fill(255);\n\t\t\tmarker.rect(760, 460, 30, 30);\n\t\t\tif (!over)\n\t\t\t\tmarker.rect(10, 460, 30, 30);\n\t\t\tmarker.popStyle();\n\t\t}\n\t\t\n\t\t//show images\n\t\tmarker.image(helpIcon, help.x, help.y, help.width, help.height);\n\t\tif (!over)\n\t\t\tmarker.image(backIcon, back.x, back.y, back.width, back.height);\n\t}", "public void paintComponent( Graphics g )\n\t\t{\n\t\t\tsuper.paintComponent( g );\n\t\t\t\n\t\t\tg.drawRect(0, 0, 29, 29); // draw square\n\t\t\tg.drawString( mark, 11, 20); // draw mark\n\t\t}", "public void draw(Graphics g, int scale, int offset) {\n\t\tColor tColor;\n\t\ttColor = g.getColor(); // save exisiting color\n\t\tg.setColor(color);\n Point translated = translateToAWT(point);\n if (fill == ShapeAttribute.SOLID && shape == ShapeAttribute.BOX)\n\t\t g.fillRect( offset + translated.x * scale - radius, \n offset + translated.y * scale - radius, \n scale * 2 * radius, scale * 2 * radius);\n else if (fill == ShapeAttribute.SOLID && shape == ShapeAttribute.OVAL)\n g.fillOval( offset + translated.x * scale - radius, \n offset + translated.y * scale - radius, \n scale * 2 * radius, scale * 2 * radius);\n else if (fill == ShapeAttribute.WIRE && shape == ShapeAttribute.BOX)\n \t\t g.fillRect( offset + translated.x * scale - radius, \n offset + translated.y * scale - radius, \n scale * 2 * radius, scale * 2 * radius); \n else if (fill == ShapeAttribute.WIRE && shape == ShapeAttribute.OVAL)\n g.fillOval( offset + translated.x * scale - radius, \n offset + translated.y * scale - radius, \n scale * 2 * radius, scale * 2 * radius); \n else // shape == dot\n g.drawLine( offset + translated.x * scale, \n offset + translated.y * scale, \n offset + translated.x * scale, \n offset + translated.y * scale);\n\t\tg.setColor(Color.black); // set label color\n if (drawLabel) g.drawString(label, offset + translated.x * scale + radius, \n offset + translated.y * scale - radius);\n g.setColor(tColor); // restore existing color\n\t\t}", "private void drawSegmentMarker(GL2 gl, GLU glu, float fXPosition, float fYPosition) {\n\t\tgl.glColor4fv(RadialHierarchyRenderStyle.LABEL_TEXT_COLOR, 0);\n\t\tgl.glPushMatrix();\n\t\tgl.glTranslatef(fXPosition, fYPosition, 0);\n\t\tGLPrimitives.renderCircle(glu, MARKER_RADIUS, 10);\n\t\tGLPrimitives.renderCircleBorder(gl, glu, MARKER_RADIUS, 10, 2);\n\t\tgl.glPopMatrix();\n\t}", "public void paintIcon(Component c, Graphics g, int x, int y)\n\t{\n\t\tGraphics2D g2 = (Graphics2D) g;\n\t\tshape.draw(g2);\n\t}", "private void drawDataPoint(Graphics g, int radius, int x, int y)\r\n/* 123: */ {\r\n/* 124: 99 */ g.fillOval(x - radius, y - radius, 2 * radius, 2 * radius);\r\n/* 125: */ }", "public void draw(Graphics g, Point cmpPosRelPrnt) {\n\t\tint xLoc = cmpPosRelPrnt.getX() + (int)this.getLocationX() - (this.getSize()/2); //Center.x - width/2 relative to mapView.\n\t\tint yLoc = cmpPosRelPrnt.getY() + (int)this.getLocationY() - (this.getSize()/2); //Center.y - width/2 relative to mapView.\n\t\t\n\t\tint radius = this.getSize()/2;\n\t\t\n\t\tg.setColor(this.getColor());\n\t\tg.fillArc(xLoc, yLoc, 2*radius, 2*radius, 0, 360);\n\t}", "public void drawOnCanvas(Graphics2D g2d, int x, int y){ \n FontMetrics fm = g2d.getFontMetrics(this.axisFont);\n g2d.setColor(Color.BLACK);\n g2d.setFont(axisFont);\n if(this.isAxisVertical==false){\n g2d.drawLine(x, y, x + this.axisLength, y);\n for(int loop = 0; loop < this.axisMarks.size(); loop++){\n double pos = this.getPosition( this.axisMarks.get(loop));\n g2d.drawLine((int) (x+pos), y-this.axisTickMarkLength, (int) (x+pos), y);\n int fw = fm.stringWidth(this.axisMarksString.get(loop));\n int fh = fm.getHeight();\n g2d.drawString(this.axisMarksString.get(loop), (int) (x+pos-fw*0.5), y + (int) (fh )); \n //System.out.println(\"drawing tick mark on \" + (int) pos);\n }\n int titleOffset = fm.getHeight();\n Rectangle2D rect = this.axisTitle.getBounds(g2d);\n //this.axisTitle.setFontSize(24);\n g2d.drawString(this.axisTitle.getText().getIterator(), \n (int) (x + this.axisLength*0.5 - rect.getWidth()*0.5),\n y + titleOffset + fm.getHeight());\n } else{\n \n int maxStringLength = 0; \n g2d.drawLine(x, y, x, y-this.axisLength);\n for(int loop = 0; loop < this.axisMarks.size();loop++){\n double pos = this.getPosition(this.axisMarks.get(loop));\n g2d.drawLine(x, (int) (y-pos), x+this.axisTickMarkLength, (int) (y-pos));\n int fw = fm.stringWidth(this.axisMarksString.get(loop));\n int fh = fm.getHeight();\n int fww = (int) (fw - fh*0.2);\n if(fww> maxStringLength){\n maxStringLength = fww;\n }\n g2d.drawString(this.axisMarksString.get(loop), (int) (x - fw - fh*0.2), (int) (y-pos+fh*0.35));\n }\n AffineTransform orig = g2d.getTransform();\n// g2d.rotate(-Math.PI/2);\n g2d.rotate(-Math.PI/2);\n //int yoffset = \n Rectangle2D rect = this.axisTitle.getBounds( g2d);\n int xt = (int) -(y-this.axisLength*0.5+rect.getWidth()*0.5);\n \n //System.out.println(\"Drawing Y - title \"); \n g2d.drawString(this.axisTitle.getText().getIterator(), xt, (int) (x - maxStringLength - fm.getHeight()));\n g2d.setTransform(orig);\n }\n }", "private void drawMarker1(LatLng point){\n MarkerOptions markerOptions=new MarkerOptions();\r\n\r\n // Setting latitude and longitude for the marker\r\n markerOptions.position(point);\r\n\r\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\r\n\r\n // Adding marker on the Google Map\r\n mMap.addMarker(markerOptions);\r\n\r\n // marker.showInfoWindow();\r\n }", "void draw(Annotation annotation, GC gc, StyledText textWidget, int offset, int length, Color color);", "public void draw(Graphics2D gc){\r\n\r\n Font curFont = gc.getFont();\r\n gc.setFont(font);\r\n Paint curColor = gc.getPaint();\r\n gc.setPaint(textColor);\r\n //gc.drawString(text, x, y); // This would look better but doesn't seem to work with hit testing.\r\n\r\n FontRenderContext frc = gc.getFontRenderContext();\r\n TextLayout textLayout = new TextLayout(text, font, frc);\r\n AffineTransform moveTo = AffineTransform.getTranslateInstance(x, y);\r\n textShape = textLayout.getOutline(moveTo);\r\n gc.fill(textShape);\r\n gc.setFont(curFont);\r\n gc.setPaint(curColor);\r\n }", "private void drawMarker(int row, int col, Cell[][] gridCells) {\r\n\t\tfor (int i = 0; i < 6; i++) { //Check in each type of the 6 markers\r\n\t\t\t//Get the draw order and draw in that order\r\n\t\t\tint drawOrder = this.markerDrawOrders.get(gridCells[row][col]);\r\n\t\t\tif (drawOrder == 0) {\r\n\t\t\t\t//Draw a marker if one exists for either of the species\r\n\t\t\t\tif (gridCells[row][col].getMarker(0, i)) {\r\n\t\t\t\t\tdrawImage(this.blackMarker, row, col, 0);\r\n\t\t\t\t}\r\n\t\t\t\tif (gridCells[row][col].getMarker(1, i)) {\r\n\t\t\t\t\tdrawImage(this.redMarker, row, col, 0);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (gridCells[row][col].getMarker(1, i)) {\r\n\t\t\t\t\tdrawImage(this.redMarker, row, col, 0);\r\n\t\t\t\t}\r\n\t\t\t\tif (gridCells[row][col].getMarker(0, i)) {\r\n\t\t\t\t\tdrawImage(this.blackMarker, row, col, 0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n public void paintComponent(Graphics g) {\r\n super.paintComponent(g); g.setColor(Color.ORANGE);\r\n if (drawCirc == 0) {\r\n \tg.fillOval(txtLft,txtTop,txtWidth,txtHeight);\r\n }\r\n }", "private void fillDrawMark(Graphics2D graphic, double tx, double ty, Mark mark, int size,\n double rotation, Feature feature) {\n AffineTransform temp = graphic.getTransform();\n AffineTransform markAT = new AffineTransform();\n Shape shape = Java2DMark.getWellKnownMark(mark.getWellKnownName().getValue(feature)\n .toString());\n \n Point2D mapCentre = new java.awt.geom.Point2D.Double(tx, ty);\n Point2D graphicCentre = new java.awt.geom.Point2D.Double();\n temp.transform(mapCentre, graphicCentre);\n markAT.translate(graphicCentre.getX(), graphicCentre.getY());\n \n double shearY = temp.getShearY();\n double scaleY = temp.getScaleY();\n \n double originalRotation = Math.atan(shearY / scaleY);\n \n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"originalRotation \" + originalRotation);\n }\n \n markAT.rotate(rotation - originalRotation);\n \n Rectangle2D bounds = shape.getBounds2D();\n // getbounds is broken, but getBounds2D is not :-)\n double unitSize = Math.max(bounds.getWidth(), bounds.getHeight()); \n double drawSize = (double) size / unitSize;\n markAT.scale(drawSize, -drawSize);\n \n graphic.setTransform(markAT);\n \n if (mark.getFill() != null) {\n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"applying fill to mark\");\n }\n \n applyFill(graphic, mark.getFill(), feature);\n graphic.fill(shape);\n }\n \n if (mark.getStroke() != null) {\n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"applying stroke to mark\");\n }\n \n applyStroke(graphic, mark.getStroke(), null);\n graphic.draw(shape);\n }\n \n graphic.setTransform(temp);\n \n if (mark.getFill() != null) {\n resetFill(graphic);\n }\n \n return;\n }", "@Override\n protected void paintLine(Graphics gfx, TokenMarker tokenMarker, int line,\n int x) {\n \n // paint gutter\n paintGutterBg(gfx, line, x);\n \n paintLineBgColor(gfx, line, x + ta.getGutterWidth());\n \n paintGutterLine(gfx, line, x);\n \n // paint gutter symbol\n paintGutterText(gfx, line, x);\n \n paintErrorLine(gfx, line, x);\n \n super.paintLine(gfx, tokenMarker, line, x + ta.getGutterWidth());\n }", "public void paintComponent(Graphics g)\n {\n int xRange = Integer.parseInt(xLabel);\n \n // Udhezimi per kthimin e vleres se variablave x1-6 ne proporcion me gjatsine e boshtit x te shprehur ne pixela\n int propX1 = ((x1*axisLength)/xRange)+xPos;\n int propX2 = ((x2*axisLength)/xRange)+xPos;\n int propX3 = ((x3*axisLength)/xRange)+xPos;\n int propX4 = ((x4*axisLength)/xRange)+xPos;\n int propX5 = ((x5*axisLength)/xRange)+xPos;\n int propX6 = ((x6*axisLength)/xRange)+xPos;\n \n g.setColor(Color.white);\n g.fillRect(0,0,width,height);\n g.setColor(Color.black);\n \n // Boshti x dhe y me gjatesi prej axisLength\n g.drawLine(xPos+2, yPos, xPos+axisLength, yPos);\n g.drawLine(xPos, yPos, xPos, yPos-axisLength);\n \n // Paraqitja e pikes max te boshtit x(xLabel) dhe boshtit y(yLabel)\n g.drawString(xLabel, xPos+axisLength, yPos+20);\n g.drawString(yLabel, xPos-20, yPos-axisLength);\n g.drawString(\"0\", xPos+5,yPos+20);\n g.drawString(\"0\", xPos-15,yPos-5);\n \n // Udhezimi per paraqitjen grafike te pikave ne panel\n g.fillOval(propX1,propY1-3,4,4);\n g.fillOval(propX2,propY2-3,4,4);\n g.fillOval(propX3,propY3-3,4,4);\n g.fillOval(propX4,propY4-3,4,4);\n g.fillOval(propX5,propY5-3,4,4);\n g.fillOval(propX6,propY6-3,4,4);\n \n // Udhezimi per paraqitjen e drejtezave te cilat lidhin pikat x1-5\n g.drawLine(propX1, propY1, propX2 ,propY2);\n g.drawLine(propX2, propY2, propX3, propY3);\n g.drawLine(propX3, propY3, propX4, propY4);\n g.drawLine(propX4, propY4, propX5, propY5);\n g.drawLine(propX5, propY5, propX6, propY6);\n }", "private void drawCore(Graphics2D g2d) {\r\n icon.paintIcon(g2d, layout.location.x - icon.getIconWidth() / 2, layout.location.y - icon.getIconHeight() / 2,\r\n g2d.getColor());\r\n labelBox.draw(g2d);\r\n }", "protected void drawPlot()\n\t{\n \t\tfill(255);\n \t\tbeginShape();\n \t\tvertex(m_ViewCoords[0] - 1, m_ViewCoords[1] - 1);\n \t\tvertex(m_ViewCoords[2] + 1, m_ViewCoords[1] - 1);\n \t\tvertex(m_ViewCoords[2] + 1, m_ViewCoords[3] + 1);\n \t\tvertex(m_ViewCoords[0] - 1, m_ViewCoords[3] + 1);\n \t\tendShape(CLOSE);\n\t}", "private void drawRecyclingCenter(Graphics2D g2d, int x, int y, Cell c) {\n try {\r\n \tg2d.setPaint(Color.WHITE);\r\n \tg2d.fill(cellBorder);\r\n g2d.setPaint(Color.DARK_GRAY);\r\n g2d.draw(cellBorder);\r\n String msg = c.getGarbagePointsString();\r\n g2d.setRenderingHint(java.awt.RenderingHints.KEY_ANTIALIASING,\r\n java.awt.RenderingHints.VALUE_ANTIALIAS_ON);\r\n java.awt.Font font = new java.awt.Font(\"Serif\", java.awt.Font.PLAIN, 11);\r\n g2d.setFont(font);\r\n g2d.setPaint(Color.BLACK);\r\n g2d.drawString(msg,dx-40,dy);\r\n } catch(Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void drawCircle(GraphicsContext gc, double x, double y) {\r\n GraphicsContext gc1 = myCanvas.getGraphicsContext2D();\r\n gc1.setFill(randomColor());\r\n gc1.fillOval(x - 20, y - 20, 40, 40);\r\n }", "@Override\n\tpublic void paintComponent(Graphics g){\n\t\tsuper.paintComponent(g);\n\t\tg.setColor(indicateColor);\n\t\tg.fillOval(0, 0, checkerSize, checkerSize);\t\n\t\t\n\t}", "@Override\r\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(this.color);\r\n\t\tg.fillOval((int)x, (int)y, side, side);\r\n\t\tg.setColor(this.color2);\r\n\t\tg.fillOval((int)x+5, (int)y+2, side/2, side/2);\r\n\t}", "public void mark_plane(Graphics g, int log_num, int x, int y, int h);", "@Override\n\tpublic void paintComponent(java.awt.Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tg.setColor(java.awt.Color.green);\n\t\tg.fillOval(x, y, 50, 50);\n\t\tg.setColor(java.awt.Color.black);\n\t\tg.drawOval(x, y, 50, 50);\n\t}", "public void paintComponent(Graphics g2d)\n {\n Iterator<ColoredPoint> iter = PlottedDataSet.iterator();\n ColoredPoint dot = null;\n while(iter.hasNext())\n {\n dot = iter.next();\n g2d.setColor(dot.getColor()); \n g2d.fillOval((int)dot.getX(),(int)dot.getY(),POINT_SIZE, POINT_SIZE);\n g2d.drawString(dot.getLabel(), (int)dot.getX(),(int)dot.getY());\n }\n }", "private void drawMarker(LatLng point){\n \tMarkerOptions markerOptions = new MarkerOptions();\t\t\t\t\t\n \t\t\n \t// Setting latitude and longitude for the marker\n \tmarkerOptions.position(point);\n \tmarkerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker1));\n \t// Adding marker on the Google Map\n \tmap.addMarker(markerOptions); \t\t\n }", "private void drawCenter(Graphics2D g2d) {\n\t\tint width = size * 3/4;\n\t\tint offset = size / 8 + 5;\n\t\t\n\t\tRectangle2D bounds = new Rectangle2D.Double(offset, offset, width, width);\n\t\tArc2D center = new Arc2D.Double(bounds, 100, 350, Arc2D.PIE);\n\n\t\t// stroke\n\t\tg2d.setPaint(darkGrey);\n\t\tg2d.setStroke(new BasicStroke(5.0f));\n\t\tg2d.draw(center);\n\t\t\n\t\t// fill \n\t\tg2d.setPaint(white);\n\t\tg2d.fill(center);\n\t\t\n\t\t// fix for arc stroke\n\t\tEllipse2D circle = new Ellipse2D.Double(offset, offset, width, width);\n\t\tg2d.setPaint(white);\n\t\tg2d.fill(circle);\n\t}", "public void plot ( Graphics g, int x, int y, StarPosition star ) {\r\n\t\tColor c = color;\r\n\t\tif (c == null && star != null) {\r\n\t\t\tif (star instanceof Star)\r\n\t\t\t\tc = ((Star)star).getColor();\r\n\t\t}\r\n\t\tif (c == null)\r\n\t\t\tc = Color.black;\r\n\t\tg.setColor(c);\r\n\r\n\t\tint radius = 0;\r\n\t\tif (star instanceof Star) {\r\n\t\t\tradius = getRadius(getMagnitude((Star)star));\r\n\t\t} else {\r\n\t\t\tradius = getFixedRadius();\r\n\t\t}\r\n\r\n\t\tif (mark == PLOT_CIRCLE) {\r\n\t\t\tif (fill_flag) {\r\n\t\t\t\tif (radius < 1) {\r\n\t\t\t\t\tg.fillRect(x, y, 1, 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tx -= radius;\r\n\t\t\t\t\ty -= radius;\r\n\t\t\t\t\tg.fillArc(x, y, radius*2, radius*2, 0, 360);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (int r = 0 ; r < line_width ; r++) {\r\n\t\t\t\t\tg.drawArc(x - radius + r, y - radius + r, 2*(radius-r), 2*(radius-r), 0, 360);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (mark == PLOT_TRIANGLE) {\r\n\t\t\tif (fill_flag) {\r\n\t\t\t\tif (radius < 1) {\r\n\t\t\t\t\tg.fillRect(x, y, 1, 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tint fr3 = (int)((double)radius * Math.sqrt(3.0) / 2.0);\r\n\t\t\t\t\tPolygon polygon = new Polygon();\r\n\t\t\t\t\tpolygon.addPoint(x, y - radius);\r\n\t\t\t\t\tpolygon.addPoint(x - fr3, y + radius / 2);\r\n\t\t\t\t\tpolygon.addPoint(x + fr3, y + radius / 2);\r\n\t\t\t\t\tg.fillPolygon(polygon);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (int r = 0 ; r < line_width ; r++) {\r\n\t\t\t\t\tint fr3 = (int)((double)(radius - r) * Math.sqrt(3.0) / 2.0);\r\n\t\t\t\t\tPolygon polygon = new Polygon();\r\n\t\t\t\t\tpolygon.addPoint(x, y - (radius - r));\r\n\t\t\t\t\tpolygon.addPoint(x - fr3, y + (radius - r) / 2);\r\n\t\t\t\t\tpolygon.addPoint(x + fr3, y + (radius - r) / 2);\r\n\t\t\t\t\tg.drawPolygon(polygon);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (mark == PLOT_RECTANGLE) {\r\n\t\t\tif (fill_flag) {\r\n\t\t\t\tif (radius < 1) {\r\n\t\t\t\t\tg.fillRect(x, y, 1, 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tg.fillRect(x - radius, y - radius, 2*radius+1, 2*radius+1);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (int r = 0 ; r < line_width ; r++) {\r\n\t\t\t\t\tg.drawRect(x - (radius - r), y - (radius - r), 2*(radius-r)+1, 2*(radius-r)+1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void draw(GraphicsContext gc) {\n\t\toriginalHelix.draw(gc);\n\t\tupperHelix.draw(gc);\n\t\tlowerHelix.draw(gc);\n\t\tmanager.draw(gc);\n\t}", "protected abstract void setMarkers();", "void drawGraphic(Component c, Graphics2D g, int x, int y)\n {\n mRawIcon.paintIcon(c, g, x, y);\n }", "void render(GraphicsContext gc, double xOffSet, double yOffSet);", "@Override\n protected void drawAxisLine(final GraphicsContext gc, final double axisLength, final double axisWidth,\n final double axisHeight) {\n final double paddingX = getSide().isHorizontal() ? getAxisPadding() : 0.0;\n final double paddingY = getSide().isVertical() ? getAxisPadding() : 0.0;\n // for relative positioning of axes drawn on top of the main canvas\n final double axisCentre = getCenterAxisPosition();\n\n final double gradientWidth = getGradientWidth();\n\n // save css-styled line parameters\n final Path tickStyle = getMajorTickStyle();\n gc.save();\n gc.setStroke(tickStyle.getStroke());\n gc.setLineWidth(tickStyle.getStrokeWidth());\n\n if (getSide().isHorizontal()) {\n gc.setFill(new LinearGradient(0, 0, axisLength, 0, false, NO_CYCLE, getColorGradient().getStops()));\n } else {\n gc.setFill(new LinearGradient(0, axisLength, 0, 0, false, NO_CYCLE, getColorGradient().getStops()));\n }\n\n // N.B. important: translate by padding ie. canvas is +padding larger on\n // all size compared to region\n gc.translate(paddingX, paddingY);\n\n switch (getSide()) {\n case LEFT:\n // axis line on right side of canvas\n gc.fillRect(snap(axisWidth - gradientWidth), snap(0), snap(axisWidth), snap(axisLength));\n gc.strokeRect(snap(axisWidth - gradientWidth), snap(0), snap(axisWidth), snap(axisLength));\n break;\n case RIGHT:\n // axis line on left side of canvas\n gc.fillRect(snap(0), snap(0), snap(gradientWidth), snap(axisLength));\n gc.strokeRect(snap(0), snap(0), snap(gradientWidth), snap(axisLength));\n break;\n case TOP:\n // line on bottom side of canvas (N.B. (0,0) is top left corner)\n gc.fillRect(snap(0), snap(axisHeight - gradientWidth), snap(axisLength), snap(axisHeight));\n gc.strokeRect(snap(0), snap(axisHeight - gradientWidth), snap(axisLength), snap(axisHeight));\n break;\n case BOTTOM:\n // line on top side of canvas (N.B. (0,0) is top left corner)\n gc.rect(snap(0), snap(0), snap(axisLength), snap(gradientWidth));\n break;\n case CENTER_HOR:\n // axis line at the centre of the canvas\n gc.fillRect(snap(0), axisCentre * axisHeight - 0.5 * gradientWidth, snap(axisLength),\n snap(axisCentre * axisHeight + 0.5 * gradientWidth));\n gc.strokeRect(snap(0), axisCentre * axisHeight - 0.5 * gradientWidth, snap(axisLength),\n snap(axisCentre * axisHeight + 0.5 * gradientWidth));\n break;\n case CENTER_VER:\n // axis line at the centre of the canvas\n gc.fillRect(snap(axisCentre * axisWidth - 0.5 * gradientWidth), snap(0),\n snap(axisCentre * axisWidth + 0.5 * gradientWidth), snap(axisLength));\n gc.strokeRect(snap(axisCentre * axisWidth - 0.5 * gradientWidth), snap(0),\n snap(axisCentre * axisWidth + 0.5 * gradientWidth), snap(axisLength));\n break;\n default:\n break;\n }\n gc.restore();\n }", "public void paintItem(Graphics2D g, \n int ulx, int uly, \n int lrx, int lry) {\n if (!canPaint()) {\n return;\n }\n boolean any = true;\n int i = 0,j = 0;\n Color repcolor = colors.getColor(getLabel());\n int startindex = data.baseToIndex(getRegion().getStart());\n int endindex = data.baseToIndex(getRegion().getEnd());\n\n g.setColor(Color.BLACK);\n while (any || (j == 0)) {\n g.setColor(repcolor);\n repcolor = repcolor.darker();\n any = false;\n int lastx = -1;\n int lasty = -1;\n int lasti = -1;\n for (i = startindex; i < endindex; i++) {\n if (j >= data.getReplicates(i)) {lasti = -1; continue;}\n any = true;\n double maxratio;\n if (getProperties().MaxRatio > 0) {\n maxratio = getProperties().MaxRatio;\n } else {\n maxratio = scale.getMaxVal();\n }\n int x = getXPos(data.getPos(i),\n getRegion().getStart(), getRegion().getEnd(),\n ulx,lrx);\n int y = getYPos(data.getValue(i,j),\n 0, maxratio,\n uly,lry,props.RatiosOnLogScale);\n paintDatapointAt(g,x,y,i,j);\n// System.err.println(\"Painting (\" + i + \"=\" + data.getPos(i) + \",\" + j +\n// \")=\" + data.getValue(i,j) + \" -> (\" + x + \",\"+y+\") lastx=\" +\n// lastx +\" lasty=\" + lasty + \" lasti=\" + lasti);\n if ((lasti != -1) && \n (Math.abs(data.getPos(i) - data.getPos(lasti)) < 500)) {\n connectDatapoints(g,lastx,lasty,x,y);\n }\n lastx = x;\n lasty = y;\n lasti = i;\n }\n j++;\n }\n if (props.DrawTrackLabel) {\n g.setColor(Color.BLACK);\n g.setFont(attrib.getLargeLabelFont(lrx - ulx,lry - uly));\n g.drawString(getLabel(),ulx,uly + g.getFont().getSize() * 2);\n }\n }", "public void mark(int x, int y, int marker) {\n grid[x][y] = marker;\n }", "public void paint(Graphics2D g, Rectangle rect, boolean drawMarks) {\r\n super.paint(g);\r\n if (isAntiAliasing) {\r\n g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);\r\n g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);\r\n }\r\n \r\n final int left = rect.x;\r\n final int top = rect.y;\r\n final int width = rect.width;\r\n final int height = rect.height;\r\n \r\n if (width < 5 || height < 5) {\r\n return;\r\n }\r\n // if (gradientToggle) {\r\n // setGradient(checkGradient());\r\n // } else {\r\n // setGradient(false);\r\n // }\r\n final int zeroValue = top + (int)Math.round(height/2f);\r\n final int numberOfSamples = experiment.getNumberOfSamples();\r\n \r\n //do this outside paint once menu is set up\r\n if(this.yRangeOption == CentroidViewer.USE_EXPERIMENT_MAX)\r\n maxYValue = this.maxExperimentValue;\r\n else if(this.yRangeOption == CentroidViewer.USE_CLUSTER_MAX)\r\n maxYValue = this.maxClusterValue;\r\n \r\n if (maxYValue == 0.0f) {\r\n maxYValue = 1.0f;\r\n }\r\n \r\n final float factor = height/(2f*maxYValue);\r\n final float stepX = width/(float)(numberOfSamples-1);\r\n final int stepsY = (int)maxYValue+1;\r\n if (this.drawVariances) {\r\n // draw variances\r\n g.setColor(bColor);\r\n for (int i=0; i<numberOfSamples; i++) {\r\n \t\r\n if(Float.isNaN(this.means[this.clusterIndex][i]) || Float.isNaN(this.variances[this.clusterIndex][i]) || (this.variances[this.clusterIndex][i] < 0.0f)) {\r\n continue;\r\n }\r\n g.drawLine(left+(int)Math.round(i*stepX) , zeroValue - (int)Math.round((this.means[this.clusterIndex][i]-this.variances[this.clusterIndex][i])*factor),\r\n left+(int)Math.round(i*stepX) , zeroValue - (int)Math.round((this.means[this.clusterIndex][i]+this.variances[this.clusterIndex][i])*factor));\r\n g.drawLine(left+(int)Math.round(i*stepX)-3, zeroValue - (int)Math.round((this.means[this.clusterIndex][i]-this.variances[this.clusterIndex][i])*factor),\r\n left+(int)Math.round(i*stepX)+3, zeroValue - (int)Math.round((this.means[this.clusterIndex][i]-this.variances[this.clusterIndex][i])*factor));\r\n g.drawLine(left+(int)Math.round(i*stepX)-3, zeroValue - (int)Math.round((this.means[this.clusterIndex][i]+this.variances[this.clusterIndex][i])*factor),\r\n left+(int)Math.round(i*stepX)+3, zeroValue - (int)Math.round((this.means[this.clusterIndex][i]+this.variances[this.clusterIndex][i])*factor));\r\n }\r\n }\r\n if (this.drawValues) {\r\n // draw values\r\n boolean coloredClusters = false;\r\n float fValue, sValue, yInterval, lineHeight;\r\n Color color = null;\r\n float maxLineHeight = (maxExperimentValue*factor) / 20;\t//maxExperimentValue is an expression value - not a coordinate length\r\n int R=0, G=0, B = 0, intervalNumber;\r\n \r\n for (int sample=0; sample<numberOfSamples-1; sample++) {\r\n for (int probe=0; probe<getCluster().length; probe++) {\r\n fValue = this.experiment.get(getProbe(probe), sample);\r\n sValue = this.experiment.get(getProbe(probe), sample+1);\r\n if (Float.isNaN(fValue) || Float.isNaN(sValue)) {\r\n continue;\r\n }\r\n if(!gradientColors) {\r\n color = this.data.getProbeColor(this.experiment.getGeneIndexMappedToData(getProbe(probe)));\r\n color = color == null ? DEF_CLUSTER_COLOR : color;\r\n g.setColor(color);\r\n g.drawLine(left+(int)Math.round(sample*stepX), zeroValue - (int)Math.round(fValue*factor),\r\n left+(int)Math.round((sample+1)*stepX), zeroValue - (int)Math.round(sValue*factor));\r\n } else {\r\n lineHeight = (sValue - fValue)*factor;\r\n if (Math.abs(lineHeight) > maxLineHeight) {\r\n intervalNumber = Math.abs((int)(lineHeight / maxLineHeight));\r\n } else {\r\n intervalNumber = 1;\r\n }\r\n yInterval = lineHeight/intervalNumber;\r\n for(int i=0; i<intervalNumber; i++) {\r\n g.setColor(getColor(fValue + (float)(i)*yInterval/factor));\r\n g.drawLine(left+(int)Math.round(sample*stepX + ((float)i/intervalNumber)*stepX), zeroValue - (int)Math.round(fValue*factor + (float)i*yInterval),\r\n left+(int)Math.round((sample)*stepX + (((float)i+1)/intervalNumber)*stepX), zeroValue - (int)Math.round(fValue*factor + ((float)i+1)*yInterval));\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (this.drawCodes && this.codes != null && clusters[clusterIndex].length > 0) {\r\n g.setColor(Color.blue);\r\n for (int i=0; i<numberOfSamples-1; i++) {\r\n g.drawLine(left+(int)Math.round(i*stepX), zeroValue-(int)Math.round(this.codes[this.clusterIndex][i]*factor), left+(int)Math.round((i+1)*stepX), zeroValue-(int)Math.round(this.codes[this.clusterIndex][i+1]*factor));\r\n }\r\n }\r\n \r\n // draw zero line\r\n g.setColor(Color.black);\r\n g.drawLine(left, zeroValue, left+width, zeroValue);\r\n // draw magenta line\r\n if (getCluster() != null && getCluster().length > 0) {\r\n g.setColor(centroidColor);\r\n for (int i=0; i<numberOfSamples-1; i++) {\r\n if (Float.isNaN(this.means[this.clusterIndex][i]) || Float.isNaN(this.means[this.clusterIndex][i+1])) {\r\n continue;\r\n }\r\n g.drawLine(left+(int)Math.round(i*stepX), zeroValue-(int)Math.round(this.means[this.clusterIndex][i]*factor), left+(int)Math.round((i+1)*stepX), zeroValue-(int)Math.round(this.means[this.clusterIndex][i+1]*factor));\r\n }\r\n }\r\n // draw rectangle\r\n g.setColor(Color.black);\r\n g.drawRect(left, top, width, height);\r\n // draw X items\r\n for (int i=1; i<numberOfSamples-1; i++) {\r\n g.drawLine(left+(int)Math.round(i*stepX), top+height-5, left+(int)Math.round(i*stepX), top+height);\r\n g.drawLine(left+(int)Math.round(i*stepX), top, left+(int)Math.round(i*stepX), top+5);\r\n }\r\n //draw Y items\r\n for (int i=1; i<stepsY; i++) {\r\n g.drawLine(left, zeroValue-(int)Math.round(i*factor), left+5, zeroValue-(int)Math.round(i*factor));\r\n g.drawLine(left, zeroValue+(int)Math.round(i*factor), left+5, zeroValue+(int)Math.round(i*factor));\r\n }\r\n // draw genes info\r\n g.setColor(bColor);\r\n if (drawMarks) {\r\n FontMetrics metrics = g.getFontMetrics();\r\n String str;\r\n int strWidth;\r\n //draw Y digits\r\n for (int i=1; i<stepsY; i++) {\r\n str = String.valueOf(i);\r\n strWidth = metrics.stringWidth(str);\r\n g.drawString(str, left-10-strWidth, zeroValue+5-(int)Math.round(i*factor));\r\n str = String.valueOf(-i);\r\n strWidth = metrics.stringWidth(str);\r\n g.drawString(str, left-10-strWidth, zeroValue+5+(int)Math.round(i*factor));\r\n }\r\n // draw X samples names\r\n g.rotate(-Math.PI/2.0);\r\n final int max_name_width = getNamesWidth(metrics);\r\n for (int i=0; i<numberOfSamples; i++) {\r\n g.drawString(data.getSampleName(experiment.getSampleIndex(i)), -height-top-10-max_name_width, left+(int)Math.round(i*stepX)+3);\r\n }\r\n g.rotate(Math.PI/2.0);\r\n }\r\n if (getCluster() != null && getCluster().length > 0 && this.drawVariances) {\r\n // draw points\r\n g.setColor(bColor);\r\n for (int i=0; i<numberOfSamples; i++) {\r\n if (Float.isNaN(this.means[this.clusterIndex][i])) {\r\n continue;\r\n }\r\n g.fillOval(left+(int)Math.round(i*stepX)-3, zeroValue-(int)Math.round(this.means[this.clusterIndex][i]*factor)-3, 6, 6);\r\n }\r\n }\r\n if(this.showRefLine && this.drawReferenceBlock){ \r\n java.awt.Composite initComposite = g.getComposite();\r\n g.setComposite(java.awt.AlphaComposite.getInstance(java.awt.AlphaComposite.SRC_OVER, 0.3f));\r\n g.setColor(Color.yellow);\r\n g.fillRect(xref-3, 20, 7, height); \r\n g.setComposite(initComposite);\r\n g.setColor(Color.blue);\r\n g.drawLine(xref, 20, xref, height+20);\r\n framework.setStatusText(\"Sample= \"+data.getSampleName(experiment.getSampleIndex(currExpRefLine))+\", mean = \"+ this.means[this.clusterIndex][currExpRefLine]+\", sd = \"+ this.variances[this.clusterIndex][currExpRefLine]);\r\n }\r\n g.setColor(bColor);\r\n if (getCluster() == null || getCluster().length == 0) {\r\n g.drawString(\"No Genes\", left+10, top+20);\r\n } else {\r\n g.drawString(getCluster().length+\" Genes\", left+10, top+20);\r\n }\r\n }", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n Graphics2D g2d = (Graphics2D) g;\n drawAxis(g2d);\n \n drawCurve(g2d);\n \n drawPoints(g2d);\n \n // drawObject(g2d); **\n // El panel, por defecto no es \"focusable\". \n // Hay que incluir estas líneas para que el panel pueda\n // agregarse como KeyListsener.\n this.setFocusable(true);\n this.requestFocusInWindow();\n }", "@Override\r\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\tg.setColor(new Color(255, 0, 0));\r\n\t\tg.drawOval(mp1.getX(), mp1.getY(), 3*length, 3*length);\r\n\t\tg.setColor(new Color(0,0,255));\r\n\t\tg.drawOval(enenmy.getX(), enenmy.getY(), 3, 3);\r\n\t}", "public ScatterPlot(HighlightManager highlightManager, \r\n GeoData xGeoData, \r\n GeoData yGeoData,\r\n String xLabel,\r\n String yLabel)\r\n {\r\n xData_ = xGeoData;\r\n yData_ = yGeoData;\r\n highlightManager_ = highlightManager;\r\n xLabel_ = xLabel;\r\n yLabel_ = yLabel;\r\n\r\n\r\n highlightManager_.addHighlightChangedListener(this);\r\n\r\n\r\n // Set up the mouse motion listener\r\n addMouseMotionListener(this);\r\n\r\n\r\n // Get the size of the GeoData (assuming the size of the xGeoData\r\n // equals the size of the yGeoData\r\n xSize_ = xData_.getSize(); \r\n\r\n\r\n fillVector();\r\n }", "@Override\n\t\tprotected void paintComponent(Graphics g) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tGraphics2D ga = (Graphics2D) g; \n\t\t\tif (currentColor == color) {\n\t\t\t\tShape check = factory.getShape(ShapeFactory.CHECK);\n\t\t\t\tcheck.setPosition(new Point2D.Double(point.getX() + getPreferredSize().width/2 - 7, point.getY()+ 25));\n\t\t\t\tga.setColor(currentColor);\n\t\t\t\tcheck.draw(ga);\n\t\t\t}\n\t\t}", "static void drawCrosses() { // draws a cross at each cell centre\n\t\tif (currentStage[currentSlice-1]>1)\n\t\t{\n\t\t\tfloat xc,yc;\n\t\t\t//GeneralPath path = new GeneralPath();\n\n\t\t\tfor (int i=0;i<pop.N;i++)\n\t\t\t{\n\t\t\t\txc = (float) ( (Balloon)(pop.BallList.get(i)) ).x0;\n\t\t\t\tyc = (float) ( (Balloon)(pop.BallList.get(i)) ).y0;\n\t\t\t\tfloat arm = 5;\n\n\t\t\t\t// label cell position\n\t\t\t\tjava.awt.geom.GeneralPath Nshape = new GeneralPath();\n\t\t\t\tNshape.moveTo(xc-arm, yc);\n\t\t\t\tNshape.lineTo(xc+arm, yc);\n\t\t\t\tNshape.moveTo(xc, yc-arm);\n\t\t\t\tNshape.lineTo(xc, yc+arm);\n\n\t\t\t\tRoi XROI = new ShapeRoi(Nshape);\n\t\t\t\tOL.add(XROI);\n\t\t\t}\n\t\t}\n\t}", "public void paint(Graphics g) {\n Point loc = ic.getLocation();\n Dimension csize = ic.getSize();\n g.drawRect(loc.x - 1, loc.y - 1, csize.width + 1, csize.height + 1);\n }", "@Override\n\tpublic void render(GameContainer gc, Graphics g) {\n\t\tfloat x = getX(), y = getY(), width = getWidth(), height = getHeight();\n\t\tg.setColor(new Color(0.5f, 0.5f, 0.5f, 0.8f));\n\t\tg.fillRoundRect(x, y, width, height, 5);\n\t\t\n\t\tg.setColor(Color.black);\n\t\tg.drawString(\"Map needs to be drawn below\", x + (width - g.getFont().getWidth(\"Map needs to be drawn below\")) * 0.5f , y + 20);\n\t\tg.drawString(\"Orange - current cell\", x + 20, y + 50);\n\t\tg.drawString(\"Green - explored cell\", x + 20, y + 70);\n\t\tg.drawString(\"White - unexplored cell\", x + 20, y + 90);\n\t\tg.drawString(\"Line - connection\", x + 20, y + 110);\n\t\tg.drawString(\"Dot - contains item\", x + 20, y + 130);\n\t\t\n\t\tg.setColor(Color.orange);\n\t\tg.fillRoundRect(x + width/2 - 3, y + height/2 - 3, 46, 46, 5);\n\t\t\n\t\tg.setColor(Color.green);\n\t\tg.fillRoundRect(x + width/2 - 3 + 50, y + height/2 - 3, 46, 46, 5);\n\t\tg.fillRoundRect(x + width/2 - 3 + 100, y + height/2 - 3, 46, 46, 5);\n\t\t\n\t\tg.setColor(Color.white);\n\t\tg.fillRoundRect(x + width/2 - 3 + 100, y + height/2 - 3 + 50, 46, 46, 5);\n\t\t\n\t\tg.setColor(Color.darkGray);\n\t\tg.fillRoundRect(x + width/2, y + height/2, 40, 40, 5);\n\t\tg.fillRoundRect(x + width/2 + 50, y + height/2, 40, 40, 5);\n\t\tg.fillRoundRect(x + width/2 + 100, y + height/2, 40, 40, 5);\n\t\tg.fillRoundRect(x + width/2 + 100, y + height/2 + 50, 40, 40, 5);\n\t\t\n\t\tg.drawLine(x + width/2 + 40, y + height/2 + 20, x + width/2 + 50, y + height/2 + 20);\n\t\tg.drawLine(x + width/2 + 40 + 50, y + height/2 + 20, x + width/2 + 50 + 50, y + height/2 + 20);\n\t\tg.drawLine(x + width/2 + 120, y + height/2 + 40, x + width/2 +\t120, y + height/2 + 50);\n\t\t\n\n g.setColor(Color.cyan);\n g.fillOval(x + width/2 - 3 + 120, y + height/2 + 17, 6, 6);\n\t\t\n\t}", "private void drawLabels(Graphics2D g2) {\r\n if (isTextPainted()) {\r\n double axisH = yPositionToPixel(originY);\r\n double axisV = xPositionToPixel(originX);\r\n\r\n if (isAxisPainted()) {\r\n Stroke stroke = g2.getStroke();\r\n g2.setStroke(new BasicStroke(STROKE_AXIS));\r\n g2.setColor(getAxisColor());\r\n g2.drawLine((int) axisV - 3, (int) axisH,\r\n (int) axisV + 3, (int) axisH);\r\n g2.drawLine((int) axisV, (int) axisH - 3,\r\n (int) axisV, (int) axisH + 3);\r\n g2.setStroke(stroke);\r\n }\r\n\r\n g2.setColor(getForeground());\r\n FontMetrics metrics = g2.getFontMetrics();\r\n g2.drawString(format(originX) + \"; \" +\r\n format(originY), (int) axisV + 5,\r\n (int) axisH + metrics.getHeight());\r\n \r\n drawHorizontalAxisLabels(g2);\r\n drawVerticalAxisLabels(g2);\r\n }\r\n }", "@Override\r\n public void draw(Graphics2D g, float x, float y) {\n g.setPaint(new GradientPaint(x, y,\r\n getColor() == Color.BLANCO ? java.awt.Color.CYAN : java.awt.Color.BLACK,\r\n x + 50, y + 50,\r\n java.awt.Color.WHITE));\r\n g.fill(new Ellipse2D.Float(x + 17, y + 15, 16, 16));\r\n g.fill(new Rectangle2D.Float(x + 15, y + 30, 20, 15));\r\n g.setPaint(java.awt.Color.BLACK);\r\n g.draw(new Ellipse2D.Float(x + 17, y + 15, 16, 16));\r\n g.draw(new Rectangle2D.Float(x + 15, y + 30, 20, 15));\r\n }", "private void fillDrawMark(Graphics2D graphic, Point point, Mark mark, int size,\n double rotation, Feature feature) {\n fillDrawMark(graphic, point.getX(), point.getY(), mark, size, rotation, feature);\n }", "@Override\n public void draw(Graphics g) {\n g.setColor(this.getColor());\n g.drawLine(left, axisY, right, axisY);\n\n // Draw string to the left of the plot labeling the height of this axis\n g.setColor(LABEL_COLOR);\n g.setFont(LABEL_FONT);\n FontMetrics metric = g.getFontMetrics(LABEL_FONT);\n int width = metric.stringWidth(label);\n int height = metric.getAscent();\n int x = left - 8 - width;\n int y = axisY + (height / 2) - 1;\n g.drawString(label, x, y);\n }", "protected abstract void paintLayers(Graphics2D g);", "private void drawMarker(LatLng point){\n\t\tgoogleMap.clear();\t\t\r\n\t\t\r\n // Creating an instance of MarkerOptions\r\n MarkerOptions markerOptions = new MarkerOptions();\r\n\r\n // Setting latitude and longitude for the marker\r\n markerOptions.position(point); \r\n \r\n // Setting title for the InfoWindow\r\n markerOptions.title(\"Position\");\r\n \r\n // Setting InfoWindow contents\r\n markerOptions.snippet(\"Latitude:\"+point.latitude+\",Longitude\"+point.longitude);\r\n // markerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.));\r\n\r\n // Adding marker on the Google Map\r\n googleMap.addMarker(markerOptions);\r\n \r\n // Moving CameraPosition to the user input coordinates\r\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(point));\r\n\r\n // Setting the zoom level\r\n //googleMap.animateCamera(CameraUpdateFactory.zoomTo(10)); \r\n \r\n }", "private void drawIconBorder(Graphics g) {\n }", "public void draw (Graphics g,Location loc){\n System.err.println(\"This method not yet implemented\");\n }", "protected abstract void plot2d( int px, int py, double z, int istyle );", "private void addGreenMarker(LatLng latLng) {\n MarkerOptions markerOptions = new MarkerOptions();\r\n markerOptions.position(latLng);\r\n //markerOptions.title(dt.format(newDate));\r\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\r\n mMap.addMarker(markerOptions);\r\n }", "protected void paintComponent(Graphics g){\n g.drawOval(110,110,50,50);\n }", "private void drawAxis(Graphics2D g2d) {\n g2d.setColor(Color.red);\n drawEdge(g2d,new Point(0, -100), new Point(0, 100));\n g2d.setColor(Color.green);\n drawEdge(g2d,new Point(-100, 0), new Point(100, 0));\n }", "public void paintComponent(Graphics page) {\r\n super.paintComponent(page);\r\n IMAGE.paintIcon(this, page, x, y);\r\n }", "public void drawAxis(boolean x) {\n\n\t\tint stepPixels;\n\t\tfloat scale;\n\t\tif(x)\n\t\t{\n\t\t\tscale=this.drawnPlot.getScale().x;\n\t\t\tg.setColor(Color.green);\n\t\t\tGraphics2D g2 = (Graphics2D) g;\n\t\t\tg2.setStroke(new BasicStroke(2));\n\t\t\tg.drawLine((int)drawnPlot.getOffset().x-maxStepPixels*10, (int)drawnPlot.getOffset().y,(int)drawnPlot.getOffset().x+maxStepPixels*10,(int) drawnPlot.getOffset().y);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tg.setColor(Color.green);\n\t\t\tGraphics2D g2 = (Graphics2D) g;\n\t\t\tg2.setStroke(new BasicStroke(2));\n\t\t\tg.drawLine((int)drawnPlot.getOffset().x, (int)drawnPlot.getOffset().y-maxStepPixels*10,(int)drawnPlot.getOffset().x,(int) drawnPlot.getOffset().y+maxStepPixels*10);\n\n\t\t\tscale=this.drawnPlot.getScale().y;\n\t\t}\n\t\t\n\t\tfloat actualStepSize = maxStepPixels /scale;//calc how much is the maximum step size in pixels in actual units\n\t\tint scaleOrder=(int)Math.floor(Math.log10(actualStepSize));//see the order of magnitude the actual step size is in; no loss from casting to int with floor\n\t\tfloat divisor=(float) Math.pow(10, scaleOrder);//convert the order of magnitude to the lowest number of that order (2-->100, 1-->10...)\n\t\tdouble correctedStepSize=actualStepSize-(actualStepSize%divisor);//round the actual step size down based on its order of magnitude (0.253-->0.2, 101-->100, 1523-->1000)\n\t\tstepPixels=(int)(correctedStepSize*scale);\n\t\t//System.out.println(\"stepPixels: \"+stepPixels);\n\t\t\n\t\t\n\t\tfor(int i=-10;i<10;i++)\n\t\t{\n\t\t\tint xCommon=(int) (stepPixels *i + drawnPlot\n\t\t\t\t\t.getOffset().x);\n\t\t\tint x1 = xCommon;\n\t\t\tint y1 = (int) (drawnPlot\n\t\t\t\t\t.getOffset().y);\n\t\t\tint x2 = xCommon;\n\t\t\t\n\t\t\tint y2 = (int) ( drawnPlot\n\t\t\t\t\t.getOffset().y+tickSize);\n\t\t\tGraphics2D g2 = (Graphics2D) g;\n\t\t\tg2.setStroke(new BasicStroke(1));\n\t\t\t\n\t\t\tString markTxt=Double.toString(correctedStepSize*i);\n\t\t\tmarkTxt=markTxt.substring(0, Math.min(markTxt.length(), 5));\n\t\t\tmarkTxt=markTxt.replaceAll(\"(.*?\\\\..*?)0+$\", \"$1\");\n\t\t\tchar[] markTxtCa=markTxt.toCharArray();\n\t\t\t//System.out.println(\"test: \"+\"30.0200\".replaceAll(\"(.*?\\\\..*?)0+$\", \"$1\"));\n\t\t\t\n\t\t\tif(x)\n\t\t\t{\n\t\t\t\t\tg.drawLine(x1, y1, x2, y2);\n\t\t\t\t\tg.drawChars(markTxtCa, 0, markTxtCa.length, xCommon, (int) (drawnPlot\n\t\t\t\t\t.getOffset().y+tickSize*2));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tg.drawLine((int)drawnPlot\n\t\t\t\t\t\t.getOffset().x, stepPixels*-i+(int)(int)drawnPlot\n\t\t\t\t\t\t.getOffset().y, (int)drawnPlot\n\t\t\t\t\t\t.getOffset().x+tickSize, (int)drawnPlot\n\t\t\t\t\t\t.getOffset().y+stepPixels*-i);\n\t\t\t\tg.drawChars(markTxtCa, 0, markTxtCa.length, \n\t\t\t\t\t\t(int)drawnPlot\n\t\t\t\t\t\t.getOffset().x+tickSize*2, stepPixels*-i+(int)(int)drawnPlot\n\t\t\t\t\t\t.getOffset().y\n\t\t\t\t\t\t\n\t\t\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(markTxt);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "private void drawCenter(double x, double y) {\n\t\tdouble r = findCenterRadius(x, y);\n\t\tGPoint corner = findCenterCorner(r, x ,y);\n\t\tcenterCircle = new GOval(2*r,2*r);\n\t\tadd(centerCircle, corner);\n\t\t//GPoint center = new GPoint(corner.getX() - r, corner.getY() - r );\n\t}", "public void paint(Graphics g) {\n\t\tg.drawLine(0,((int)getWidth() / 3), Center, 20);\n\t\tg.drawLine(Center, 20, getWidth(), (int)(getWidth()/3));\n\t\t\n\t\t//Draw empty lights\n\t\tg.setColor(Color.BLACK);\n\t\tg.fillOval(Center-40, 80, 75, 75);\n\t\tg.fillOval(Center-40, 170, 75, 75);\n\t\tg.fillOval(Center-40, 260, 75, 75);\n\t\t\n\t\tif(NSig == true)\n\t\t\tNormalSig(g);\n\t\telse if(SSig == true)\n\t\t\tStopSig(g);\n\t\telse if(CSig == true)\n\t\t\tCautionSig(g);\n\t\telse if(RSig == true)\n\t\t\tRightSig(g);\n\t\telse if(reset == true)\n\t\t\tReset(g);\n }", "public void paintComponent(Graphics g) {\n\t\tint[] bornes = parent.getBornes();\n\t\txMin = bornes[0];\n\t\txMax = bornes[1];\n\t\tyMin = bornes[2];\n\t\tyMax = bornes[3];\n\n\t\tint[] spacing = parent.getTicks();\n\t\tmajorX = spacing[0];\n\t\tmajorY = spacing[1];\n\t\tminorX = spacing[2];\n\t\tminorY = spacing[3];\n\n\t\tc = parent.getColor();\n\t\t\n\t\twidth = getWidth();\n\t\theight = getHeight();\n\n\t\tpointsParX = width/(abs(xMin-xMax));\n\t\tpointsParY = height/(abs(yMin-yMax));\n\n\t\taxis.setLocation(\n\t\t\t\twidth*abs(xMin)/(float)(xMax+abs(xMin)), \n\t\t\t\theight*abs(yMax)/(float)(yMax+abs(yMin)));\n\n\t\timage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n\t\traster = image.getRaster();\n\t\tmodel = image.getColorModel();\t\t\n\t\t\n\t\tString style = parent.getStyle();\n\n\t\tpaintBackground();\n\t\tpaintAxis();\n\t\tpaintTicks();\n\t\t\t\t\n\t\tif(style.equals(\"lie\"))\n\t\t\tpaintCourbeLie();\n\t\t\n\t\telse if(style.equals(\"points\"))\n\t\t\tpaintCourbePoints();\n\t\t\n\t\telse if(style.equals(\"croix\"))\n\t\t\tpaintCourbeCroix();\n\n\t\tg.drawImage(image, 0, 0, null);\n\t}", "public void draw() {\n\t\tSystem.out.println(getMessageSource().getMessage(\"greeting2\", null, null));\r\n\r\n\t\tSystem.out.println(getMessageSource().getMessage(\"drawing.circle\", null, null));\r\n\t\tSystem.out.println(\"Center's Coordinates: (\" + getCenter().getX() + \", \" + getCenter().getY() + \")\");\r\n\t\tSystem.out.println(getMessageSource().getMessage(\"drawing.center\",\r\n\t\t\t\tnew Object[] { getCenter().getX(), getCenter().getY() }, \"Default point coordinates msg\", null));\r\n\t}", "abstract void draw(Graphics g, int xoff, int yoff,\n int x, int y, int width, int height);", "@Override\n public void renderChart(ChartData data) {\n markers.clear();\n mMap.clear();\n ArrayList<MapSet> sets= ((MapChartDataImpl)data).getData();\n for(int i=0;i<sets.size();i++){\n BitmapDescriptor setmarkerico=null;\n ArrayList<MapPoint> set=sets.get(i).getData();\n if(sets.get(i).getMarker().equals(\"\")||sets.get(i).getMarker().equals(\"standard\"))\n setmarkerico=BitmapDescriptorFactory.fromResource(R.drawable.standard);\n else if(sets.get(i).getMarker().equals(\"custom\"))\n setmarkerico=BitmapDescriptorFactory.fromResource(R.drawable.custom);\n else if(sets.get(i).getMarker().equals(\"plane\"))\n setmarkerico=BitmapDescriptorFactory.fromResource(R.drawable.plane);\n else if(sets.get(i).getMarker().equals(\"flag\"))\n setmarkerico=BitmapDescriptorFactory.fromResource(R.drawable.flag);\n else if(sets.get(i).getMarker().equals(\"bus\"))\n setmarkerico=BitmapDescriptorFactory.fromResource(R.drawable.bus);\n //TODO more...\n for(int j = 0;j<set.size();j++){\n LatLng coord = new LatLng(set.get(j).getLatitude(),set.get(j).getLongitude());\n\n MarkerOptions mo=new MarkerOptions()\n .position(coord)\n .snippet(\"\" + coord.toString())\n .icon(setmarkerico);\n if(set.get(j).getId()!=null)\n mo.title(\"\" + j + \"/\" + sets.get(i).getName()+ \" (id: \"+ set.get(j).getId()+\")\");\n else\n mo.title(\"\" + j + \"/\" + sets.get(i).getName());\n\n markers.add(mMap.addMarker(mo));\n\n /*if(j!=0)\n mMap.addPolyline(new PolylineOptions()\n .color(Color.parseColor(sets.get(i).getColor()))\n .add(new LatLng(set.get(j - 1).getLatitude(), set.get(j - 1).getLongitude()))\n .add(coord));*/\n }\n }\n }", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n if (bdhcHandler != null) {\n int[] slopes = bdhcHandler.getSelectedPlate().getSlope();\n float angle = (float) Math.atan2(slopes[indexSlope1], slopes[indexSlope2]);\n\n Graphics2D g2 = (Graphics2D) g;\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n\n g.setColor(Color.magenta);\n final int angleRadius = (radius * 2) / 3;\n final int angleOffset = size / 2 - angleRadius;\n g2.setStroke(new BasicStroke(2));\n g.drawArc(angleOffset, angleOffset, 2 * angleRadius, 2 * angleRadius, 0, (int) (-(angle * 180) / Math.PI));\n\n g2.setStroke(new BasicStroke(2));\n if (frontView) {\n g.setColor(Color.red);\n g.drawLine(size / 2, size / 2, size, size / 2);\n g.setColor(Color.blue);\n g.drawLine(size / 2, size / 2, size / 2, 0);\n } else {\n g.setColor(Color.green);\n //g.drawLine(size / 2, size / 2, size, size / 2);\n g.drawLine(size / 2, size / 2, size, size / 2);\n g.setColor(Color.blue);\n g.drawLine(size / 2, size / 2, size / 2, 0);\n }\n\n int circleOffset = size / 2 - radius;\n g.setColor(Color.black);\n g2.setStroke(new BasicStroke(1));\n g.drawOval(circleOffset, circleOffset, radius * 2, radius * 2);\n\n int x = (int) (Math.cos(angle) * radius);\n int y = (int) (Math.sin(angle) * radius);\n int lineOffset = size / 2;\n g.setColor(Color.orange);\n g2.setStroke(new BasicStroke(3));\n g.drawLine(lineOffset - x, lineOffset - y, lineOffset + x, lineOffset + y);\n\n }\n\n }", "public void paint(Graphics g) {\n\t\t\n\t\t//find slope - use to calculate position \n\t\tArrayList <Integer> Xpos = new ArrayList<Integer>();\n\t\tArrayList <Integer> Ypos = new ArrayList<Integer>();\n\n\t\t//contain all the x and y coordinates for horizontal lines\n\t\tArrayList <Integer> HorizXOutline = new ArrayList<Integer>();\n\t\tArrayList <Integer> HorizYOutline = new ArrayList<Integer>();\n\t\t//contain all x any y points for veritical lines\n\t\tArrayList <Integer> VertOutlineX = new ArrayList<Integer>();\n\t\tArrayList <Integer> VertOutlineY = new ArrayList<Integer>();\n\t\t//contain all x and y points of postive and pos diag lines\n\t\tArrayList <Integer> PosDiagOutlineX = new ArrayList<Integer>();\n\t\tArrayList <Integer> PosDiagOutlineY = new ArrayList<Integer>();\n\t\t//contain all x and y points of postive and neg diag lines\n\t\tArrayList <Integer> NegDiagOutlineX = new ArrayList<Integer>();\n\t\tArrayList <Integer> NegDiagOutlineY = new ArrayList<Integer>();\n\n\t\tg.setColor(Color.green);\n\t\t//adding outer shape x coord\n\t\tXpos.add(100);Xpos.add(100);Xpos.add(100);Xpos.add(200);\n\t\tXpos.add(200);Xpos.add(300);Xpos.add(100);Xpos.add(200);\n\t\tXpos.add(300);Xpos.add(400);Xpos.add(300);Xpos.add(350);\n\t\tXpos.add(400);Xpos.add(350);Xpos.add(300);Xpos.add(350);\n\t\tXpos.add(400);Xpos.add(350);Xpos.add(200);Xpos.add(300);//Xpos.add(120);Xpos.add(120);\n\t\tSystem.out.println(Xpos.size());\n\t\t//g.drawArc(100, 10, 200, 200, 0, 360);\n\t\t//adding outer shape y coord\n\t\tYpos.add(100);Ypos.add(10);Ypos.add(10);Ypos.add(10);\n\t\tYpos.add(10);Ypos.add(110);Ypos.add(100);Ypos.add(200);\n\t\tYpos.add(300);Ypos.add(300);Ypos.add(300);Ypos.add(180);\n\t\tYpos.add(300);Ypos.add(180);Ypos.add(300);Ypos.add(420);\n\t\tYpos.add(300);Ypos.add(420);Ypos.add(200);Ypos.add(110);//Ypos.add(100);Ypos.add(10);\n\t\tfor(int x =0;x<Xpos.size();x+=2){\n\t\t\tg.drawLine(Xpos.get(x), Ypos.get(x), Xpos.get(x+1), Ypos.get(x+1));\n\t\t\tif(Ypos.get(x)==Ypos.get(x+1)){\n\t\t\t\tHorizXOutline.add(x);HorizXOutline.add(x+1);\n\t\t\t\tHorizYOutline.add(x);HorizYOutline.add(x+1);\n\t\t\t\tg.drawLine(Xpos.get(x),Ypos.get(x)+20,Xpos.get(x+1),Ypos.get(x+1)+20);\n\t\t\t}\n\t\t\telse if(Xpos.get(x)==Xpos.get(x+1)){\n\t\t\t\tVertOutlineX.add(x);VertOutlineX.add(x+1);\n\t\t\t\tVertOutlineY.add(x);VertOutlineY.add(x+1);\n\t\t\t\tg.drawLine(Xpos.get(x)+20,Ypos.get(x),Xpos.get(x+1)+20,Ypos.get(x+1));\n\t\t\t}\n\t\t\tif((Ypos.get(x+1)-Ypos.get(x))!=0)\n\t\t\t{\n\t\t\t\tint slope = (Xpos.get(x)-Xpos.get(x+1))/(Ypos.get(x+1)-Ypos.get(x));\n\t\t\t\tif(slope<0){\n\t\t\t\t\tNegDiagOutlineX.add(x);NegDiagOutlineX.add(x+1);\n\t\t\t\t\tNegDiagOutlineY.add(x);NegDiagOutlineY.add(x+1);\n\t\t\t\t\tif(Xpos.get(x)<=100){\n\t\t\t\t\t\tg.drawLine(Xpos.get(x),Ypos.get(x)-20,Xpos.get(x+1)+10,Ypos.get(x+1)-10);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\tg.drawLine(Xpos.get(x),Ypos.get(x)+20,Xpos.get(x+1)-10,Ypos.get(x+1)+10);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(slope>0){\n\t\t\t\t\tPosDiagOutlineX.add(x);PosDiagOutlineX.add(x+1);\n\t\t\t\t\tPosDiagOutlineY.add(x);PosDiagOutlineY.add(x+1);\n\t\t\t\t\tg.drawLine(Xpos.get(x)-10,Ypos.get(x)-10,Xpos.get(x+1)-10,Ypos.get(x+1)-10);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n//\t for(int x = 0;x<=120;x+=10){\n//\t \t//change in x-3900/-13 = Xpos\n//\t \tint xpos1 = (int)(350 +(x/10)*(-50/11));\n//\t \tint xpos2 = (int)(350+(x/10)*(50/11));\n//\t \tint ypos = 180+x;\n//\t \tg.setColor(Color.red);\n//\t \tg.drawLine(xpos1, ypos, xpos2, ypos);\n//\t \tXpos.add(xpos1);Ypos.add(ypos);Xpos.add(xpos2);Ypos.add(ypos);\n//\t }\n//\t // g.setColor(Color.blue);\n//\t ////.drawRect(200, 100, 100, 100);\n//\t // g.setColor(Color.red);\n//\t double slope = (300-200)/(110-10);\n//\t int y = (int) (100-slope*20);\n//\t // g.drawRect(220, 130-y, 100, 100);\n//\t for(int x = 20;x<=100;x+=10){\n//\t \t//Y=slope*x+0 : (Y)/slope = X where Y = interval of 20\n//\t \tint ypos = (int)(x/slope)+190;\n//\t \tg.drawLine(100, x, ypos, x);\n//\t \tXpos.add(100);Ypos.add(x);Xpos.add(ypos);Ypos.add(x);\n//\t }\n\t // g.drawLine(300, 100, 200, 200);\n//\t for(int x = 100;x<=200;x+=10){\n//\t \tdouble circleypos = 200+ Math.sqrt((200-x)*100);\n//\t \tg.drawLine(x, x, (int)(circleypos), x);\n//\t \t\n//\t }\n\t double totalDist=0;\n\t for(int x=0; x<Xpos.size();x+=2){\n\t int xd = Xpos.get(x+1)-Xpos.get(x); xd = xd*xd;\n\t int yd = Ypos.get(x+1)-Ypos.get(x); yd = yd*yd;\n\t int distance = (int) (Math.sqrt(xd+yd));\n\t totalDist +=distance;\n\t System.out.println(\"The length of this line is\" + distance + \" and the total distance as of now is \" + totalDist);\n\t }\n\t}", "@Override public void draw(){\n // this take care of applying all styles (colors/stroke)\n super.draw();\n // draw our shape\n pg.ellipseMode(PGraphics.CORNER); // TODO: make configurable\n pg.ellipse(0,0,getSize().x,getSize().y);\n }", "void draw(Graphics g, int xoff, int yoff) {\n this.draw(g, xoff, yoff, 0, 0, this.getWidth(), this.getHeight());\n }", "@Override\n\t\tprotected void paintComponent(Graphics g) {\n\t\t\tint width = getWidth();\n\t\t\tint height = getHeight();\n\t\t\tint x = (width - icon.getIconWidth()) / 2;\n\t\t\tint y = icon.getIconHeight() / 2;\n\t\t\tg.setColor(Color.darkGray);\n\t\t\tg.fillRect(0, 0, width, height);\n\t\t\ticon.paintIcon(this, g, x, y);\n\t\t}", "public void draw(Graphics g) {\n image.paintIcon(null, g, xPos, yPos);\n }", "protected synchronized void paintComponent(Graphics g) {\n /*Call the paintComponent of the super class*/\n super.paintComponent(g);\n\n /*Cast the object to a Graphics2D object*/\n Graphics2D g2 = (Graphics2D) g;\n\n /*Enable rendering Antialiasing and other rendering optimizations*/\n g2.setRenderingHint (RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n\n g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,\n\t\t\t\t\tRenderingHints.VALUE_TEXT_ANTIALIAS_ON);\n\n\n /***\n * Loop through the List that holds all the shapes.\n * shapesBuffer list and Draw them on screen\n */\n for (int i=0; i<labelBuffer.size(); i++)\n {\n /*Get the Concept for each index i*/\n ShapesInterface currentConcept = (ShapesInterface) labelBuffer.get(i);\n\n \n /*Pass from the connected List*/\n if (currentConcept instanceof ShapeConcept || currentConcept instanceof ShapeLinking) {\n for (int k=0; k<currentConcept.getConnComponenetsList().size(); k++) {\n /*Get the center point of this Concept*/\n Point p1 = currentConcept.getCenter();\n Point p2 = ((ShapesInterface) currentConcept.getConnComponenetsList().get(k)).getCenter();\n \n //Point p2 = ((ShapeConcept) currentConcept.getConnComponenetsList().get(k)).getCenter();\n\n g2.draw(new Line2D.Double(p1.x, p1.y, p2.x, p2.y));\n }//end for\n }//end if check\n }//end for\n\n}", "private void drawAxes() {\n float margin = 90;\n\n //TODO tony va a hacer que el eje aparezca abajo\n //X rojo\n text(\"+X\",margin,-2,0);\n text(\"-X\",-margin,-2,0);\n stroke(210, 0, 0);\n line(-size,0,0,size,0,0);\n\n //Y verde\n text(\"-Z\",2,margin,0);\n text(\"+Z\",2,-margin,0);\n stroke(0, 210, 0);\n line(0,-size,0,0,size,0);\n\n //Z azul\n text(\"+Y\",5,0,margin);\n text(\"-Y\",5,0,-margin);\n stroke(0, 0, 210);\n line(0, 0, -size,0,0, size);\n }", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制圆形\");\n\t}", "@Override\n public void drawFigure(Graphics2D g) {\n\n g.setPaint(figurePaint);\n g.fillRect(X, Y, width, height);\n g.setColor(lineColor);\n g.setStroke(new BasicStroke(2));\n g.drawRect(X,Y,width,height);\n }", "@Override\r\n\tpublic void draw() {\n\t\tdecoratedShape.draw();\r\n\t\tsetRedBorder(decoratedShape);\r\n\t}", "private void drawMarker(LatLng point){\n MarkerOptions markerOptions = new MarkerOptions();\n\n // Setting latitude and longitude for the marker\n markerOptions.position(point);\n\n // Adding marker on the Google Map\n mGoogleMap.addMarker(markerOptions);\n }", "public void draw(GraphicsContext gc) {\n draw(gc, arrow);\n }", "void RenderLocalMarkers(/*ID3D11DeviceContext* pDC*/)\n {\n }", "@Override\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tGraphics2D g2 = (Graphics2D) g; \n\t\tg2.setColor(Color.lightGray);\n\t\tg2.fill(model.bg);\n\t\tg2.setColor(Color.darkGray);\n\t\tg2.fillPolygon(model.terrain);\n\t\tg2.setColor(Color.gray);\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t\tg2.draw(model.circles.get(i));\n\t\t}\n\t\tif (model.curCircleSel != -1) {\n\t\t\tg2.setColor(Color.white);\n\t\t\tg2.setStroke(new BasicStroke(3));\n\t\t\tg2.draw(model.circles.get(model.curCircleSel));\n\t\t}\n\t\tg2.setColor(Color.RED);\n\t\tg2.fill(model.pad);\n\t\tif (curPadSel) {\n\t\t\tg2.setColor(Color.white);\n\t\t\tg2.setStroke(new BasicStroke(3));\n\t\t\tg2.draw(model.pad);\n\t\t}\n\t}", "@Override\n\tpublic void Draw(Graphics2D g, double zoomFactor, boolean isDeleted, boolean isSelected) {\n\t\tColor prev = g.getColor();\n\n\t\tif (!isSelected) {\n\t\t\tg.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), 100));\n\t\t}\n\n\t\tif (isSelected) {\n\t\t\tg.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), 200));\n\t\t}\n\n\t\t// Draw the ellipsoid\n\t\tif (area != null) {\n\t\t\tg.fill(area);\n\t\t}\n\n\t\t// Draw the handles\n\t\tsuper.Draw(g, zoomFactor, isDeleted, isSelected);\n\n\t\tg.setColor(prev);\n\t}", "@Override\n\tpublic void Draw(Graphics2D g, double zoomFactor, boolean isDeleted, boolean isSelected) {\n\t\tColor prev = g.getColor();\n\n\t\tif (!isSelected) {\n\t\t\tg.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), 100));\n\t\t}\n\n\t\tif (isSelected) {\n\t\t\tg.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), 200));\n\t\t}\n\n\t\t// Draw the ellipsoid\n\t\tif (area != null) {\n\t\t\tg.fill(area);\n\t\t}\n\n\t\t// Draw the handles\n\t\tsuper.Draw(g, zoomFactor, isDeleted, isSelected);\n\n\t\tg.setColor(prev);\n\t}", "private void drawAxesGrid(Graphics g, int sizex, int sizey){\r\n\r\n\t\tint maxx = sizex - 1;\r\n\t\tint maxy = sizey - 1;\r\n\r\n\t\tGraphics2D g2d = (Graphics2D) g;\r\n\r\n\t\t//Koordinatengitter zeichnen, wenn gewuenscht\r\n\t\tif(gridColor != null){\r\n\t\t\tg2d.setColor(gridColor);\r\n\t\t\tdouble tickdist = ((double)maxx) / ((double) noofxintv);\r\n\t\t\tfor (int i = 0; i <= noofxintv; i++){\r\n\t\t\t\tg2d.drawLine((int)(i*tickdist), 0, (int)(i*tickdist), (int)(maxy));\r\n\t\t\t}\r\n\t\t\ttickdist = ((double)maxy) / ((double) noofyintv);\r\n\t\t\tfor (int i = 0; i <= noofyintv; i++){\r\n\t\t\t\tg2d.drawLine(0, (int)(i*tickdist), (int)(maxx), (int)(i*tickdist));\r\n\t\t\t}\r\n\t\t}\r\n\t}" ]
[ "0.66770905", "0.6501033", "0.6471072", "0.64073086", "0.6139598", "0.6052481", "0.60003793", "0.5927891", "0.5889921", "0.5879551", "0.5844737", "0.5838541", "0.57924575", "0.5763179", "0.57376564", "0.5737564", "0.5716848", "0.569406", "0.56918836", "0.5580149", "0.5565182", "0.5528829", "0.55252135", "0.5524586", "0.5519255", "0.55172765", "0.54963917", "0.5489773", "0.54662687", "0.5439087", "0.5421416", "0.54196966", "0.54179835", "0.54177934", "0.54127693", "0.53872937", "0.5370188", "0.53632826", "0.53631014", "0.53603476", "0.5354357", "0.5351575", "0.53504324", "0.5347156", "0.53450805", "0.5321309", "0.53208226", "0.53154904", "0.5313445", "0.5300341", "0.5293511", "0.5289973", "0.5285968", "0.5284796", "0.5280932", "0.52777505", "0.52709657", "0.5266183", "0.5260899", "0.525468", "0.5220998", "0.51962906", "0.5176539", "0.5176362", "0.5161166", "0.5160976", "0.51549506", "0.5153162", "0.51524407", "0.5147233", "0.5144801", "0.5125055", "0.51238024", "0.51233554", "0.5120445", "0.51173806", "0.5116645", "0.510987", "0.5108904", "0.5108069", "0.50991654", "0.50885427", "0.5081609", "0.50722927", "0.50722563", "0.507149", "0.5066953", "0.50666153", "0.5063238", "0.5058673", "0.50554556", "0.5051839", "0.5050013", "0.5047537", "0.504346", "0.50420976", "0.50411534", "0.50389683", "0.50389683", "0.50267017" ]
0.5409405
35
TODO Autogenerated method stub
private Node CreateTree() { Scanner sc = new Scanner(System.in); Queue<Node> q = new LinkedList<>(); int item = sc.nextInt(); Node nn = new Node(); nn.val = item; root = nn; q.add(nn); while (!q.isEmpty()) { Node rv = q.poll(); int c1 = sc.nextInt(); int c2 = sc.nextInt(); if (c1 != -1) { Node node = new Node(); node.val = c1; rv.left = node; q.add(node); } if (c2 != -1) { Node node = new Node(); node.val = c2; rv.right = node; q.add(node); } } return root; }
{ "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
Extracts the uuid from a uri.
private UUID uuidFromUri(URI uri) { Pattern pairRegex = Pattern.compile("\\p{XDigit}{8}-\\p{XDigit}{4}-\\p{XDigit}{4}-\\p{XDigit}{4}-\\p{XDigit}{12}"); Matcher matcher = pairRegex.matcher(uri.toString()); String uuid = ""; while (matcher.find()) { uuid = matcher.group(0); } return UUID.fromString(uuid); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getIdFromURI(final String uri) {\r\n\r\n if (uri == null) {\r\n return null;\r\n }\r\n Matcher matcher = PATTERN_GET_ID_FROM_URI_OR_FEDORA_ID.matcher(uri);\r\n if (matcher.find()) {\r\n return matcher.group(1);\r\n }\r\n else {\r\n return uri;\r\n }\r\n }", "private String extractHostFromDBUrl(String url) throws Exception {\n\t\tint start = url.indexOf(\"sid=\") + 4;\n\t\tif (start > 3) {\n\t\t\tint stop = url.indexOf(\")\", start);\n\t\t\tif (stop > -1) {\n\t\t\t\treturn url.substring(start, stop);\n\t\t\t}\n\t\t} else {\n\t\t\tlog.warn(\"Try to extract sid from short url\");\n\t\t\tstart = url.lastIndexOf(\":\") + 1;\n\t\t\tif (start > 0) {\n\t\t\t\treturn url.substring(start, url.length());\n\t\t\t}\n\t\t}\n\t\tthrow new Exception(\"Unable to extract the SID from the URL \" + url);\n\t}", "private String getUUIDByUserIdentity(String identity) {\n\t\tString userUUID = null;\n\t\tJSONObject jsonObj;\n\t\ttry {\n\t\t\tjsonObj = new JSONObject(identity);\n\t\t\tif (jsonObj.has(\"entryuuid\"))\n\t\t\t\tuserUUID = jsonObj.getJSONArray(\"entryuuid\").getString(0);\n\t\t\telse if (jsonObj.has(\"entryUUID\"))\n\t\t\t\tuserUUID = jsonObj.getJSONArray(\"entryUUID\").getString(0); // TODO\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Add\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// by\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Alston\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// @20150917\n\t\t\telse if (jsonObj.has(\"uid\")) // TODO Add by Alston @20150917\n\t\t\t\tuserUUID = jsonObj.getJSONArray(\"uid\").getString(0); // TODO Add\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// by\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Alston\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// @20150917\n\t\t} catch (JSONException e) {\n\t\t\tlogger.error(\"JSONException: \", e);\n\t\t}\n\n\t\treturn userUUID;\n\t}", "public static String getPlaceId(Uri uri) {\n\t\t\treturn uri.getLastPathSegment();\n\t\t}", "private static String getResourceName(String uri) {\r\n int p = uri.lastIndexOf('/');\r\n if (p != -1) {\r\n return uri.substring(p + 1);\r\n } else {\r\n return uri;\r\n }\r\n }", "public static long getIdFromUri(Uri uri)\n {\n return ContentUris.parseId(uri);\n }", "URI uri();", "private String removeFragment(String uri) {\n String result = uri;\n int hashPos = uri.indexOf(\"#\");\n if (hashPos >= 0) {\n result = uri.substring(0, hashPos);\n }\n return result;\n }", "public static String getPlaceDetailId(Uri uri) {\n\t\t\treturn uri.getLastPathSegment();\n\t\t}", "public static String getUsername(URI uri) {\r\n final String userInfo = uri.getUserInfo();\r\n if (userInfo != null) {\r\n final int index = userInfo.indexOf(':');\r\n return index < 0 ? userInfo : userInfo.substring(0, index);\r\n }\r\n return null;\r\n }", "public static long getMovieIdFromUri(Uri uri)\n {\n return ContentUris.parseId(uri);\n }", "public static long getMovieIdFromUri(Uri uri)\n {\n return ContentUris.parseId(uri);\n }", "java.lang.String getUUID();", "public static String verifierUri(String uri) {\n\t\treturn uri.charAt(uri.length() - 1) == '/' ? uri : uri + \"/\";\n\t}", "protected String parsePrimaryId(String uriTxt) {\n\t\tString id = null;\n\t\tint idx = uriTxt.lastIndexOf(QuickLinksAction.CHAR_SLASH);\n\t\tif (idx < uriTxt.length()) \n\t\t\tid = uriTxt.substring(idx+1);\n\t\treturn id;\n\t}", "String getUuid();", "UUID getUUID();", "private String getFullRemoteURI(String uri) {\n return REMOTE_NS_PREFIX + \":\" + uri;\n }", "protected URI getImportOrcidIdURI(String uid, UriInfo uriInfo) {\n\t\tUriBuilder builder = UriBuilder.fromUri(uriInfo.getBaseUri());\n\t\tbuilder.path(\"uid\");\n\t\tbuilder.path(uid);\n\t\tbuilder.path(\"export\").path(\"orcid\").path(\"create/process\");\n\t\treturn builder.build();\n\t}", "public static UUID Parse(String val) {\n return new UUID(val);\n }", "public static Optional<UUID> getGameIdFromSpecifiedGameEndpoint(String endpoint) {\n Optional<String> strId = getIdAsStrFromSpecifiedGameEndpoint(endpoint);\n if (strId.isPresent()) {\n if (UUIDUtils.isValidUUID(strId.get())) {\n return Optional.of(UUID.fromString(strId.get()));\n }\n return Optional.empty();\n } else {\n return Optional.empty();\n }\n }", "private String buildUriFromId(String baseUri, String id){\n\t\treturn baseUri + \"/\" + id;\n\t}", "private String decodeUserId(String encodedUri) {\n\t\tString decoded = new String(DatatypeConverter.parseBase64Binary(encodedUri));\r\n\t\tSystem.out.println(\"user id is \" + decoded);\r\n\t\treturn decoded;\r\n\t}", "public Person getPerson(URI uri) {\n return uri == null ? null : getPerson(uri.toString());\n }", "UUID primaryFormat();", "public static String getName(URI uri) {\n\t\tif (uri != null) {\n\t\t\tString location = uri.getSchemeSpecificPart();\n\t\t\tif (location != null) {\n\t\t\t\tString name = location;\n\t\t\t\tint index = location.lastIndexOf('/');\n\t\t\t\tif (index != -1) {\n\t\t\t\t\tname = name.substring(index + 1, name.length());\n\t\t\t\t}\n\t\t\t\treturn name;\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "URI getUri();", "java.lang.String getUri();", "java.lang.String getUri();", "public String getUUIDFromAAALegacy(String token) throws Exception {\n\t\tString uuid = null;\n\n\t\tHttpURLConnection httpConn;\n\t\thttpConn = this.setHttpConnection(openAMLocation\n\t\t\t\t+ \"/identity/attributes?subjectid=\" + token\n\t\t\t\t+ \"&attributenames=entryUUID\");\n\t\tthis.setGetHttpConnection(httpConn);\n\n\t\tBufferedReader br = this.getHttpInputReader(httpConn);\n\t\tString str;\n\t\tString uuidTag = \"userdetails.attribute.value=\";\n\n\t\tif (httpConn.getResponseCode() == 200) {\n\t\t\twhile ((str = br.readLine()) != null) {\n\t\t\t\tlogger.info(\"{}\", str);\n\t\t\t\tint location = str.indexOf(uuidTag);\n\t\t\t\tif (location != -1) {\n\t\t\t\t\tuuid = str.substring(location + uuidTag.length());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn uuid;\n\t}", "@Override\n\tpublic UUID decode(String urn) {\n\t\tif (!isUuidUrn(urn)) {\n\t\t\tthrow InvalidUuidException.newInstance(urn);\n\t\t}\n\t\treturn StringCodec.INSTANCE.decode(urn);\n\t}", "String getUri( );", "String getBaseUri();", "User getUserByUUID(String uuid);", "java.lang.String getUid();", "java.lang.String getUid();", "@Test\r\n public void testRegexp() throws Exception {\n\r\n String a = \"a/b/100/test\";\r\n\r\n Pattern pattern = Pattern.compile(\".+/(\\\\d+)/test\");\r\n\r\n System.out.println(parseIdFromUriPath(a, pattern));\r\n\r\n }", "public static String uriToPath(String u) {\n return uriToPath(uriStoreLocation(u), u.substring(6));\n }", "public URI getId();", "public URI getId();", "public UUID getUuid();", "java.lang.String getToUid();", "public static String getUriPathFromUrl(final String url) {\n // URI = scheme:[//authority]path[?query][#fragment]\n String uri = url;\n if(url != null && url.length() > 0) {\n final int ejbcaIndex = url.indexOf(\"/ejbca\");\n if (ejbcaIndex != -1) {\n uri = url.substring(ejbcaIndex);\n // TODO Temporary\n uri = uri.replaceAll(\"//\", \"/\");\n final int questionMarkIndex = uri.indexOf('?');\n uri = (questionMarkIndex == -1 ? uri : uri.substring(0, questionMarkIndex));\n final int semicolonIndex = uri.indexOf(';');\n uri = (semicolonIndex == -1 ? uri : uri.substring(0, semicolonIndex));\n final int numberSignIndex = uri.indexOf('#');\n uri = (numberSignIndex == -1 ? uri : uri.substring(0, numberSignIndex));\n }\n }\n return uri;\n }", "public static String cleanImdbId(Resource url) {\n String imdbId = \"\";\n if(!(url == null)) {\n imdbId = url.getURI().toString();\n }\n Pattern p = Pattern.compile(\"tt[\\\\d]+\");\n Matcher m = p.matcher(imdbId);\n if(m.find()) {\n imdbId = m.group();\n }\n return imdbId;\n }", "public void removeByUuid(java.lang.String uuid);", "String getUid();", "String parseUID(long uid);", "public static Optional<String> getIdAsStrFromSpecifiedGameEndpoint(String endpoint) {\n Matcher matcher = getGameIdPattern.matcher(endpoint);\n if (matcher.find()) {\n return Optional.of(matcher.group());\n }\n return Optional.empty();\n }", "void delete(String uuid);", "public static URI toPublicURI(URI uri) {\r\n if (getPassword(uri) != null) {\r\n final String username = getUsername(uri);\r\n final String scheme = uri.getScheme();\r\n final String host = uri.getHost();\r\n final int port = uri.getPort();\r\n final String path = uri.getPath();\r\n final String query = uri.getQuery();\r\n final String fragment = uri.getFragment();\r\n final String userInfo = username == null ? null : username + \":***\";\r\n try {\r\n return new URI(scheme, userInfo, host, port, path, query, fragment);\r\n } catch (URISyntaxException e) {\r\n // Should never happen\r\n }\r\n }\r\n return uri;\r\n }", "String getUri();", "public static String getUriType(String u) {\r\n\t\tString isit = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tURL urlObj = new URL(u);\r\n\t\t\tURLConnection con = urlObj.openConnection();\r\n\t\t\tif(con.getContentType()!=\"content/unknown\") {\r\n\t\t\t\tisit = \"URL\";\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tisit=null;\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinal String MAGNET_REGEX= \"^magnet:\\\\?xt=urn:btih:[a-zA-Z0-9]*.*\";\r\n\t\tPattern t = Pattern.compile(MAGNET_REGEX);\r\n\t\tMatcher mag = t.matcher(u);\r\n\t\tif (mag.find()){isit=\"Torrent\";}\r\n\t\treturn isit;\r\n\t}", "public UUID(String name) {\n String normalised = name.toLowerCase().replace(\"-\", \"\");\n Matcher matcher = hex32.matcher(normalised);\n if (!matcher.find()) {\n throw new IllegalArgumentException(\"Unable to extract 32 digit hex from '\" + name + \"'\");\n }\n String match = matcher.group(1); // hex is unsigned 128bit, så we need the shift trick\n first64 = (Long.parseLong(match.substring(0, 8), 16) << 32) | Long.parseLong(match.substring(8, 16), 16);\n second64 = (Long.parseLong(match.substring(16, 24), 16) << 32) | Long.parseLong(match.substring(24, 32), 16);\n }", "private String getFullLocalURI(String uri) {\n return LOCAL_NS_PREFIX + \":\" + uri;\n }", "public static long getContactInformationId(Uri uri) {\n return ContentUris.parseId(uri);\n }", "private static String decodeAndCleanUriString(HttpServletRequest request, String uri) {\n uri = decodeRequestString(request, uri);\n int semicolonIndex = uri.indexOf(';');\n return (semicolonIndex != -1 ? uri.substring(0, semicolonIndex) : uri);\n }", "@NonNull\n public String normalizeIdentifier(@NonNull String identifier) {\n return UuidAdapter.UUID_PATTERN.matcher(identifier).matches()\n ? ObjectUtils.notNull(identifier.toLowerCase(Locale.ROOT))\n : identifier;\n }", "private static UUID uuidFromDSUID(String dsuid) {\n return UUID.fromString(\n dsuid.substring(0, 8) + \"-\" +\n dsuid.substring(8, 12) + \"-\" +\n dsuid.substring(12, 16) + \"-\" +\n dsuid.substring(16, 20) + \"-\" +\n dsuid.substring(20, 32));\n }", "public static String getObjidFromHref(final String href) {\r\n return href.substring(href.lastIndexOf('/') + 1);\r\n }", "Attr getURIAsAttr();", "public static String parseUuidOrDefault(String s, String defaultStr) {\n Matcher m = UUID_PATTERN.matcher(s.toLowerCase());\n if (m.matches()) {\n return m.group(1);\n }\n return defaultStr;\n }", "@Override\n public String getIdFromHref(String href) {\n int spos = href.indexOf(\"#\");\n if (spos == -1) {\n throw new IllegalArgumentException(href + \" is not a valid href\");\n }\n String ns = href.substring(0, spos);\n int dpos = ns.indexOf(\".\");\n if (dpos == -1) {\n throw new IllegalArgumentException(href + \" is not a valid href\");\n }\n String prefix = ns.substring(dpos + 1, ns.length());\n if (!this.prefix.equals(prefix)) {\n throw new IllegalArgumentException(\"Expected href with prefix=\" + this.prefix);\n }\n return href.substring(spos + 1);\n }", "public static String getHashFromUrl(String url) {\n int pos = url.indexOf('#');\n if (pos > 0) {\n return url.substring(pos + 1);\n } else {\n return \"\";\n }\n }", "public static String makeResourceFromURI(String uri) {\n String path = uri.substring(MagicNames.ANTLIB_PREFIX.length());\n String resource;\n if (path.startsWith(\"//\")) {\n //handle new style full paths to an antlib, in which\n //all but the forward slashes are allowed.\n resource = path.substring(\"//\".length());\n if (!resource.endsWith(\".xml\")) {\n //if we haven't already named an XML file, it gets antlib.xml\n resource += ANTLIB_XML;\n }\n } else {\n //convert from a package to a path\n resource = path.replace('.', '/') + ANTLIB_XML;\n }\n return resource;\n }", "String getURI();", "String getURI();", "String getURI();", "@Override\n public long getUUID() {\n return endpointHandler.getUUID();\n }", "abstract String getUri();", "URISegment createURISegment();", "public abstract String getUuid();", "Uri decodeRefUri(String s, XElem elem)\n { \n Uri uri = new Uri(s);\n if (!uri.isFragment()) return uri;\n \n // check if we've already parsed the obj to which\n // this fragment id referneces\n Obj resolved = (Obj)fragIds.get(s); \n if (resolved != null)\n { \n uri.setResolved(resolved);\n return uri;\n } \n \n // if not then this uri is forwardly used (or \n // maybe missing), so just store it away \n FragRefs refs = (FragRefs)fragRefs.get(s);\n if (refs == null) fragRefs.put(s, refs = new FragRefs());\n refs.uris.add(uri);\n refs.elems.add(elem);\n \n return uri;\n }", "private Integer getId(final URI uri) {\n //Preconditions\n assert uri != null : \"uri must not be null\";\n\n final String uriString = RDFUtility.formatResource(uri);\n Integer id = uriToIdDictionary.get(uriString);\n if (id == null) {\n id = nextId++;\n uriToIdDictionary.put(uriString, id);\n uris.add(uriString);\n assert uris.get(id).equals(uriString);\n }\n return id;\n }", "public void removeByUuid(String uuid);", "public void removeByUuid(String uuid);", "public void removeByUuid(String uuid);", "public void getUID(int seqid, String prefix, String uid);", "private static String m39043k(Uri uri) {\n if (uri == null) {\n return null;\n }\n return uri.getScheme();\n }", "private String convertStringToUuid(String input) {\n String[] uuid = new String[5];\n uuid[0] = input.substring(0, 8);\n uuid[1] = input.substring(8, 12);\n uuid[2] = input.substring(12, 16);\n uuid[3] = input.substring(16, 20);\n uuid[4] = input.substring(20, 32);\n return String.join(\"-\", uuid);\n }", "protected URI getPageURI(String uid, UriInfo uriInfo) {\n\t\tUriBuilder builder = UriBuilder.fromUri(uriInfo.getBaseUri());\n\t\tbuilder.path(\"uid\");\n\t\tbuilder.path(uid);\n\t\treturn builder.build();\n\t}", "public static String getPassword(URI uri) {\r\n final String userInfo = uri.getUserInfo();\r\n if (userInfo != null) {\r\n final int index = userInfo.indexOf(':');\r\n if (!(index < 0 || index + 1 == userInfo.length())) {\r\n return userInfo.substring(index + 1);\r\n }\r\n }\r\n return null;\r\n }", "@JsonIgnore\n public String getId() {\n return UriHelper.getLastUriPart(getUri());\n }", "public Matcher matcher(String uri);", "public static URIElement buildURIElement(String uri) throws AmazonException{\r\n\t\tint questionIndex = uri.indexOf('?');\r\n\t\tif(questionIndex > 0){\r\n\t\t\turi = uri.substring(0, questionIndex);\r\n\t\t}\r\n\t\tString[] uriElements = uri.split(\"/\");\r\n\t\tif(uriElements.length < 4){\r\n\t\t\tthrow new AmazonException(\"InCompatible URI: \" + uri);\r\n\t\t}\r\n\t\tString context = uriElements[1];\r\n\t\tString module = uriElements[2];\r\n\t\tString command = uriElements[3];\r\n\t\tString method = \"execute\";\r\n\t\tif(uriElements.length == 5 ){\r\n\t\t\tif(uriElements[4] != null || !uriElements[4].isEmpty()){\r\n\t\t\t\tmethod = uriElements[4];\r\n\t\t\t}\r\n\t\t}\r\n\t\tint dotIndex = method.indexOf('.');\r\n\t\tif(dotIndex > 0){\r\n\t\t\tmethod = method.substring(0, dotIndex);\r\n\t\t}\r\n\t\t\r\n\t\treturn new URIElement(context, module, command, method);\r\n\t}", "private Uri m2344g(String str) {\n return mo10091b(str, this.f2759a.mo9868F(), true);\n }", "String getRepositoryUUID();", "UUID getUserId(String userName) throws UserNotFoundException;", "URI createURI();", "public String getURI(String match) {\n for (String uri : uris) {\n String[] comps = uri.split(URIFilter.uriSeperator);\n for (String comp : comps) {\n if (comp.equals(match)) {\n return uri;\n }\n }\n }\n\n return null;\n }", "java.lang.String getDidUri();", "Uri mo1686a();", "static String getFilePath(URI uri) throws Exception {\n\n\t\tString uriPath = uri.getPath();\n\t\tif (uriPath == null || uriPath.length() == 0) {\n\t\t\tthrow new Exception(\"getFilePath error: provided uri (\" + uri.toString() + \") contains no path component\");\n\t\t}\n\n\t\tString path = uri.toString();\n\t\tif (path.length() > 4 && path.substring(0, 5).equals(\"file:\"))\n\t\t\tpath = path.substring(5);\n\t\t/*\n\t\t * Pattern filePat = Pattern.compile(\"file:/[/]*(.*)\"); Matcher m =\n\t\t * filePat.matcher(uri.toString()); if (m.find()) { // prtln (\"pattern found: \"\n\t\t * + m.group(1)); path = \"/\" + m.group(1); } else { prtln(\"pattern not found\");\n\t\t * }\n\t\t */\n\t\treturn path;\n\t}", "public URI getUri(String iden) {\r\n\t\tURI rtn = null;\r\n\t\tString url = null;\r\n\t\tStringBuilder strRtn = new StringBuilder(uriBuilder);\r\n\t\tif(isUri(iden)) {\r\n\t\t\tSystem.out.println(\"isUri\");\r\n\t\t\treturn valueFactory.createURI(iden);\r\n\t\t} else {\r\n\t\t\ttry {\r\n\t\t\t\turl = URLEncoder.encode(iden,\"utf-8\");\r\n\t\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tstrRtn.append(url);\r\n\t\t\trtn = valueFactory.createURI(strRtn.toString());\r\n\t\t\treturn rtn;\r\n\t\t}\r\n\t}", "@Override\n public <T extends Metadata> IRI getURI(@Nonnull T metadata) {\n\n Preconditions.checkNotNull(metadata, \"Metadata must not be null.\");\n Preconditions.checkNotNull(metadata.getUri(), \"Metadata URI must not be null.\");\n LOGGER.info(\"Creating an new default PID\");\n String id = metadata.getUri().getLocalName();\n String iri = String.join(\"#\", metadata.getUri().stringValue(), id);\n IRI pidIRI = VALUEFACTORY.createIRI(iri);\n return pidIRI;\n }", "public byte[] uri() {\n return uri;\n }", "public static boolean isUuidUrn(String urn) {\n\t\tfinal int stringLength = 45; // URN string length\n\t\tfinal int prefixLength = 9; // URN prefix length\n\t\tif (urn != null && urn.length() == stringLength) {\n\t\t\tString uuid = urn.substring(prefixLength);\n\t\t\treturn UuidValidator.isValid(uuid);\n\t\t}\n\t\treturn false;\n\t}", "@NoProxy\n public BwAttendee findAttendee(final String uri) {\n if (getNumAttendees() == 0) {\n return null;\n }\n\n int uriLen = uri.length();\n boolean hasMailTo = false;\n int uriStart = 0;\n if (uri.toLowerCase().startsWith(mailTo)) {\n hasMailTo = true;\n uriStart = 7;\n }\n\n while (uri.charAt(uriLen - 1) == '/') {\n uriLen--;\n if (uriLen <= uriStart) {\n return null;\n }\n }\n\n String uriSeg = uri.substring(uriStart, uriLen);\n\n for (BwAttendee att: getAttendees()) {\n String auri = att.getAttendeeUri();\n int auriLen = auri.length();\n int auriStart = 0;\n\n if (hasMailTo) {\n if (!auri.toLowerCase().startsWith(mailTo)) {\n return null;\n }\n\n auriStart = uriStart;\n }\n\n while (auri.charAt(auriLen - 1) == '/') {\n auriLen--;\n if (auriLen <= auriStart) {\n return null;\n }\n }\n\n if ((auriLen == uriLen) && (uriSeg.regionMatches(0, auri, auriStart, uriLen - auriStart))) {\n return att;\n }\n }\n\n return null;\n }", "public void parseUUIDHexBytes(byte[] serString, int offset) throws HyracksDataException {\n decodeBytesFromHex(serString, offset, uuidBytes, 0, 8);\n offset += 8;\n\n // Skip the hyphen part\n offset += 1;\n\n // Second part - 4 bytes\n decodeBytesFromHex(serString, offset, uuidBytes, 4, 4);\n offset += 4;\n\n // Skip the hyphen part\n offset += 1;\n\n // Third part - 4 bytes\n decodeBytesFromHex(serString, offset, uuidBytes, 6, 4);\n offset += 4;\n\n // Skip the hyphen part\n offset += 1;\n\n // Fourth part - 4 bytes\n decodeBytesFromHex(serString, offset, uuidBytes, 8, 4);\n offset += 4;\n\n // Skip the hyphen part\n offset += 1;\n\n // The last part - 12 bytes\n decodeBytesFromHex(serString, offset, uuidBytes, 10, 12);\n }", "private String getUUID(final String filename) {\n \t\t\tString uuid = uuids.get(filename);\n \t\t\tif (uuid == null) {\n \t\t\t\tuuid = UUID.randomUUID().toString();\n \t\t\t\tuuids.put(filename, uuid);\n \t\t\t}\n \t\t\treturn uuid;\n \t\t}", "public void setUuid(String uuid);" ]
[ "0.6162363", "0.5716308", "0.56288207", "0.55713326", "0.5515482", "0.5448422", "0.54479945", "0.544722", "0.54058325", "0.5385357", "0.5316835", "0.5316835", "0.52020204", "0.5170519", "0.5065249", "0.50624084", "0.50115585", "0.4993503", "0.4958445", "0.49574757", "0.4941239", "0.49085838", "0.4905916", "0.490375", "0.48828763", "0.48731953", "0.48494455", "0.48400953", "0.48400953", "0.48357305", "0.47811377", "0.4777407", "0.47510684", "0.4741866", "0.4734553", "0.4734553", "0.47264457", "0.47138977", "0.47081697", "0.47081697", "0.46818095", "0.46709868", "0.46686253", "0.46672642", "0.4666949", "0.46572906", "0.46553645", "0.46547282", "0.46543273", "0.4651315", "0.4646976", "0.46353936", "0.46326753", "0.46312332", "0.46277028", "0.4614638", "0.4605527", "0.46042785", "0.4600616", "0.45945537", "0.45917454", "0.4591495", "0.45738092", "0.45729792", "0.4564778", "0.4564778", "0.4564778", "0.4555753", "0.4553513", "0.4549729", "0.45421225", "0.4537823", "0.45350847", "0.45105177", "0.45105177", "0.45105177", "0.45073232", "0.45070893", "0.45059946", "0.44972008", "0.4496586", "0.44930136", "0.44904444", "0.44827744", "0.44779885", "0.44775355", "0.44715142", "0.44587088", "0.44443125", "0.44349676", "0.4432717", "0.44314936", "0.44088373", "0.44007066", "0.43968132", "0.43961567", "0.43948033", "0.43938154", "0.4381587", "0.43716782" ]
0.830757
0
Constructor for a new Word implementation.
public WordImplementation(final ImmutableMap<Locale, Translation> translations) { this.translations = Preconditions.checkNotNull(translations); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Word (String word) {\n\t\t// Call another constructor\n\t\tthis(word.length());\n\t\t// save the input word in this.theWord\n\t\tthis.theWord = word.toCharArray();\n\t}", "public Word(String text) {\n\t\tsuper();\n\t\tthis.text = text;\n\t}", "public DoubleWord(){\n\t\tsuper();\n\t}", "public Word (String word){\n this.word = word;\n count = 0;\n }", "public WordDictionary() {\n }", "public WordDictionary() {\n\n }", "public WordDictionary() {\n\n }", "public WordDictionary() {\n\n }", "public Word(String word) throws Exception{\n\t\tsuper();\n\t\tif(!isWordValid(word))\n\t\t\tthrow new Exception();\t\t\n\t\tkey = word;\n\t\tdefinition = \"\";\n\t}", "private SpreedWord() {\n\n }", "public Word(Position position, CharSequence word) {\n this.position = position;\n this.word = word;\n }", "public Word(String text, String postag) {\n\t\tsuper();\n\t\tthis.text = text;\n\t\tthis.postag = postag;\n\t}", "public WordDictionary() {\n \n \n }", "public WordDictionary() {\n\n }", "public DocumentWordPosition() {}", "public WordList() {\t\t//Default constructor\n\t}", "public Word(String word, String meaning) throws Exception{\n\t\tsuper();\n\t\tif(!isWordValid(word))\n\t\t\tthrow new Exception();\n\t\tkey = word;\n\t\tdefinition = meaning;\n\t}", "public WordDictionary() {\n root = new TrieNode(' ');\n maxLength = Integer.MIN_VALUE;\n }", "public Dictionary() { //constructor\r\n try {\r\n createDictionary(); //create dictionary\r\n addCustomWords(); //add any user define words in it\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public WordGenerator()\n {\n adjective1a = new ArrayList<String>();\n adjective1b = new ArrayList<String>();\n adjective1c = new ArrayList<String>();\n adjective2a = new ArrayList<String>();\n adjective2b = new ArrayList<String>();\n adjective2c = new ArrayList<String>();\n fillAdjectives();\n noun = \"\";\n adj1 = \"\";\n adj2 = \"\";\n }", "private WordNet() {\n }", "public TrieWithWord() {\n root = new TrieNodeWithWord();\n }", "public WordDictionary() {\n root = new TrieNode('#');\n }", "public WordCount() {\n }", "public WordDictionary() {\n root = new TrieNode();\n }", "public WordDictionary() {\n root = new TrieNode();\n }", "public WordDictionary() {\n root = new TrieNode();\n }", "public Word(String englishWord, String otherWord, int imageId, int audioId) {\n this.englishWord = englishWord;\n this.otherWord = otherWord;\n this.imageId = imageId;\n this.audioId = audioId;\n }", "private WordCounting() {\r\n }", "public Document()\n {\n index = 0;\n words = 0;\n sentences = 0;\n syllables = 0;\n }", "public Formatter(Word word)\n\t{\n\t\tthis.word \t\t= word;\n\t\tthis.prefixes\t= word.getPrefixes();\n\t\tthis.suffixes\t= word.getSuffixes();\n\t\tthis.infixes \t= word.getInfixes();\n\t\tthis.rootWord \t= word.getRootWord();\n\t}", "public WordDictionary() {\n root=new TrieNode();\n }", "public WordList() {\n\t\twordList = new ArrayList<>();\n\t\t// TODO Add your code here\n\t}", "public WordNode(String word, ISentence restOfSentence) {\n this.word = word;\n this.restOfSentence = restOfSentence;\n }", "public Verb(String word, String definition) {\n\t\tsuper(word, definition);\n\t}", "public WordDictionary()\n {\n root = new TrieNode1();\n\n }", "public Word(final String word1, final String level1,\n final String hint11, final String hint21) {\n\n\n this.word = word1;\n this.level = level1;\n this.hint1 = hint11;\n this.hint2 = hint21;\n }", "public Node(String wordIn) {\n MyLogger.writeMessage(\"Constructor called - \" + this.toString(), MyLogger.DebugLevel.CONSTRUCTOR);\n this.word = wordIn;\n this.wordCount = 1;\n this.left = null;\n this.right = null;\n }", "public WordDictionary() {\n root = new TreeNode();\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 WordDictionary() {\n \troot=new TrieNode(); \n \n }", "public IndexEntry(String word) {\r\n\t\tdata = word;\r\n\t\tpage = new GenericLinkedList<Integer>();\r\n\t}", "public Dictionary () {\n\t\tsuper();\n\t\t//words = new ArrayList < String > () ;\n\t}", "WordConstant createWordConstant();", "public Word(String s) throws FileNotFoundException, IOException, ParseException {\r\n\t\tword = s;\r\n\t\tjsonOsFile = downloadJSON(\"https://en.wikipedia.org/w/api.php?action=opensearch&format=json&search=\");\r\n\t\tjsonOsFile.deleteOnExit();\r\n\t\tjsonPageFile = downloadJSON(\"https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=content&format=json&titles=\");\r\n\t\tjsonPageFile.deleteOnExit();\r\n\t\tjsonOsArray = (JSONArray)(new JSONParser().parse(new FileReader(\"JSON/\" + this.word + \"_opensearch.json\")));\r\n\t\tjsonPageObject = (JSONObject) (new JSONParser().parse(new FileReader(\"JSON/\" + this.word + \"_wikipage.json\")));\r\n\t\t\r\n\t\t//At this point, we have downloaded and saved our OpenSearch.json and Wikipage.json accordingly. \r\n\t\t\r\n\t\tjparse = new JParser();\r\n\t\trelPageStrings = jparse.getRelatedPages(jsonOsArray);\r\n\t\trelPageDesc = jparse.getRelatedPageDesc(jsonOsArray);\r\n\t\t\r\n\t\t//Retrieves all of the words on the wiki page. Still requires parsing into readable data. Pages are denoted by [[ ]] surrounding them.\r\n\t\twikipageArray = jparse.getPageContents(jsonPageObject);\r\n\t\t\r\n\t\tpageKeywords = jparse.getKeysOnPage(wikipageArray);\r\n\t\t\r\n\t}", "public WordDictionary() {\n\t\tthis.checker = new SpellChecker();\n\n\t\t\ttry {\n\t\t\t\tReader reader = new InputStreamReader(WordDictionary.class.getResourceAsStream(\"/english.txt\"));\n\t\t\t\tthis.checker.initialize(reader);\n\t\t\t} catch (Exception exception) {\n\t\t\t\tSystem.err.println(\"Wrong path to dictionary file\");\n\t\t\t\texception.printStackTrace();\n\t\t\t}\n\t}", "public Phrase() {\n this(16);\n }", "public Node (String newW ) {\n word = newW;\n left = null;\n right = null;\n freq = 0;\n }", "WordList(){\r\n\t\tm_words = new HashMap();\r\n\t}", "public Generation(){\n\t\twords = new ArrayList<String>();\n\t}", "protected Sentence() {/* intentionally empty block */}", "public Builder setWord(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n word_ = value;\n onChanged();\n return this;\n }", "public WordTokenizer(final InputStream is) {\n\t\tthis(new BufferedReader(new InputStreamReader(is)));\n\t}", "public WordDictionary() {\n letters = new WordDictionary[26];\n }", "public StringNode(String word, URLLinkedList pagesContainingWord) {\n \n super();\n this.word = word;\n this.pagesContainingWord = new URLLinkedList();\n \n }", "public Keyword() {\n\t}", "public StringWordTokenizer(WordFinder wf) {\n\t\tsuper(wf);\n\t}", "private Word copyWord(Word w1) {\n return new Word(w1.word, w1.subjectivity, w1.position, w1.stemmed, w1.polarity);\n }", "public Word(String defaultTranslation, String miwok, int musicid) {\n mDefaultTranslation = defaultTranslation;\n miwokTranslation = miwok;\n mmusic_id = musicid;\n }", "public WordCount()\n {\n //initializes common variables.\n lineNums = new CircularList();\n count = 1;\n }", "public Keyword(String word, int rank){\n this.keyword = word;\n this.rank = rank;\n this.decomplist = new ArrayList<Decomposition>();\n }", "public WordTokenizer( char[] texts ) {\n\t\t// this constructor will tokenize the input texts (usually it is the char array for a whole document)\n\t\t\n\t\tString s=String.valueOf(texts);//convert character array to string\n\t\twords = s.split(\"\\\\W+\");//split string through various character\n\t\t// \\W means all the demoninate except [a-zA-Z0-9]\n\t}", "protected Word(int length) {\n\t\t// check if the length of is reasonable\n\t\tif(length > 0) {\n\t\t\t// initial the instance variables\n\t\t\tthis.length = length;\n\t\t\tthis.unrevealedSlots = this.length;\n\t\t\tthis.mask = new boolean[this.length];\n\t\t\t//each slots in the mask should be true (masked) by default\n\t\t\tfor (int i = 0; i < this.length; i++) {\n\t\t\t\tthis.mask[i] = true;\n\t\t\t}\n\t\t}else {\n\t\t\t// throw a exception if the length is not allowed\n\t\t\tthrow new RuntimeException(\"Non-positive value is unacceptable.\");\n\t\t}\n\t}", "public DictionaryWord(String text){\n\t\tthis.text = text;\n\t\tisVisible = true;\n\t}", "public Thought(String word, int dimension) {\r\n\t\tthis.representation = word;\r\n\t\tthis.count = 0;\r\n\t\tenvironmental = VectorTools.newGaussian(dimension);\r\n\t\t//lexical = VectorTools.newGaussian(dimension);\r\n\t\tlexical = VectorTools.zero(dimension);\r\n\t}", "void setWord(Word word);", "public Node() {\n // set all values that indicate whether a word exists to false\n wordExists = new boolean[NUM_VALID_CHARS];\n for (boolean e : wordExists) {\n e = false;\n }\n\n // create the pointers to the next nodes\n nexts = new Node[NUM_VALID_CHARS];\n // set them all to null to avoid infinite recursion\n for (Node e : nexts) {\n e = null;\n }\n }", "private KeyWord(final String keyWord) {\n\t\tthis.keyWord = keyWord;\n\t}", "public WordCount(String word, int count){\n this.word = word;\n this.count = count;\n }", "public DoubleDocument () {\r\n\t}", "public WordData(String word, int frequency) {\n\t\tif (word == null) {\n\t\t\tthrow new IllegalArgumentException(\"word should not be null\");\n\t\t}\n\t\tif (word.isEmpty()) {\n\t\t\tthrow new IllegalArgumentException(\"word should not be empty\");\n\t\t}\n\t\tif (frequency <= 0) {\n\t\t\tthrow new IllegalArgumentException(\"frequency always should not be negative value\");\n\t\t}\n\t\tthis.data = word;\n\t\tthis.frequency = frequency;\n\t}", "public Builder setWordBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n word_ = value;\n onChanged();\n return this;\n }", "public Word getWord() {\n return word;\n }", "public Doc() {\n\n }", "public Word(String str, ArrayList<Location> locations, ArrayList<Location> curlocations) {\n String curstr = \"\";\n for (Location loc : locations) {\n curstr += loc.getTile().getLetter();\n }\n this.str = curstr;\n this.locations = locations;\n this.curlocations = curlocations;\n }", "WordCounter(){\r\n }", "public Entry(String word){\n\t\tif (word == null){\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tthis.word = word.toLowerCase();\n\t\tlineNumber = new ArrayList<Integer>();\n\t}", "public Sentence(){\n\t\tsentence = new ArrayList<TWord>();\n\t}", "@Override\n public String getWord(){\n return word;\n }", "public StringWordTokenizer(String s) {\n\t\tsuper(s);\n\t}", "public Dictionary ( ArrayList < String > listOfWords ) {\n\t\tsuper(listOfWords.get((listOfWords.size()-1)/2));\n\t\t\n\t\t//store words list as binary tree\n\t\t//starts with left side then with right\n\t\tint start = 0;\n\t\tint end = listOfWords.size()-1;\n\t\tint mid = (start+end)/2;\n\t\tmakeTree(listOfWords, start, mid-1);\n\t\tmakeTree(listOfWords, mid+1, end);\n\t\t\n\t\t\n\t\t/**old code written by Professor below\n\t\t * \n\t\t */\n\t\t//words = listOfWords;\n\t\t//if (null == words) {\n\t\t//\twords = new ArrayList <String> ();\n\t\t//}\n\t\t\n\n\t\t\n\t}", "public MyDocument() {\r\n }", "public void configureWord() {\n }", "public JCYDocument() {}", "@Override\n public IWord clone() {\n IWord w = null;\n try {\n w = (IWord) super.clone();\n } catch (CloneNotSupportedException e) {\n e.printStackTrace();\n }\n\n return w;\n }", "public void addWord(Word word);", "public String getWord(){\r\n\t\t return word;\r\n\t }", "public Spell() {}", "public NormalSwear(String word) {\n this.word = word;\n }", "public AllWordsCounter() {\n counters = new SingleWordCounter[MAX_WORDS];\n // TODO: initialize instance variable to hold MAX_WORDS objects\n\n }", "public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}", "public AddAndSearchWord() {\n root = new TrieNode();\n }", "public VocabularyTerms() {}", "public DocumentWordPosition(String document, byte[] word, int position) {\n this.document = document;\n this.word = word;\n this.position = position;\n }", "public Builder clearWord() {\n bitField0_ = (bitField0_ & ~0x00000004);\n word_ = getDefaultInstance().getWord();\n onChanged();\n return this;\n }", "public Document() {\n }", "public String getWord(){\n return this.word;\n }", "public String getWord(){\r\n\t\treturn word;\r\n\t}", "private LowercaseWordList() {\n\n }", "public WordCount(String _word, int lnNum)\n {\n //initializes common variables \n count = 1;\n lineNums = new CircularList();\n //initializes specific passed variables\n word = _word;\n addLineNum(lnNum);\n }" ]
[ "0.8074713", "0.8020374", "0.77888304", "0.76778233", "0.7583799", "0.7554693", "0.7554693", "0.7554693", "0.7487913", "0.7472887", "0.74173874", "0.7412295", "0.7393112", "0.7323908", "0.7216839", "0.72165525", "0.7123403", "0.7013357", "0.7006024", "0.69569266", "0.6907954", "0.68879336", "0.6867227", "0.6850536", "0.68501437", "0.68501437", "0.68501437", "0.6836019", "0.68213964", "0.6792874", "0.67594504", "0.6754739", "0.67224073", "0.66982234", "0.66692036", "0.6663442", "0.6659672", "0.65608054", "0.65494454", "0.6544641", "0.6544289", "0.6513151", "0.65115875", "0.64998406", "0.6492483", "0.6488162", "0.64778966", "0.6446557", "0.63775706", "0.63214964", "0.6314957", "0.6271812", "0.62356985", "0.6218345", "0.62140644", "0.61900723", "0.6185164", "0.61786085", "0.61674726", "0.6162385", "0.61319715", "0.6124663", "0.6124548", "0.6123343", "0.61226296", "0.611491", "0.60970044", "0.6093723", "0.6081412", "0.6040087", "0.60351723", "0.6032754", "0.603133", "0.6009528", "0.6007456", "0.5999267", "0.59991235", "0.5993049", "0.5980907", "0.5973451", "0.5962166", "0.5959666", "0.59551513", "0.5952882", "0.5938159", "0.593728", "0.59104294", "0.5909281", "0.59074324", "0.5897555", "0.58967733", "0.58957005", "0.5886024", "0.5885225", "0.58828324", "0.5874749", "0.5845865", "0.58393395", "0.5834999", "0.5814841" ]
0.65886134
37
FOR SEEING AUTOWIRED WORKING
public SpeakerSerivceImpl() { System.out.println("No args in constructor"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mo4359a() {\n }", "public void mo38117a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void autoDetails() {\n\t\t\r\n\t}", "public void mo6081a() {\n }", "public void mo55254a() {\n }", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "protected void aktualisieren() {\r\n\r\n\t}", "public void mo12930a() {\n }", "public final void mo51373a() {\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\t\t\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}", "public void mo9848a() {\n }", "protected void mo6255a() {\n }", "public void mo1531a() {\n }", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t}", "private void presentShowcaseSequence() {\n }", "public void verarbeite() {\n\t\t\r\n\t}", "private boolean Verific() {\n\r\n\treturn true;\r\n\t}", "@Override\n\t\tprotected void onPreExecute() \n\t\t{\n\t\t}", "public void mo3376r() {\n }", "@Override\n\tpublic void atirou() {\n\n\t\t\tatirou=true;\n\t\t\t\n\t\t\n\t}", "public void baocun() {\n\t\t\n\t}", "public void mo1531a() {\n C2201w.m8373a(\"Photo TransferData start!\", 1);\n }", "void mo67924c();", "public void working()\n {\n \n \n }", "public void mo21791P() {\n }", "public void clickonFullyAutomaticFrontLoad() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private void strin() {\n\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}", "public void mo21795T() {\n }", "private stendhal() {\n\t}", "@Override\n\t\t\tprotected void onPreExecute()\n\t\t\t{\n\n\t\t\t}", "@Override\n\t\t\tpublic void onPreExecute() {\n\t\t\t\t\n\t\t\t}", "protected boolean func_70814_o() { return true; }", "public void mo21785J() {\n }", "public void mo21825b() {\n }", "public void mo21877s() {\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t}", "public void mo21878t() {\n }", "public void mo44053a() {\n }", "@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "public void mo97908d() {\n }", "void mo60893b();", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo68520e() {\n super.mo68520e();\n C26780aa.m87959a(this.itemView, mo75290r(), this.f77546j);\n C24942al.m81837c(mo75261ab(), this.f89221bo);\n C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"otherclick\").mo65283e(\"video\").mo65270a(mo75261ab());\n }", "public void mo21794S() {\n }", "public void mo21793R() {\n }", "public void mo21779D() {\n }", "public void mo5382o() {\n }", "public void mo3749d() {\n }", "@Override\n public void perish() {\n \n }", "@Override\n\tprotected void postRun() {\n\n\t}", "@Override\r\n\t\tprotected void onPreExecute() {\n\t\t}", "public void foundationGrab(){\n\n }", "public void mo115190b() {\n }", "public void miseAJour();", "boolean hasAutomatic();", "void sitOn();", "private void kk12() {\n\n\t}", "public void mo115188a() {\n }", "void mo57278c();", "public void autonomousInit() {\n\t\t\n\t}", "protected void dopositiveClick2() {\n\n }", "public void autonomousInit() {\n \n }", "public void setThisManual()\n { \n actual = 1;\n \n nextPage = new Label();\n addObject(nextPage, 1132, 2001);\n \n prePage = new Label();\n addObject(prePage, 122, 2007);\n \n prePage.setImage(new GreenfootImage(\"\", 0, null, null));\n nextPage.setImagine(\"sipka1\");\n \n callMenu = new CallMenu();\n addObject(callMenu, 667, 60);\n }", "public void mo12628c() {\n }", "public static void traduitSiteAnglais() {\n\t\t\n\t}", "public static void traduitSiteAllemand() {\n\t\t\n\t}", "public void mo55177a() {\n C3561h5.m954c().mo55465a().execute(new C3634a());\n }", "public void mo5248a() {\n }", "@Override\r\n\tprotected void onPreExecute() {\n\t}", "long lastAutomaticRefresh();", "void mo17013d();", "public void activate(){\r\n\r\n\t}", "void mo21073d();", "@Override\n public boolean manualInitialization() {\n\treturn true;\n }", "public void mo21781F() {\n }", "public void mo3370l() {\n }", "void mo67920a();", "void mo119581a();", "void mo88524c();", "public void autonomousInit(){\n\t \t//resetAndDisableSystems();\n\t\t \n\t \tautonomousCommand = (Command) autoChooser.getSelected();\n\t \tautonomousCommand.start();\n\t \t\n\t \t\n\t }", "public void mo6944a() {\n }", "public void mo21782G() {\n }", "@Override\n\t protected void onPreExecute() {\n\t }", "protected void aktualisierenFirst() {\r\n\t\taktualisieren();\r\n\t\tfarbeSetzen(\"Weiss\");\r\n\t}" ]
[ "0.6478603", "0.6371431", "0.6287896", "0.6287896", "0.6287896", "0.6287896", "0.6287896", "0.6287896", "0.6287896", "0.62408674", "0.62314636", "0.61474353", "0.6111699", "0.6111699", "0.6111699", "0.6111699", "0.6111699", "0.6101653", "0.60963196", "0.6085081", "0.60224926", "0.6016462", "0.6016462", "0.5977503", "0.5958724", "0.5938457", "0.5922721", "0.5893293", "0.5831182", "0.5816938", "0.5792759", "0.5785571", "0.57662576", "0.57511586", "0.5735374", "0.5728129", "0.5712237", "0.5692944", "0.56928486", "0.56825894", "0.5669177", "0.56593335", "0.56446886", "0.564155", "0.5638196", "0.56356436", "0.56289124", "0.5628388", "0.56269157", "0.56252605", "0.56176215", "0.56151265", "0.5614222", "0.55964404", "0.55906606", "0.55802304", "0.55787605", "0.5575086", "0.55672526", "0.5563126", "0.5561331", "0.5555747", "0.55528283", "0.5550919", "0.55500597", "0.5547997", "0.55242026", "0.55137056", "0.55121005", "0.5511309", "0.55078065", "0.5500304", "0.54991895", "0.5499145", "0.5495551", "0.54910034", "0.54803836", "0.54800355", "0.54727274", "0.54722995", "0.54690087", "0.54683024", "0.54675174", "0.5457131", "0.54540724", "0.5448713", "0.54479533", "0.5445018", "0.54421175", "0.54395384", "0.54387087", "0.5436638", "0.54366046", "0.54334295", "0.5432637", "0.5432368", "0.5430431", "0.5426822", "0.54260635", "0.54245293", "0.54219764" ]
0.0
-1
Create a signature as a point on the E1 curve.
BlsPoint sign(BigInteger privateKey, byte[] data);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getSignature();", "String getSignature();", "String getSignature();", "SignatureIdentification createSignatureIdentification();", "SignatureSource createSignatureSource();", "ISModifySignature createISModifySignature();", "Signature getSignature();", "public abstract String getSignature();", "org.apache.calcite.avatica.proto.Common.Signature getSignature();", "private static String signFirstTime() throws AddressFormatException\n {\n ECKey key1 = ECKey.fromPrivate(new BigInteger(\"64102401986961187973900162212679081334328198710146539384491794427145725009072\"));\n\n\n // Use the redeem script we have saved somewhere to start building the transaction\n Script redeemScript = new Script(hexStringToByteArray(\"5221021ae8964b8529dc3e52955f2cabd967e08c52008dbcca8e054143b668f3998f4a210306be609ef37366ab0f3dd4096ac23a6ee4d561fc469fa60003f799b0121ad1072102199f3d89fa00e6f55dd6ecdd911457d7264415914957db124d53bf0064963f3853ae\"));\n\n // Start building the transaction by adding the unspent inputs we want to use\n // The data is taken from blockchain.info, and can be found here: https://blockchain.info/rawtx/ca1884b8f2e0ba88249a86ec5ddca04f937f12d4fac299af41a9b51643302077\n Transaction spendTx = new Transaction(params);\n ScriptBuilder scriptBuilder = new ScriptBuilder();\n scriptBuilder.data(new String(\"a9145204ad7c5fa5a2491cd91c332e28c87221194ca087\").getBytes()); // Script of this output\n TransactionInput input = spendTx.addInput(new Sha256Hash(\"fed695bf5e2c15286956a7bd3464c5beb97ef064e1f9406eba189ea844733e7c\"), 1, scriptBuilder.build());\n\n // Add outputs to the person receiving bitcoins\n Address receiverAddress = new Address(params, \"n2cWhs5sbWFCwzuuWWsVM9ubPwykGtX75T\");\n Coin charge = Coin.valueOf(1000000); // 0.1 mBTC\n Script outputScript = ScriptBuilder.createOutputScript(receiverAddress);\n spendTx.addOutput(charge, outputScript);\n\n /*8888888888888888888888888888888888888888888888888888888888888*/\n\n // Sign the first part of the transaction using private key #1\n Sha256Hash sighash = spendTx.hashForSignature(0, redeemScript, Transaction.SigHash.ALL, false);\n ECKey.ECDSASignature ecdsaSignature = key1.sign(sighash);\n TransactionSignature transactionSignarture = new TransactionSignature(ecdsaSignature, Transaction.SigHash.ALL, false);\n\n // Create p2sh multisig input script\n Script inputScript = ScriptBuilder.createP2SHMultiSigInputScript(Arrays.asList(transactionSignarture), redeemScript);\n\n // Add the script signature to the input\n input.setScriptSig(inputScript);\n System.out.println(byteArrayToHex(spendTx.bitcoinSerialize()));\n\n return byteArrayToHex(spendTx.bitcoinSerialize());\n }", "String componentSignature();", "int getSignature ();", "String getUniqueSignature();", "public byte[] generateSignature()\n {\n if (!forSigning)\n {\n throw new IllegalStateException(\"PairingDigestSigner not initialised for signature generation.\");\n }\n\n byte[] hash = new byte[digest.getDigestSize()];\n digest.doFinal(hash, 0);\n\n Element[] sig = pairingSigner.generateSignature(hash);\n\n try {\n return pairingSigner.derEncode(sig);\n } catch (IOException e) {\n throw new IllegalStateException(\"unable to encode signature\");\n }\n }", "java.lang.String getSignatureText();", "public abstract byte[] getSignature();", "public String constructSignatureBase(String str, String str2) {\n URI create = URI.create(this.url);\n TreeMap queryParams = UrlUtils.getQueryParams(create, true);\n Map<String, String> map = this.postParams;\n if (map != null) {\n queryParams.putAll(map);\n }\n String str3 = this.callback;\n if (str3 != null) {\n queryParams.put(\"oauth_callback\", str3);\n }\n queryParams.put(\"oauth_consumer_key\", this.authConfig.getConsumerKey());\n queryParams.put(\"oauth_nonce\", str);\n queryParams.put(\"oauth_signature_method\", \"HMAC-SHA1\");\n queryParams.put(\"oauth_timestamp\", str2);\n TwitterAuthToken twitterAuthToken = this.authToken;\n if (!(twitterAuthToken == null || twitterAuthToken.token == null)) {\n queryParams.put(\"oauth_token\", this.authToken.token);\n }\n queryParams.put(\"oauth_version\", \"1.0\");\n StringBuilder sb = new StringBuilder();\n sb.append(create.getScheme());\n sb.append(\"://\");\n sb.append(create.getHost());\n sb.append(create.getPath());\n String sb2 = sb.toString();\n StringBuilder sb3 = new StringBuilder();\n sb3.append(this.method.toUpperCase(Locale.ENGLISH));\n sb3.append(Typography.amp);\n sb3.append(UrlUtils.percentEncode(sb2));\n sb3.append(Typography.amp);\n sb3.append(getEncodedQueryParams(queryParams));\n return sb3.toString();\n }", "public Signer(@NotNull EllipticCurve curve) {\n this.curve = curve;\n }", "com.google.protobuf.ByteString getSignature();", "public void generateSignature(PrivateKey privateKey) {\r\n\t\t\r\n\t\tString data;\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\t\r\n\t\t\tdata = StringUtil.getStringFromKey(creator) + name +\r\n\t\t\t\t\tdescription + begin + end+end_subscription+\r\n\t\t\t\t\tlocation+min_capacity+max_capacity;\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\t\r\n\t\t\tdata = StringUtil.getStringFromKey(subscriber)+id_event;\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tsignature = StringUtil.applyECDSASig(privateKey,data);\r\n\t\tprocessTransaction();\r\n\t\t\t\r\n\t}", "default String getSignature() {\n StringBuilder sb = new StringBuilder();\n sb.append(getName());\n sb.append(\"(\");\n for (int i = 0; i < getNumberOfParams(); i++) {\n if (i != 0) {\n sb.append(\", \");\n }\n sb.append(getParam(i).describeType());\n }\n sb.append(\")\");\n return sb.toString();\n }", "public interface ECCSignature {\n BigInteger getR();\n\n BigInteger getS();\n\n ECCParameters getECCParameters();\n\n BigInteger getN();\n\n ECCPoint getG();\n\n ECCPoint getQu();\n}", "private byte[] createSignatureBase() {\n final Charset utf8 = StandardCharsets.UTF_8;\n byte[] urlBytes = url.getBytes(utf8);\n byte[] timeStampBytes = Long.toString(timestamp).getBytes(utf8);\n byte[] secretBytes = secret.getBytes(utf8);\n\n // concatenate\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n try {\n stream.write(urlBytes);\n stream.write(body);\n stream.write(timeStampBytes);\n stream.write(secretBytes);\n } catch (IOException ex){\n logger.error(\"Could not create signature base\", ex);\n return new byte[0];\n }\n\n return stream.toByteArray();\n }", "public String getSignature() {\n return \"P\" + getPointedType().getSignature();\n }", "Point createPoint();", "BigInteger getDigitalSignature();", "public void testX509SignatureThumb() throws Exception {\n WSSecSignature builder = new WSSecSignature();\n builder.setUserInfo(\"16c73ab6-b892-458f-abf5-2f875f74882e\", \"security\");\n builder.setKeyIdentifierType(WSConstants.THUMBPRINT_IDENTIFIER);\n // builder.setUserInfo(\"john\", \"keypass\");\n LOG.info(\"Before Signing ThumbprintSHA1....\");\n Document doc = unsignedEnvelope.getAsDocument();\n \n WSSecHeader secHeader = new WSSecHeader();\n secHeader.insertSecurityHeader(doc);\n\n Document signedDoc = builder.build(doc, crypto, secHeader);\n\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Signed message with ThumbprintSHA1 key identifier:\");\n String outputString = \n org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(signedDoc);\n LOG.debug(outputString);\n }\n LOG.info(\"After Signing ThumbprintSHA1....\");\n verify(signedDoc);\n }", "private ECPoint convertECPoint(java.security.spec.ECPoint point) {\n return domainParams.getCurve().createPoint(point.getAffineX(), point.getAffineY());\n }", "int getSignatureType();", "SignatureSink createSignatureSink();", "public boolean verifySignature() {\r\n\t\t\r\n\t\tString data;\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\t\r\n\t\t\tdata = StringUtil.getStringFromKey(creator) + name +\r\n\t\t\t\t\tdescription + begin + end+end_subscription+\r\n\t\t\t\t\tlocation+min_capacity+max_capacity;\r\n\t\t\treturn StringUtil.verifyECDSASig(creator, data, signature);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdata = StringUtil.getStringFromKey(subscriber)+id_event;\r\n\t\t\treturn StringUtil.verifyECDSASig(subscriber, data, signature);\r\n\t\t}\r\n//\t\tSystem.out.println(\"signature \"+signature);\r\n\t\t\r\n\t}", "public Builder setSignature(org.apache.calcite.avatica.proto.Common.Signature value) {\n if (signatureBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n signature_ = value;\n onChanged();\n } else {\n signatureBuilder_.setMessage(value);\n }\n\n return this;\n }", "@Override\n public String createSignature(final BreinConfig config, final Map<String, Object> requestData) {\n final long unixTimestamp = BreinMapUtil.getNestedValue(requestData, UNIX_TIMESTAMP_FIELD);\n\n final String message = String.format(\"%d\", unixTimestamp);\n return BreinUtil.generateSignature(message, config.getSecret());\n }", "com.google.protobuf.ByteString\n getSignatureBytes();", "com.google.protobuf.ByteString\n getSignatureBytes();", "public String generateUniqueSignature(){\n final String uuid = UniqueIdentifierGenerator.generateUniqueIdentifier();\n setSignature(uuid);\n return uuid;\n }", "public void buildSignature() throws IOException\n {\n PDFTemplateBuilder builder = new PDVisibleSigBuilder();\n PDFTemplateCreator creator = new PDFTemplateCreator(builder);\n setVisibleSignature(creator.buildPDF(getPdVisibleSignature()));\n }", "byte[] getSignatureImage();", "public GpgSignature(@NonNull byte[] signature) {\n\t\tthis.signature = signature;\n\t}", "public Builder setSig(io.lightcone.data.types.EdDSASignature value) {\n if (sigBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n sig_ = value;\n onChanged();\n } else {\n sigBuilder_.setMessage(value);\n }\n\n return this;\n }", "public static String createSignature(String owner, String name, String desc) {\n StringBuilder sb = new StringBuilder();\n\n if (desc != null) {\n Type returnType = Type.getReturnType(desc);\n sb.append(getTypeString(returnType));\n sb.append(' ');\n }\n\n if (owner != null) {\n sb.append(owner.replace('/', '.').replace('$','.'));\n }\n if (name != null) {\n sb.append('#');\n sb.append(name);\n if (desc != null) {\n Type[] argumentTypes = Type.getArgumentTypes(desc);\n if (argumentTypes != null && argumentTypes.length > 0) {\n sb.append('(');\n boolean first = true;\n for (Type type : argumentTypes) {\n if (first) {\n first = false;\n } else {\n sb.append(\", \");\n }\n sb.append(getTypeString(type));\n }\n sb.append(')');\n }\n }\n }\n\n return sb.toString();\n }", "com.microsoft.schemas.office.x2006.digsig.STSignatureType xgetSignatureType();", "org.apache.calcite.avatica.proto.Common.SignatureOrBuilder getSignatureOrBuilder();", "public org.apache.calcite.avatica.proto.Common.Signature getSignature() {\n if (signatureBuilder_ == null) {\n return signature_ == null ? org.apache.calcite.avatica.proto.Common.Signature.getDefaultInstance() : signature_;\n } else {\n return signatureBuilder_.getMessage();\n }\n }", "public byte[] sign() throws XMLSignatureException {\n/* 177 */ return this.signatureAlgorithm.engineSign();\n/* */ }", "void xsetSignatureType(com.microsoft.schemas.office.x2006.digsig.STSignatureType signatureType);", "public interface SignatureObject {\n}", "Result_RecoverableSignatureNoneZ sign_invoice(byte[] invoice_preimage);", "public void testPublicKeyEC() throws Exception {\r\n // Test encoding of a ECPoint\r\n String expectedByteStr = \"04013579024680\";\r\n BigInteger affineX = new BigInteger(\"13579\", 16);\r\n BigInteger affineY = new BigInteger(\"24680\", 16);\r\n ECPoint point = new ECPoint(affineX, affineY);\r\n byte[] data = PublicKeyEC.encodePoint(point);\r\n assertEquals(\"Encoded ECPoint\", expectedByteStr, StringConverter.byteToHex(data));\r\n \r\n // Test decoding of a ECPoint\r\n ECPoint decodedPoint = PublicKeyEC.decodePoint(new BigInteger(expectedByteStr,16).toByteArray());\r\n assertEquals(\"AffineX\", affineX, decodedPoint.getAffineX());\r\n\r\n // Create key with BouncyCastle (v1.36 supports key lengths 192, 239 and 256)...\r\n // See org.bouncycastle.jce.provider.JDKKeyPairGenerator.EC\r\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"ECDSA\", \"BC\");\r\n keyGen.initialize(239, new SecureRandom());\r\n KeyPair keyPair = keyGen.generateKeyPair();\r\n \r\n PublicKeyEC ecKey = (PublicKeyEC)KeyFactory.createInstance(keyPair.getPublic(), \"SHA1WITHECDSA\", null);\r\n assertTrue(\"ECParams is null\", ecKey.getParams()!=null );\r\n assertEquals(\"Cofactor\", 1, ecKey.getParams().getCofactor());\r\n }", "private static String generateSignature(String data, String key) throws SignatureException {\n String result;\n try {\n // get an hmac_sha1 key from the raw key bytes\n SecretKeySpec signingKey = new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), \"HmacSHA1\");\n // get an hmac_sha1 Mac instance and initialize with the signing key\n Mac mac = Mac.getInstance(\"HmacSHA1\");\n mac.init(signingKey);\n // compute the hmac on input data bytes\n byte[] rawHmac = mac.doFinal(data.getBytes(StandardCharsets.UTF_8));\n result = Base64.encodeBase64String(rawHmac);\n }\n catch (Exception e) {\n throw new SignatureException(\"Failed to generate HMAC : \" + e.getMessage());\n }\n return result;\n }", "protected void sequence_Signature(ISerializationContext context, Signature semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}", "public void setSignature( String pSignature )\r\n {\r\n this.signature = pSignature;\r\n }", "public void setSignature(String Signature) {\n this.Signature = Signature;\n }", "protected SignResult makeSignature(InputStream inputStream,\n String artifactId, String classifier, String version,\n String extension) {\n\n String targetExt = extension + \".asc\";\n String targetName = artifactId + '-' + version;\n\n if (classifier != null && !classifier.isEmpty()) {\n targetName += \"-\" + classifier;\n }\n\n targetName += \".\" + targetExt;\n\n Path target = Paths.get(project.getBuild().getDirectory(), targetName);\n\n pgpSigner.sign(inputStream, target);\n\n return new SignResult(classifier, targetExt, target.toFile());\n }", "public String getSignature()\r\n {\r\n return signature;\r\n }", "public String calculateSignature(String str) {\n try {\n String signingKey = getSigningKey();\n byte[] bytes = str.getBytes(\"UTF8\");\n SecretKeySpec secretKeySpec = new SecretKeySpec(signingKey.getBytes(\"UTF8\"), \"HmacSHA1\");\n Mac instance = Mac.getInstance(\"HmacSHA1\");\n instance.init(secretKeySpec);\n byte[] doFinal = instance.doFinal(bytes);\n return ByteString.of(doFinal, 0, doFinal.length).base64();\n } catch (InvalidKeyException e) {\n Twitter.getLogger().e(\"Twitter\", \"Failed to calculate signature\", e);\n return \"\";\n } catch (NoSuchAlgorithmException e2) {\n Twitter.getLogger().e(\"Twitter\", \"Failed to calculate signature\", e2);\n return \"\";\n } catch (UnsupportedEncodingException e3) {\n Twitter.getLogger().e(\"Twitter\", \"Failed to calculate signature\", e3);\n return \"\";\n }\n }", "public Builder setSignature(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n signature_ = value;\n onChanged();\n return this;\n }", "public Builder setSignature(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n signature_ = value;\n onChanged();\n return this;\n }", "@Override\n public String generateSignature(String requestPath, String method, String body, String timestamp) {\n try {\n String prehash = timestamp + method.toUpperCase() + requestPath + body;\n byte[] secretDecoded = Base64.getDecoder().decode(secretKey);\n SecretKeySpec keyspec = new SecretKeySpec(secretDecoded, \"HmacSHA256\");\n Mac sha256 = (Mac) GdaxConstants.SHARED_MAC.clone();\n sha256.init(keyspec);\n return Base64.getEncoder().encodeToString(sha256.doFinal(prehash.getBytes()));\n } catch (CloneNotSupportedException | InvalidKeyException e) {\n e.printStackTrace();\n throw new RuntimeErrorException(new Error(\"Cannot set up authentication headers.\"));\n }\n }", "public static void main(String[] args)\n throws NoSuchAlgorithmException, InvalidKeyException, SignatureException, UnsupportedEncodingException {\n final String text = \"We would like to provide data integrity.\";\n\n /**\n * STEP 1.\n * We create a public-private key pair.\n * Standard Algorithm Names\n * http://docs.oracle.com/javase/6/docs/technotes/guides/security/StandardNames.html\n */\n final KeyPair key = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n /**\n * Alice creates Signature object defining Signature algorithm.\n */\n final Signature signatureAlg = Signature.getInstance(\"SHA1withRSA\");\n\n /**\n * We initialize the signature object with\n * - Operation modes (SIGN) and\n * - provides appropriate ***Private*** Key\n */\n signatureAlg.initSign(key.getPrivate());\n\n // Finally, we load the message into the signature object and sign it\n signatureAlg.update(text.getBytes(\"UTF-8\"));\n final byte[] signedText = signatureAlg.sign();\n System.out.println(\"Signature: \" + DatatypeConverter.printHexBinary(signedText));\n\n /**\n * To verify the signature, we create another signature object\n * and specify its algorithm\n */\n final Signature signatureAlg2 = Signature.getInstance(\"SHA1withRSA\");\n\n /**\n * We have to initialize it with the mode. But to verify the algorithm,\n * we only need the public key of the original signee\n */\n signatureAlg2.initVerify(key.getPublic());\n\n //Finally, we can check whether the signature is valid\n signatureAlg2.update(text.getBytes(\"UTF-8\"));\n\n if (signatureAlg2.verify(signedText))\n System.out.println(\"Valid signature.\");\n else\n System.err.println(\"Invalid signature.\");\n }", "public void generateSignature(PrivateKey privateKey) {\n\t\tString data = StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(reciepient)\n\t\t\t\t+ Float.toString(value);\n\t\tsignature = StringUtil.applyECDSASig(privateKey, data);\n\t}", "public interface SignatureFactory \n{\n /** \n * initializes the implementation class \n */\n public void init()\n throws SignedDocException;\n \n /**\n * Method returns an array of strings representing the \n * list of available token names.\n * @return an array of available token names.\n * @throws SignedDocException if reading the token information fails.\n */\n public String[] getAvailableTokenNames()\n throws SignedDocException;\n \n /**\n * Method returns a digital signature. It finds the RSA private \n * key object from the active token and\n * then signs the given data with this key and RSA mechanism.\n * @param digest digest of the data to be signed.\n * @param token token index\n * @param pin users pin code\n * @return an array of bytes containing digital signature.\n * @throws SignedDocException if signing the data fails.\n */\n public byte[] sign(byte[] digest, int token, String pin) \n throws SignedDocException;\n \n /**\n * Method returns a X.509 certificate object readed \n * from the active token and representing an\n * user public key certificate value.\n * @return X.509 certificate object.\n * @throws SignedDocException if getting X.509 public key certificate \n * fails or the requested certificate type X.509 is not available in \n * the default provider package\n */\n public X509Certificate getCertificate(int token, String pin)\n throws SignedDocException;\n \n /**\n * Resets the previous session\n * and other selected values\n */\n public void reset() \n throws SignedDocException;\n \n\t/**\n\t * Method decrypts the data with the RSA private key\n\t * corresponding to this certificate (which was used\n\t * to encrypt it). Decryption will be done on the card.\n\t * This operation closes the possibly opened previous\n\t * session with signature token and opens a new one with\n\t * authentication token if necessary\n\t * @param data data to be decrypted.\n\t * @param token index of authentication token\n\t * @param pin PIN code\n\t * @return decrypted data.\n\t * @throws SignedDocException for all decryption errors\n\t */\n\tpublic byte[] decrypt(byte[] data, int token, String pin) \n\t\tthrows SignedDocException;\n\t\t\t\t\n}", "com.microsoft.schemas.office.x2006.digsig.STSignatureText xgetSignatureText();", "String getSign();", "private void setSignature(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000010;\n signature_ = value;\n }", "public String getSignature() {\n\tString sig;\n\n\tsig = dims.substring(0, dim_count);\n\tif (num_comp == 1) {\n\t if (comp[0].compareTo(\"byte\") == 0)\n\t\tsig += \"B\";\n\t else if (comp[0].compareTo(\"char\") == 0)\n\t\tsig += \"C\";\n\t else if (comp[0].compareTo(\"double\") == 0)\n\t\tsig += \"D\";\n\t else if (comp[0].compareTo(\"float\") == 0)\n\t\tsig += \"F\";\n\t else if (comp[0].compareTo(\"int\") == 0)\n\t\tsig += \"I\";\n\t else if (comp[0].compareTo(\"long\") == 0)\n\t\tsig += \"J\";\n\t else if (comp[0].compareTo(\"short\") == 0)\n\t\tsig += \"S\";\n\t else if (comp[0].compareTo(\"boolean\") == 0)\n\t\tsig += \"Z\";\n\t else if (comp[0].compareTo(\"void\") == 0)\n\t\tsig += \"V\";\n\t else {\n\t\t// Component is an object but might have implied context\n\t\tsig += \"L\" + fullName + \";\";\n\t }\n\t}\n\telse\n\t sig += \"L\" + fullName + \";\";\n\treturn(sig);\n }", "void setSignatureType(int signatureType);", "@PortedFrom(file = \"tSignatureUpdater.h\", name = \"vE\")\n private void vE(NamedEntity e) {\n sig.add(e);\n }", "public static void main(String[] args) {\n\n\t\tif (args.length != 5) {\n\t\t System.out.println(\"Usage: GenSig nameOfFileToSign keystore password sign publicKey\");\n\n\t\t }\n\t\telse try{\n\n\t\t KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());\n\t\t ks.load(new FileInputStream(args[1]), args[2].toCharArray());\n\t\t \n\t\t String alias = (String)ks.aliases().nextElement();\n\t\t PrivateKey privateKey = (PrivateKey) ks.getKey(alias, args[2].toCharArray());\n\n\t\t Certificate cert = ks.getCertificate(alias);\n\n\t\t // Get public key\t\n\t\t PublicKey publicKey = cert.getPublicKey();\n\n\t\t /* Create a Signature object and initialize it with the private key */\n\n\t\t Signature rsa = Signature.getInstance(\"SHA256withRSA\");\t\n\t\n\n\t\t rsa.initSign(privateKey);\n\n\t\t /* Update and sign the data */\n\n \t String hexString = readFile(args[0]).trim();\n\t\t byte[] decodedBytes = DatatypeConverter.parseHexBinary(hexString);\t\n\t\t InputStream bufin = new ByteArrayInputStream(decodedBytes);\n\n\n\t\t byte[] buffer = new byte[1024];\n\t\t int len;\n\t\t while (bufin.available() != 0) {\n\t\t\tlen = bufin.read(buffer);\n\t\t\trsa.update(buffer, 0, len);\n\t\t };\n\n\t\t bufin.close();\n\n\t\t /* Now that all the data to be signed has been read in, \n\t\t\t generate a signature for it */\n\n\t\t byte[] realSig = rsa.sign();\n\n\t\t \n\t\t /* Save the signature in a file */\n\n\t\t File file = new File(args[3]);\n\t\t PrintWriter out = new PrintWriter(file);\n\n\t\t\t// if file doesn't exists, then create it\n\t\t\tif (!file.exists()) {\n\t\t\t\tfile.createNewFile();\n\t\t\t}\n\n\t\t out.println(DatatypeConverter.printBase64Binary(realSig));\n\t\t out.close();\n\n\n\t\t /* Save the public key in a file */\n\t\t byte[] key = publicKey.getEncoded();\n\t\t FileOutputStream keyfos = new FileOutputStream(args[4]);\n\t\t keyfos.write(key);\n\n\t\t keyfos.close();\n\n\t\t} catch (Exception e) {\n\t\t System.err.println(\"Caught exception \" + e.toString());\n\t\t}\n\n\t}", "public String getSignature() {\n return signature;\n }", "public String getSignature() {\n return signature;\n }", "public String getSignature() {\n return signature;\n }", "@Override\n public byte[] generateSignature() throws CryptoException, DataLengthException {\n if (!forSigning) {\n throw new IllegalStateException(\"CL04 Signer not initialised for signature generation.\");\n }\n\n try {\n CL04SignSecretPairingKeySerParameter sk = (CL04SignSecretPairingKeySerParameter) pairingKeySerParameter;\n Pairing pairing = PairingFactory.getPairing(sk.getParameters());\n final Element alpha = pairing.getZr().newRandomElement().getImmutable();\n final Element a = sk.getG().powZn(alpha);\n final List<Element> A = sk.getZ().stream().map(a::powZn).collect(Collectors.toCollection(ArrayList::new));\n final Element b = a.powZn(sk.getY()).getImmutable();\n final List<Element> B = A.stream().map(Ai -> Ai.powZn(sk.getY())).collect(Collectors.toCollection(ArrayList::new));\n final Element xTimesY = alpha.mul(sk.getX().mul(sk.getY()));\n final Element c = a.powZn(sk.getX()).mul(commitment.powZn(xTimesY)).getImmutable();\n\n Element[] signElements = new Element[3 + 2 * messages.size()];\n signElements[0] = a;\n signElements[1] = b;\n signElements[2] = c;\n for (int i = 0; i < messages.size(); i++) {\n signElements[3 + i] = A.get(i);\n signElements[3 + messages.size() + i] = B.get(i);\n }\n return derEncode(signElements);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "private static String sign(String data, String key)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tMac mac = Mac.getInstance(\"HmacSHA1\");\n\t\t\t\tmac.init(new SecretKeySpec(key.getBytes(), \"HmacSHA1\"));\n\t\t\t\treturn Base64.encodeBytes(mac.doFinal(data.getBytes(\"UTF-8\")));\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tthrow new RuntimeException(new SignatureException(\"Failed to generate signature: \" + e.getMessage(), e));\n\t\t\t}\n\t\t}", "private X509Certificate generateSelfSignedCertificateWithFakeSignature(PublicKey publicKey) throws IOException, CertificateParsingException {\n byte[] signature;\n AlgorithmIdentifier sigAlgId;\n V3TBSCertificateGenerator tbsGenerator = new V3TBSCertificateGenerator();\n int i = this.mKeymasterAlgorithm;\n if (i == 1) {\n signature = new byte[1];\n sigAlgId = new AlgorithmIdentifier(PKCSObjectIdentifiers.sha256WithRSAEncryption, DERNull.INSTANCE);\n } else if (i == 3) {\n sigAlgId = new AlgorithmIdentifier(X9ObjectIdentifiers.ecdsa_with_SHA256);\n ASN1EncodableVector v = new ASN1EncodableVector();\n v.add(new DERInteger(0));\n v.add(new DERInteger(0));\n signature = new DERSequence().getEncoded();\n } else {\n throw new ProviderException(\"Unsupported key algorithm: \" + this.mKeymasterAlgorithm);\n }\n byte[] signature2 = signature;\n ASN1InputStream publicKeyInfoIn = new ASN1InputStream(publicKey.getEncoded());\n tbsGenerator.setSubjectPublicKeyInfo(SubjectPublicKeyInfo.getInstance(publicKeyInfoIn.readObject()));\n publicKeyInfoIn.close();\n tbsGenerator.setSerialNumber(new ASN1Integer(this.mSpec.getCertificateSerialNumber()));\n X509Principal subject = new X509Principal(this.mSpec.getCertificateSubject().getEncoded());\n tbsGenerator.setSubject(subject);\n tbsGenerator.setIssuer(subject);\n tbsGenerator.setStartDate(new Time(this.mSpec.getCertificateNotBefore()));\n tbsGenerator.setEndDate(new Time(this.mSpec.getCertificateNotAfter()));\n tbsGenerator.setSignature(sigAlgId);\n TBSCertificate tbsCertificate = tbsGenerator.generateTBSCertificate();\n ASN1EncodableVector result = new ASN1EncodableVector();\n result.add(tbsCertificate);\n result.add(sigAlgId);\n result.add(new DERBitString(signature2));\n return new X509CertificateObject(Certificate.getInstance(new DERSequence(result)));\n throw result;\n }", "public String getSignature() {\n return this.Signature;\n }", "public void testDoubleX509SignatureThumb() throws Exception {\n WSSecSignature builder = new WSSecSignature();\n builder.setUserInfo(\"16c73ab6-b892-458f-abf5-2f875f74882e\", \"security\");\n // builder.setUserInfo(\"john\", \"keypass\");\n builder.setKeyIdentifierType(WSConstants.THUMBPRINT_IDENTIFIER); \n Document doc = unsignedEnvelope.getAsDocument();\n \n WSSecHeader secHeader = new WSSecHeader();\n secHeader.insertSecurityHeader(doc);\n\n Document signedDoc = builder.build(doc, crypto, secHeader);\n Document signedDoc1 = builder.build(signedDoc, crypto, secHeader);\n verify(signedDoc1);\n }", "@ApiModelProperty(example = \"D8047EB8285077D9900EDD42F4081070DDB26E08E7F15A3E29642C80CF0C7D68340682DC9868C73EB09744D6298146D8DFC02ED47070FC81FB47D6F73B33EF0A\", required = true, value = \"The signature of the entity. The signature was generated by the signer and can be used to validate tha the entity data was not modified by a node. \")\n public String getSignature() {\n return signature;\n }", "public Builder setSignature(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setSignature(value);\n return this;\n }", "public void setSignatureAlgorithm(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: com.android.org.bouncycastle.x509.X509V1CertificateGenerator.setSignatureAlgorithm(java.lang.String):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.x509.X509V1CertificateGenerator.setSignatureAlgorithm(java.lang.String):void\");\n }", "byte[] generateSignature(byte[] message, PrivateKey privateKey, SecureRandom secureRandom) throws IOException;", "public com.google.protobuf.ByteString\n getSignatureBytes() {\n Object ref = signature_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n signature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getSignatureBytes() {\n Object ref = signature_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n signature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public IDfId doAddESignature(String userName, String password,\r\n String signatureJustification, String formatToSign,\r\n String hashAlgorithm, String preSignatureHash,\r\n String signatureMethodName, String applicationProperties,\r\n String passThroughArgument1, String passThroughArgument2,\r\n Object[] extendedArgs) throws DfException {\n return super.doAddESignature(userName, password, signatureJustification,\r\n formatToSign, hashAlgorithm, preSignatureHash, signatureMethodName,\r\n applicationProperties, passThroughArgument1, passThroughArgument2,\r\n extendedArgs);\r\n }", "public void generateSignature(PrivateKey privateKey) {\n\n String data = StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(recipient) + Float.toString(value);\n signature = StringUtil.applyECDSASig(privateKey, data);\n }", "public org.apache.calcite.avatica.proto.Common.SignatureOrBuilder getSignatureOrBuilder() {\n if (signatureBuilder_ != null) {\n return signatureBuilder_.getMessageOrBuilder();\n } else {\n return signature_ == null ?\n org.apache.calcite.avatica.proto.Common.Signature.getDefaultInstance() : signature_;\n }\n }", "org.apache.xmlbeans.XmlBase64Binary xgetSignatureImage();", "public static byte[] sign(String stringPrivateKey,String plaintext){\r\n\t\ttry {\r\n\t\t\tPKCS8EncodedKeySpec privateKeySpec = new PKCS8EncodedKeySpec(Base64.getDecoder().decode(stringPrivateKey));\r\n\t\t\tKeyFactory kf = KeyFactory.getInstance(\"EC\");\r\n\t\t\tPrivateKey privateKey= kf.generatePrivate(privateKeySpec);\r\n\t\t\tSignature sig = Signature.getInstance(\"SHA256withECDSA\");\r\n\t\t\tsig.initSign(privateKey);\r\n\t\t\tsig.update(plaintext.getBytes(\"UTF-8\"));\r\n\t\t\tbyte[] signature = sig.sign();\r\n\t\t\tSystem.out.println(\"Bytes:\"+signature.length);\r\n\t\t\treturn signature;\r\n\t\t} catch (InvalidKeyException | SignatureException | UnsupportedEncodingException | NoSuchAlgorithmException | InvalidKeySpecException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "protected void createGetSignatureMethod() {\n MethodVisitor cv = m_cw.visitMethod(\n ACC_PUBLIC,\n GET_SIGNATURE_METHOD_NAME,\n GET_SIGNATURE_METHOD_SIGNATURE,\n null,\n null\n );\n cv.visitFieldInsn(\n GETSTATIC, m_joinPointClassName,\n SIGNATURE_FIELD_NAME, FIELD_SIGNATURE_IMPL_CLASS_SIGNATURE\n );\n cv.visitInsn(ARETURN);\n cv.visitMaxs(0, 0);\n }", "private void generateGraphSignature() {\n \t this.generateVertexSignatures();\n \t Collections.sort(this.vertexSignatures);\n \t this.graphSignature = this.vertexSignatures.get(0);\n \t}", "public void affiche3(BigInteger signe){\n System.out.println(\"La signature est :\"+signe);\n }", "public String getSignature() {\n\t\treturn signature;\n\t}", "public\tString\tgetNewSignature() {\n\t\t\treturn\tthis.newSignature;\n\t\t}", "public\nSIGRecord(Name name, int dclass, long ttl, int covered, int alg, int origttl,\n\t Date expire, Date timeSigned, int footprint, Name signer,\n\t byte [] signature)\n{\n\tthis(name, dclass, ttl);\n\tType.check(covered);\n\tcheckU8(\"alg\", alg);\n\tcheckU8(\"labels\", labels);\n\tTTL.check(origttl);\n\tcheckU16(\"footprint\", footprint);\n\tthis.covered = covered;\n\tthis.alg = alg;\n\tthis.labels = name.labels();\n\tthis.origttl = origttl;\n\tthis.expire = expire;\n\tthis.timeSigned = timeSigned;\n\tthis.footprint = footprint;\n\tif (!signer.isAbsolute())\n\t\tthrow new RelativeNameException(signer);\n\tthis.signer = signer;\n\tthis.signature = signature;\n}", "void setSignature(String signature) {\n this.signature = signature;\n }", "@Override\n public com.google.protobuf.ByteString\n getSignatureBytes() {\n Object ref = signature_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n signature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n public com.google.protobuf.ByteString\n getSignatureBytes() {\n Object ref = signature_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n signature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Signer(java.lang.String r1, java.security.IdentityScope r2) throws java.security.KeyManagementException {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: java.security.Signer.<init>(java.lang.String, java.security.IdentityScope):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.<init>(java.lang.String, java.security.IdentityScope):void\");\n }", "public ISignature getSignature() {\n return _signature;\n }", "public Signer(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: java.security.Signer.<init>(java.lang.String):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.<init>(java.lang.String):void\");\n }" ]
[ "0.6454586", "0.6454586", "0.6454586", "0.63545877", "0.6325937", "0.62766826", "0.62260187", "0.6140679", "0.59875196", "0.595797", "0.5943849", "0.58015937", "0.5796885", "0.5794894", "0.5794567", "0.5791342", "0.57665104", "0.5766486", "0.5670216", "0.56698364", "0.5662844", "0.56440973", "0.56404346", "0.56039083", "0.5586847", "0.5569799", "0.55694765", "0.5558213", "0.5531699", "0.55116796", "0.5503037", "0.54649734", "0.54573995", "0.54469806", "0.54469806", "0.54325217", "0.5431295", "0.54258674", "0.5423651", "0.54151493", "0.5413722", "0.5376195", "0.5371106", "0.5362143", "0.53531957", "0.5348296", "0.5342766", "0.5294041", "0.5293781", "0.5285492", "0.52711934", "0.5271129", "0.5265667", "0.5261369", "0.52576137", "0.5255054", "0.52543765", "0.52543765", "0.5224027", "0.5202799", "0.5182508", "0.518209", "0.51802695", "0.5177601", "0.51754504", "0.51526535", "0.5140266", "0.51341885", "0.51207495", "0.5113177", "0.5113177", "0.5113177", "0.51062876", "0.5096195", "0.50777525", "0.5060553", "0.50550556", "0.5037946", "0.5036703", "0.5032958", "0.50295025", "0.50280195", "0.50280195", "0.5025901", "0.50205165", "0.5013635", "0.50049233", "0.5000534", "0.49958524", "0.49901584", "0.4976925", "0.49715212", "0.49650365", "0.4964382", "0.49616584", "0.4955573", "0.4955573", "0.4951864", "0.49413484", "0.49382195" ]
0.5130258
68
format 1230 = 12h30
public Train(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String formatTime(long length) {\n\t\tString hms = \"\";\n\t\tif(length < 3600000) {\n\t\t\thms = String.format(\"%02d:%02d\",\n\t\t\t\t\tTimeUnit.MILLISECONDS.toMinutes(length) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(length)),\n\t\t\t\t\tTimeUnit.MILLISECONDS.toSeconds(length) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(length)));\n\t\t} else {\n\t\t\thms = String.format(\"%02d:%02d:%02d\", TimeUnit.MILLISECONDS.toHours(length),\n\t\t\t\t\tTimeUnit.MILLISECONDS.toMinutes(length) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(length)),\n\t\t\t\t\tTimeUnit.MILLISECONDS.toSeconds(length) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(length)));\n\t\t}\n\n\t\treturn hms;\n\t}", "public static String m34537a(long j) {\n Formatter format;\n if (j <= 0 || j >= LogBuilder.MAX_INTERVAL) {\n return \"00:00\";\n }\n long j2 = j / 1000;\n int i = (int) (j2 % 60);\n int i2 = (int) ((j2 / 60) % 60);\n int i3 = (int) (j2 / 3600);\n Formatter formatter = new Formatter(new StringBuilder(), Locale.getDefault());\n if (i3 > 0) {\n format = formatter.format(\"%d:%02d:%02d\", Integer.valueOf(i3), Integer.valueOf(i2), Integer.valueOf(i));\n } else {\n format = formatter.format(\"%02d:%02d\", Integer.valueOf(i2), Integer.valueOf(i));\n }\n return format.toString();\n }", "public interface ConversationalTimeFormatter {\n public String transform(Integer hour, Integer minutes);\n}", "static String timeConversion(String s) {\n if(s.indexOf('P') >= 0 && s.substring(0, 2).equals(\"12\")){\n }\n else if(s.indexOf('P') >= 0){\n Integer n = Integer.parseInt(s.substring(0, 2));\n s = removeHour(s);\n n += 12;\n String hour = Integer.toString(n);\n s = hour + s;\n }\n else if (s.indexOf('A') >= 0 && s.substring(0, 2).equals(\"12\")){\n s = \"00\" + s.substring(2);\n }\n return removeHourFormat(s);\n }", "static String timeConversion1(String s) {\n String[] timeSplit = s.split(\":\");\n String hours = timeSplit[0];\n String minutes = timeSplit[1];\n String seconds = timeSplit[2].substring(0, 2);\n String ampm = timeSplit[2].substring(2);\n\n int hour = Integer.parseInt(hours);\n\n int differential = 0;\n if (\"PM\".equals(ampm) && hour != 12) {\n differential = 12;\n }\n\n\n hour += differential;\n hour = hour % 24;\n\n hours = String.format(\"%02d\", hour);\n\n return hours + \":\" + minutes + \":\" + seconds;\n\n }", "String formatTime(int time) {\r\n\t\tint h = time / 3600;\r\n\t\ttime %= 3600;\r\n\t\tint m = time / 60;\r\n\t\ttime %= 60;\r\n\t\tint s = time;\r\n\t\treturn String.format(\"%02d:%02d:%02d\", h, m, s);\r\n\t}", "private static String doFormat(long hours, long minutes, long seconds) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tif (hours != 0) {\n\t\t\tsb.append(hours);\n\t\t\tsb.append(\"h\");\n\t\t}\n\t\tif (minutes != 0) {\n\t\t\tsb.append(minutes);\n\t\t\tsb.append(\"m\");\n\t\t}\n\t\tif (seconds != 0 || sb.length() == 0) {\n\t\t\tsb.append(seconds);\n\t\t\tsb.append(\"s\");\n\t\t}\n\t\treturn sb.toString();\n\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 }", "private String formatTime(int seconds){\n return String.format(\"%02d:%02d\", seconds / 60, seconds % 60);\n }", "public static String timeInWords(final int h, final int m) {\n\n\t\tif(m == 0) {\n\t\t\treturn getFromNumber(h).getWord() + \" \" + minuteInWord(m);\n\t\t} else if (m > 30) {\n\t\t\treturn minuteInWord(60 - m) + \" to \" + getFromNumber(h + 1).getWord();\n\t\t} else {\n\t\t\treturn minuteInWord(m) + \" past \" + getFromNumber(h).getWord();\n\t\t}\n\n }", "public String FormatTime(int hour, int minute) {\n\n String time;\n time = \"\";\n String formattedMinute;\n\n if (minute / 10 == 0) {\n formattedMinute = \"0\" + minute;\n } else {\n formattedMinute = \"\" + minute;\n }\n\n\n if (hour == 0) {\n time = \"12\" + \":\" + formattedMinute + \" AM\";\n } else if (hour < 12) {\n time = hour + \":\" + formattedMinute + \" AM\";\n } else if (hour == 12) {\n time = \"12\" + \":\" + formattedMinute + \" PM\";\n } else {\n int temp = hour - 12;\n time = temp + \":\" + formattedMinute + \" PM\";\n }\n\n\n return time;\n }", "private String covertTo12hrFormat(String hoursString, String minutesString, boolean showMeridiem) {\n\t\tint hours = Integer.parseInt(hoursString);\n\t\t//If hours valued > 12 will return hours differed by 12 and preceded by string PM\n\t\tif(hours>12)\n\t\t{\n\t\t\thours=hours-12;\n\t\t\t\n\t\t\treturn hours+ \":\" + minutesString +( showMeridiem ? \" \"+getAM_PM_Locale(\"PM\")+\"\" : \"\");\n\t\t\t//return ( hours<10 ? ( \"0\" + hours) : hours ) + \":\" + minutesString +( showMeridiem ? \" PM\" : \"\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/*\n\t\t\t * If hours value = 0 will return hours as 12 and preceded by string PM\n\t\t\t * If hours value = 12 will return hours and preceded by string AM\n\t\t\t * If hours value < 12 will return hours and preceded by string AM\n\t\t\t */\n\t\t\tif(hours==0)\n\t\t\t\treturn \"12:\" + minutesString +( showMeridiem ? \" \"+getAM_PM_Locale(\"AM\")+\"\" : \"\");\n\t\t\telse if( hours == 12)\n\t\t\t\treturn hours + \":\" + minutesString +( showMeridiem ? \" \"+getAM_PM_Locale(\"PM\")+\"\" : \"\");\n\t\t\telse\n\t\t\t\treturn hours + \":\" + minutesString +( showMeridiem ? \" \"+getAM_PM_Locale(\"AM\")+\"\" : \"\");\n\t\t\t\t//return ( hours<10 ? ( \"0\" + hours) : hours ) + \":\" + minutesString +( showMeridiem ? \" AM\" : \"\");\n\t\t}\n\n\t}", "static String timeConversion(String s) {\n String[] timeSplit = s.split(\":\");\n String hours = timeSplit[0];\n String minutes = timeSplit[1];\n String seconds = timeSplit[2].substring(0, 2);\n String ampm = timeSplit[2].substring(2, 4);\n\n String newHours;\n if (ampm.equals(\"AM\")) {\n newHours = hours.equals(\"12\") ? \"00\" : hours;\n\n } else {\n newHours = hours.equals(\"12\") ? hours : String.valueOf(Integer.parseInt(hours) + 12);\n }\n\n return newHours + \":\" + minutes + \":\" + seconds;\n\n }", "public static String getHHMM()\r\n/* 74: */ {\r\n/* 75: 94 */ String nowTime = \"\";\r\n/* 76: 95 */ Date now = new Date();\r\n/* 77: 96 */ SimpleDateFormat formatter = new SimpleDateFormat(\"HH:mm\");\r\n/* 78: 97 */ nowTime = formatter.format(now);\r\n/* 79: 98 */ return nowTime;\r\n/* 80: */ }", "public String timeFormatter(int hour, int min) {\n String minString = String.valueOf(min);\n String amOrPm = \"AM\";\n if (hour > 12) {\n hour -= 12;\n amOrPm = \"PM\";\n }\n if (minString.length() < 2) {\n minString = \"0\" + minString;\n }\n return (String.valueOf(hour) + \":\" + minString + \" \" + amOrPm);\n\n }", "public static String TimeConvert(int num) {\n\n int hours;\n int minutes;\n\n if (num < 60){\n\n return \"0:\" + num;\n }\n else {\n\n hours = num / 60;\n minutes = num % 60;\n\n return hours + \":\" + minutes;\n }\n }", "public void formatoTiempo() {\n String segundos, minutos, hora;\n\n hora = hrs < 10 ? String.valueOf(\"0\" + hrs) : String.valueOf(hrs);\n\n minutos = min < 10 ? String.valueOf(\"0\" + min) : String.valueOf(min);\n\n jLabel3.setText(hora + \" : \" + minutos + \" \" + tarde);\n }", "static String timeConversion(String s) {\n String[] sTime = s.split(\":\");\n\n int x = 0;\n\n // if PM and hours >12, add additional 12 to hours\n // for AM and hour = 12, set hour to 00\n if(sTime[sTime.length - 1].contains(\"PM\") && !sTime[0].equals(\"12\"))\n x = 12;\n\n String val1 = \"\";\n if(x == 12)\n val1 = (Integer.parseInt(sTime[0]) + x) + \"\";\n else {\n if(sTime[0].equals(\"12\") && sTime[sTime.length - 1].contains(\"AM\"))\n val1 = \"00\";\n else\n val1 = sTime[0];\n }\n\n // merge the string and return the result\n String result = val1 + \":\" + sTime[1] + \":\" + sTime[2].substring(0,2);\n return result;\n }", "public String retornaHora(){\n\t\tCalendar calendar = new GregorianCalendar();\n\t\tSimpleDateFormat hora = new SimpleDateFormat(\"HH\");\n\t\tSimpleDateFormat minuto = new SimpleDateFormat(\"mm\");\n\t\tDate date = new Date();\n\t\tcalendar.setTime(date);\n\t\treturn hora.format(calendar.getTime()) + \"h\" + minuto.format(calendar.getTime());\n\t}", "private static String formatTime(String time) {\n\t\treturn String.format(\"%s:%s\", time.substring(0, 2), time.substring(2));\n\t}", "static String timeConversion(String s) {\n /*\n * Write your code here.\n */\n String conversion = \"\";\n String time = s.substring(s.length()-2,s.length());\n String hour = s.substring(0,2);\n if(time.equals(\"AM\")){\n if(Integer.parseInt(hour)==12){\n conversion = \"00\"+s.substring(2,s.length()-2);\n }\n else{\n conversion = s.substring(0,s.length()-2);\n }\n }else{\n if(Integer.parseInt(hour)==12){\n conversion = \"12\"+s.substring(2,s.length()-2);\n }\n else{\n conversion = (Integer.parseInt(hour)+12) + s.substring(2,s.length()-2);\n }\n }\n\n return conversion;\n }", "public static String TimeFormate() {\n\t\tString time;\n\t\tSimpleDateFormat dateFormat1 = new SimpleDateFormat();\n\t dateFormat1.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t Calendar cal = Calendar.getInstance();\n\t cal.add(Calendar.MINUTE, 3);\n String n=dateFormat1.format(cal.getTime());\n //n=\"03/09/20 8:30 AM\";\n System.out.println(\"Full Date = \" +n);\n int colonindex=n.indexOf(\":\");\n //System.out.println(\": placed= \" +colonindex);\n //String tt =n.substring(colonindex, n.length());\n //System.out.println(\"tt= \" +tt);\n String tt1 =n.substring(colonindex-2,colonindex-1);\n System.out.println(\"tt1= \" +tt1);\n if(tt1.equals(\"1\")) {\n \t time=n.substring(colonindex-2, n.length());\n \t System.out.println(\"Time with two digits in hours= \" +time);\n }\n else {\n \t time=n.substring(colonindex-1, n.length());\n \t System.out.println(\"Time with one digit in hours= \" +time);\n }\n return time;\n\t}", "static String timeConversion(String s) {\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tboolean isAm = s.contains(\"AM\");\n\t\t\n\t\ts = s.replace(\"AM\", \"\");\n\t\ts = s.replace(\"PM\", \"\");\n\t\t\n\t\tString str[] = s.split(\":\");\n\t\tint time = Integer.parseInt(str[0]);\n\t\t\n\t\t\n\t\tif(time < 12 && !isAm) {\n\t\t\ttime = time + 12;\n\t\t\tsb.append(time).append(\":\");\n\t\t}else if(time == 12 && isAm) {\n\t\t\tsb.append(\"00:\");\n\t\t}else {\n\t\t\tif (time < 10) sb.append(\"0\").append(time).append(\":\");\n\t\t\telse sb.append(time).append(\":\");\n\t\t}\n\n\t\tsb.append(str[1]).append(\":\").append(str[2]);\n\t\treturn sb.toString();\n\t}", "public static String timeConversion(String s) {\n // Write your code here\n String end = s.substring(2, s.length() - 2);\n String ans = s.substring(0, s.length() - 2);\n if (s.charAt(8) == 'A') {\n return s.startsWith(\"12\") ? \"00\" + end : ans;\n }\n\n return s.startsWith(\"12\") ? ans : (Integer.parseInt(s.substring(0, 2)) + 12) + end;\n }", "public static String formatTime(long time) {\n long tmp = time;\n int hour = (int) (time / 3600);\n tmp -= hour * 3600;\n int min = (int) (tmp / 60);\n int sec = (int) (tmp - min * 60);\n\n String hourText = hour < 10 ? \"0\" + hour : \"\" + hour;\n String minText = min < 10 ? \"0\" + min : \"\" + min;\n String secText = sec < 10 ? \"0\" + sec : \"\" + sec;\n\n\n return hourText + \":\" + minText + \":\" + secText;\n }", "public String dar_hora(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\n return dateFormat.format(date).toString();\n }", "static String getTime(int time) {\r\n\t\tint hours = time / 60;\r\n\t\tint minutes = time % 60;\r\n\r\n\t\tString ampm;\r\n\t\tif (time >= 720) ampm = \"PM\";\r\n\t\telse ampm = \"AM\";\r\n\r\n\t\treturn (String.format(\"%d:%02d%s\", hours, minutes, ampm));\r\n\t}", "public static String ShowDate(){\n Date date = new Date();\n SimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss.SS a\");\n String HH_MM = sdf.format(date);\n return HH_MM;\n }", "public static String convertTo12HoursFormat(String twentyFourHourTime)\n throws ParseException {\n return TWELVE_TF.format(TWENTY_FOUR_TF.parse(twentyFourHourTime));\n }", "public String getTime() {\n boolean pastNoon = hour >= 12;\n if(pastNoon && hour == 12) {\n return hour + \"pm\";\n }\n else if(pastNoon) {\n return (hour - 12) + \"pm\";\n }\n else if(hour == 0) {\n return \"12am\";\n }\n else {\n return hour + \"am\";\n }\n }", "private static String dateChange(int time) {\n int hour = time / 3600;\n time %= 3600;\n int minute = time / 60;\n int second = time % 60;\n\n String strHour = hour > 9 ? String.valueOf(hour) : \"0\" + hour;\n String strMinute = minute > 9 ? String.valueOf(minute) : \"0\" + minute;\n String strSecond = second > 9 ? String.valueOf(second) : \"0\" + second;\n\n return String.join(\":\", strHour, strMinute, strSecond);\n }", "public static String longToHHMM(long longTime)\r\n/* 150: */ {\r\n/* 151:219 */ SimpleDateFormat formatter = new SimpleDateFormat(\"HH:mm\");\r\n/* 152:220 */ Date strtodate = new Date(longTime);\r\n/* 153:221 */ return formatter.format(strtodate);\r\n/* 154: */ }", "private static String minuteInWord(final int minute) {\n\t\tif( minute == 0 ) {\n\t\t\treturn \"o' clock\";\n\t\t}else if(minute == 15 || minute == 30) {\n\t\t\treturn getFromNumber(minute).getWord();\n\t\t} else {\n\t\t\treturn getFromNumber(minute).getWord() + (minute > 1 ? \" minutes\" : \" minute\");\n\t\t}\n\t}", "private static String hhhmmss(double totalseconds)\n {\n final int SECONDS_PER_MINUTE = 60;\n final int SECONDS_PER_HOUR = SECONDS_PER_MINUTE * 60;\n\n int hours = (int) (totalseconds / SECONDS_PER_HOUR);\n int minutes = (int) ((totalseconds % SECONDS_PER_HOUR)) / SECONDS_PER_MINUTE;\n double seconds = totalseconds % SECONDS_PER_MINUTE;\n\n return String.format(\"%d:%02d:%05.2f\", hours, minutes, seconds);\n }", "private static String hhhmmss(double totalseconds)\n {\n final int SECONDS_PER_MINUTE = 60;\n final int SECONDS_PER_HOUR = SECONDS_PER_MINUTE * 60;\n\n int hours = (int) (totalseconds / SECONDS_PER_HOUR);\n int minutes = (int) ((totalseconds % SECONDS_PER_HOUR)) / SECONDS_PER_MINUTE;\n double seconds = totalseconds % SECONDS_PER_MINUTE;\n\n return String.format(\"%d:%02d:%05.2f\", hours, minutes, seconds);\n }", "protected String mo3406c() {\n return \"Minute\";\n }", "public static SimpleDateFormat getHourFormat() {\n return new SimpleDateFormat(\"HH:mm\");\n }", "private static String format(String value) {\r\n String formattedValue = value.trim();\r\n if (formattedValue.endsWith(\" 00:00:00\")) {\r\n formattedValue = formattedValue.substring(0, formattedValue.length() - 9);\r\n } else {\r\n if (formattedValue.endsWith(\" 00:00:00.0\")) {\r\n formattedValue = formattedValue.substring(0, formattedValue.length() - 11);\r\n }\r\n }\r\n return formattedValue;\r\n }", "private String prettyTime() {\n String[] dt = time.split(\"T\");\n String[] ymd = dt[0].split(\"-\");\n String[] hms = dt[1].split(\":\");\n\n int hour = Integer.parseInt(hms[0]);\n\n String date = getMonth(Integer.parseInt(ymd[1])) + \" \" + ymd[2] + \", \" + ymd[0];\n String time = (hour > 12 ? hour - 12 : hour) + \":\" + hms[1] + \":\" + hms[2].substring(0, hms[2].indexOf(\".\"));\n return date + \" at \" + time;\n }", "private void updateTime() \r\n\t {\r\n\t\t \r\n\t\t \tif(Hours.getValue() < 12)\r\n\t\t \t{\r\n\t\t \t\tdisplayString = Hours.getDisplayValue() + \":\" + Minutes.getDisplayValue() + \":\" + Seconds.getDisplayValue() + \" am\";\r\n\t\t System.out.println(displayString);\r\n\t\t \t}\r\n\t\t \t\r\n\t\t \telse if (Hours.getValue() > 12 && Hours.getValue() < 24 )\r\n\t\t \t{\r\n\t\t \t\tdisplayString = Hours.getDisplayValue() + \":\" + Minutes.getDisplayValue() + \":\" + Seconds.getDisplayValue() + \" pm\";\r\n\t\t System.out.println(displayString);\r\n\t\t \t}\r\n\t }", "private String formatTime(Date dateObject) {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat timeFormat = new SimpleDateFormat(\"h:mm a\");\n return timeFormat.format(dateObject);\n }", "private String formatTimeout(long timeout) {\n Date date = new Date(timeout);\n DateFormat formatter = new SimpleDateFormat(\"mm:ss\");\n return formatter.format(date);\n }", "static String timeConversion(String s) {\n /*\n * Write your code here.\n */\n String res = \"\";\n String hrs = s.substring(0, 2);\n String min = s.substring(3, 5);\n String sec = s.substring(6, 8);\n String ampm = s.substring(8);\n int hr = Integer.parseInt(hrs);\n if((ampm.equalsIgnoreCase(\"PM\")) && (hr != 12)) {\n hr += 12;\n if(hr >= 24) {\n hr = 24 - hr;\n }\n }\n else if(ampm.equalsIgnoreCase(\"AM\")) {\n if(hr == 12) {\n hr = 0;\n }\n }\n if(hr < 10) {\n res = res + \"0\" + Integer.toString(hr);\n }\n else {\n res += Integer.toString(hr);\n }\n res = res +\":\" +min +\":\" + sec;\n return res;\n }", "public static String time_str(double t) {\n int hours = (int) t/3600;\n int rem = (int) t - hours*3600;\n int mins = rem / 60;\n int secs = rem - mins*60;\n return String.format(\"%02d:%02d:%02d\", hours, mins, secs);\n //return hoursMinutesSeconds(t);\n }", "public String amOrpm() {\n\t\tif (this.total % 24 < 12) {\n\t\t\treturn \"AM\";\n\t\t} else {\n\t\t\treturn \"PM\";\n\t\t}\n\t}", "private String intTime(long l){\r\n String s=\"\";\r\n s+=(char)(((l/1000)/60)+'0')+\":\"+(char)((((l/1000)%60)/10)+'0')+(char)((((l/1000)%60)%10)+'0'); \r\n return s;\r\n }", "public static String tenthsToStringShort(int time) {\r\n\t\t// If we have negative time, just return zero\r\n\t\tif ( time < 0 ) {\r\n\t\t\treturn \"0:00\";\r\n\t\t}\r\n\t\t\r\n\t\tint sec = (time / 10) % 60;\r\n\t\tint min = (time / 10) / 60;\r\n\t\treturn String.format(\"%d:%02d\", min, sec);\r\n\t}", "private String formatTime(Date dateObject) {\r\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"h:mm a\");\r\n return timeFormat.format(dateObject);\r\n }", "public static String hoursMinutesSeconds(double t) {\n int hours = (int) t/3600;\n int rem = (int) t - hours*3600;\n int mins = rem / 60;\n int secs = rem - mins*60;\n //return String.format(\"%2d:%02d:%02d\", hours, mins, secs);\n return String.format(\"%d:%02d:%02d\", hours, mins, secs);\n }", "private String convertToAMPM(Date time) {\r\n\r\n String modifier = \"\";\r\n String dateTime = Util.formateDate(time, \"yyyy-MM-dd HH:mm\");\r\n\r\n\r\n // Get the raw time\r\n String rawTime = dateTime.split(\" \")[1];\r\n // Get the hour as 24 time and minutes\r\n String hour24 = rawTime.split(\":\")[0];\r\n String minutes = rawTime.split(\":\")[1];\r\n // Convert the hour\r\n Integer hour = Integer.parseInt(hour24);\r\n\r\n if (hour != 12 && hour != 0) {\r\n modifier = hour < 12 ? \"am\" : \"pm\";\r\n hour %= 12;\r\n } else {\r\n modifier = (hour == 12 ? \"pm\" : \"am\");\r\n hour = 12;\r\n }\r\n // Concat and return\r\n return hour.toString() + \":\" + minutes + \" \" + modifier;\r\n }", "public String getTime(){\n String mt=\"\";\n String hr=\"\";\n if(minute<10){\n mt=0+(String.valueOf(minute));\n }\n\n else{\n mt=String.valueOf(minute);\n }\n\n if(hour<10){\n hr=0+(String.valueOf(hour));\n }\n else{\n hr=String.valueOf(hour);\n }\n //return hour:minute\n return (hr+\":\"+mt);\n }", "private String formatTime(Date dateObject) {\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"h:mm a\", Locale.getDefault());\n return timeFormat.format(dateObject);\n }", "public static String convertTo24HoursFormat(String twelveHourTime)\n throws ParseException {\n return TWENTY_FOUR_TF.format(TWELVE_TF.parse(twelveHourTime));\n }", "public static String formatTime(String userTime, String date) {\r\n\r\n\t\t\tint n = Integer.parseInt(userTime.substring(0, 2)) + 5;\r\n\r\n\t\t\tswitch (n) {\r\n\r\n\t\t\tcase 24:\r\n\t\t\t\tn = 0;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 25:\r\n\t\t\t\tn = 1;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 26:\r\n\t\t\t\tn = 2;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tn = 3;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// extracting hour\r\n\t\t\tString hourChange = String.valueOf(n);\r\n\r\n\t\t\tStringBuilder time = new StringBuilder(userTime);\r\n\r\n\t\t\tif (hourChange.length() == 1) {\r\n\r\n\t\t\t\ttime.replace(0, 2, \"0\" + hourChange);\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\ttime.replace(0, 2, hourChange);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tString formattedString = date + \" \" + time + \":00\";\r\n\r\n\t\t\treturn formattedString;\r\n\r\n\t\t}", "private String formatTime(final long time) {\n if ( time == 0 ) {\n return \"-\";\n }\n if ( time < 1000 ) {\n return time + \" ms\";\n } else if ( time < 1000 * 60 ) {\n return time / 1000 + \" secs\";\n }\n final long min = time / 1000 / 60;\n final long secs = (time - min * 1000 * 60);\n return min + \" min \" + secs / 1000 + \" secs\";\n }", "private String createTimeString(int value)\n\t {\n\t\tif(value<0){\n\t\t\treturn \"00:00:00,000\";\n\t\t}\n\t int sec = value % 60;\n\t int min = (value / 60) % 60;\n\t int hr = value / 3600;\n\t String fmtHr = \"\"+hr;\n\t String fmtMin = \"\"+min;\n\t String fmtSec = \"\" + sec;\n\t if(hr<10){\n\t \tfmtHr = \"0\"+hr;\n\t }\n\t if(min<10){\n\t \tfmtMin = \"0\"+min;\n\t }\n\t if(sec<10){\n\t \tfmtSec = \"0\"+sec;\n\t }\n\n\t return fmtHr+\":\"+fmtMin+\":\"+fmtSec+\",\"+\"000\";\n\t }", "public String Formatting(){\n\t\t\t return String.format(\"%03d-%02d-%04d\", getFirstSSN(),getSecondSSN(),getThirdSSN());\n\t\t }", "private static String timeLine()\n {\n return String.format(STR_FORMAT_1 + STR_FORMAT_2, TIME_STR, TIME);\n }", "@Test public void Time_len_6()\t\t\t\t\t\t\t\t\t{tst_time_(\"041526\"\t\t\t\t\t, \"04:15:26.000\");}", "public String getPrintFormattedTime() {\n return this.optionalTime.map(x -> x.format(DateTimeFormatter.ofPattern(\"HHmma\"))).orElse(\"\");\n }", "public static void main(String[] args) {\n\t\tString s = \"12:45:54PM\";\r\n\t\tString temp=\":\";\r\n\t\tString Result=\"\";\r\n\t\t\r\n\t\tif(s.charAt(8)=='P' || s.charAt(8)=='p')\r\n\t\t {\r\n\t\t\tString s1[] = s.split(\":\");\r\n\t int Hour = Integer.parseInt(s1[0]);\r\n\t String Actual_Hour = \"\";\r\n\t if(Hour == 12)\r\n\t {\r\n\t \tActual_Hour = \"12\";\r\n\t }\r\n\t else\r\n\t {\r\n\t \tint data = 12 + Hour;\r\n\t \tActual_Hour = String.valueOf(data);\r\n\t }\r\n\t \r\n\t \r\n\t Result = Actual_Hour +temp+s1[1]+temp+s1[2].substring(0, 2);\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t \tString s1[] = s.split(\":\");\r\n\t\t \tint Hour = Integer.parseInt(s1[0]);\r\n\t\t String Actual_Hour = \"\";\r\n\t\t if(Hour == 12)\r\n\t\t {\r\n\t\t \tActual_Hour = \"00\";\r\n\t\t \tResult = Actual_Hour +temp+s1[1]+temp+s1[2].substring(0, 2); \r\n\t\t }\r\n\t\t else {\r\n\t\t \tString s2[] = s.split(\"AM\");\r\n\t\t\t for(int i=0; i<s2.length; i++)\r\n\t\t\t {\r\n\t\t\t \tResult = s2[i];\r\n\t\t\t }\t\r\n\t\t }\r\n\t\t \t\r\n\t\t }\r\n\t\t\r\n\t\t\t\tSystem.out.println(Result);\r\n}", "public static String formatTime(final long ms){\n long s = ms / 1000, m = s / 60, h = m / 60;\n s %= 60; m %= 60; h %= 24;\n return String.format(\"%02d:%02d:%02d\", h, m, s);\n }", "@Test public void shouldGive240MinFor950cent() {\r\n // Three hours: $1.5+2.0+3.0\r\n assertEquals( 4 * 60 /*minutes*/ , rs.calculateTime(950) ); \r\n }", "private String formatTime(String dateObject){\n\n SimpleDateFormat input = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\"); // format kita \"HARUS SAMA TIDAK BOLEH FORMATNYA BEDA BAHKAN 1 CHAR PUN\n SimpleDateFormat output= new SimpleDateFormat(\"h:mm a\");\n Date jam = null;\n try {\n jam = input.parse(dateObject);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return output.format(jam);\n }", "public static String formatTime(long timeDiff){\n StringBuilder buf = new StringBuilder();\n long hours = timeDiff / (60*60*1000);\n long rem = (timeDiff % (60*60*1000));\n long minutes = rem / (60*1000);\n rem = rem % (60*1000);\n long seconds = rem / 1000;\n\n if (hours != 0){\n buf.append(hours);\n buf.append(\" hrs, \");\n }\n if (minutes != 0){\n buf.append(minutes);\n buf.append(\" mins, \");\n }\n\n if (seconds != 0) {\n buf.append(seconds);\n buf.append(\" sec\");\n }\n\n if (timeDiff < 1000) {\n buf.append(timeDiff);\n buf.append(\" msec\");\n }\n return buf.toString();\n }", "public static String toHH_MM(String draftDate) {\r\n\t\tif (draftDate == null || draftDate.length() < 19) {\r\n\t\t\treturn draftDate;\r\n\t\t}\r\n\t\treturn draftDate.substring(11, 16);\r\n\t}", "private String getTimingt(Long pastvalue) {\n DateTime zulu = DateTime.now(DateTimeZone.UTC);\n // DateTimeFormatter formatter = DateTimeFormat.forPattern(\"HH:mm:ss am\");\n Date date = new Date(pastvalue);\n// formattter\n SimpleDateFormat formatter= new SimpleDateFormat(\"hh:mm a\");\n formatter.setTimeZone(TimeZone.getDefault());\n// Pass date object\n return formatter.format(date );\n /*\n long mint = TimeUnit.MILLISECONDS.toMinutes(zulu.toInstant().getMillis() - pastvalue);\n\n if (mint < 60) {\n if (mint > 1)\n return \"Hace \" + mint + \" minutos\";\n else\n return \"Hace \" + mint + \" minuto\";\n } else {\n long horas = TimeUnit.MILLISECONDS.toHours(zulu.toDate().getTime() - pastvalue);\n\n if (horas < 24) {\n if (horas > 1)\n return \"Hace \" + horas + \" horas\";\n else\n return \"Hace \" + horas + \" hora\";\n } else {\n long dias = TimeUnit.MILLISECONDS.toDays(zulu.toDate().getTime() - pastvalue);\n\n if (dias > 1) {\n return \"Hace \" + dias + \" dias\";\n } else\n return \"Hace \" + dias + \" dia\";\n }\n\n\n }*/\n }", "private String secsToTime(int secs) {\n String min = secs / 60 + \"\";\n String sec = secs % 60 + \"\";\n if(sec.length() == 1) {\n sec = \"0\" + sec;\n }\n\n return min + \":\" + sec;\n }", "public static String timeToString(Date date)\r\n/* 24: */ {\r\n/* 25: 31 */ return sdfTime.format(date);\r\n/* 26: */ }", "private String FormatoHoraDoce(String Hora){\n String HoraFormateada = \"\";\n\n switch (Hora) {\n case \"13\": HoraFormateada = \"1\";\n break;\n case \"14\": HoraFormateada = \"2\";\n break;\n case \"15\": HoraFormateada = \"3\";\n break;\n case \"16\": HoraFormateada = \"4\";\n break;\n case \"17\": HoraFormateada = \"5\";\n break;\n case \"18\": HoraFormateada = \"6\";\n break;\n case \"19\": HoraFormateada = \"7\";\n break;\n case \"20\": HoraFormateada = \"8\";\n break;\n case \"21\": HoraFormateada = \"9\";\n break;\n case \"22\": HoraFormateada = \"10\";\n break;\n case \"23\": HoraFormateada = \"11\";\n break;\n case \"00\": HoraFormateada = \"12\";\n break;\n default:\n int fmat = Integer.parseInt(Hora);\n HoraFormateada = Integer.toString(fmat);\n }\n return HoraFormateada;\n }", "public static String TimeConverter(long t)\r\n {\r\n int h, m, s, ms;\r\n ms = (int)t;\r\n h = ms / 3600000;\r\n ms = ms % 3600000;\r\n m = ms / 60000;\r\n ms = ms % 60000;\r\n s = ms / 1000;\r\n ms = ms % 1000;\r\n return h + \" :: \" + m + \" :: \" + s + \" :: \" + ms;\r\n }", "public static String getNowTimeHHMM() {\n\t\tSimpleDateFormat timeFormat = new SimpleDateFormat(\"HH:mm\");\n\t\treturn timeFormat.format(new Date());\n\t}", "private static String intToHour(int intHour) {\r\n\t\tswitch (intHour) {\r\n\t\tcase 1:\r\n\t\t\treturn \"6am\";\r\n\t\tcase 2:\r\n\t\t\treturn \"7am\";\r\n\t\tcase 3:\r\n\t\t\treturn \"8am\";\r\n\t\tcase 4:\r\n\t\t\treturn \"9am\";\r\n\r\n\t\tcase 5:\r\n\t\t\treturn \"10am\";\r\n\r\n\t\tcase 6:\r\n\t\t\treturn \"11am\";\r\n\r\n\t\tcase 7:\r\n\t\t\treturn \"12pm\";\r\n\r\n\t\tcase 8:\r\n\t\t\treturn \"1pm\";\r\n\r\n\t\tcase 9:\r\n\t\t\treturn \"2pm\";\r\n\r\n\t\tcase 10:\r\n\t\t\treturn \"3pm\";\r\n\r\n\t\tcase 11:\r\n\t\t\treturn \"4pm\";\r\n\r\n\t\tcase 12:\r\n\t\t\treturn \"5pm\";\r\n\r\n\t\tcase 13:\r\n\t\t\treturn \"6pm\";\r\n\r\n\t\tcase 14:\r\n\t\t\treturn \"7pm\";\r\n\r\n\t\tcase 15:\r\n\t\t\treturn \"8pm\";\r\n\t\tdefault:\r\n\t\t\treturn \"\";\r\n\t\t}// end switch\r\n\t}", "private String formatTime(Date dateObject)\n {\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"h:mm a\");\n timeFormat.setTimeZone(Calendar.getInstance().getTimeZone());\n return timeFormat.format(dateObject);\n }", "public final void mRULE_TWELVEHRSTIME() throws RecognitionException {\n try {\n int _type = RULE_TWELVEHRSTIME;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalDSL.g:16739:20: ( '0' .. '1' '0' .. '9' ':' '0' .. '5' '0' .. '9' ( ':' '0' .. '6' '0' .. '9' ( '.' '0' .. '9' '0' .. '9' '0' .. '9' )? )? ( 'am' | 'pm' ) )\n // InternalDSL.g:16739:22: '0' .. '1' '0' .. '9' ':' '0' .. '5' '0' .. '9' ( ':' '0' .. '6' '0' .. '9' ( '.' '0' .. '9' '0' .. '9' '0' .. '9' )? )? ( 'am' | 'pm' )\n {\n matchRange('0','1'); \n matchRange('0','9'); \n match(':'); \n matchRange('0','5'); \n matchRange('0','9'); \n // InternalDSL.g:16739:62: ( ':' '0' .. '6' '0' .. '9' ( '.' '0' .. '9' '0' .. '9' '0' .. '9' )? )?\n int alt30=2;\n int LA30_0 = input.LA(1);\n\n if ( (LA30_0==':') ) {\n alt30=1;\n }\n switch (alt30) {\n case 1 :\n // InternalDSL.g:16739:63: ':' '0' .. '6' '0' .. '9' ( '.' '0' .. '9' '0' .. '9' '0' .. '9' )?\n {\n match(':'); \n matchRange('0','6'); \n matchRange('0','9'); \n // InternalDSL.g:16739:85: ( '.' '0' .. '9' '0' .. '9' '0' .. '9' )?\n int alt29=2;\n int LA29_0 = input.LA(1);\n\n if ( (LA29_0=='.') ) {\n alt29=1;\n }\n switch (alt29) {\n case 1 :\n // InternalDSL.g:16739:86: '.' '0' .. '9' '0' .. '9' '0' .. '9'\n {\n match('.'); \n matchRange('0','9'); \n matchRange('0','9'); \n matchRange('0','9'); \n\n }\n break;\n\n }\n\n\n }\n break;\n\n }\n\n // InternalDSL.g:16739:121: ( 'am' | 'pm' )\n int alt31=2;\n int LA31_0 = input.LA(1);\n\n if ( (LA31_0=='a') ) {\n alt31=1;\n }\n else if ( (LA31_0=='p') ) {\n alt31=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 31, 0, input);\n\n throw nvae;\n }\n switch (alt31) {\n case 1 :\n // InternalDSL.g:16739:122: 'am'\n {\n match(\"am\"); \n\n\n }\n break;\n case 2 :\n // InternalDSL.g:16739:127: 'pm'\n {\n match(\"pm\"); \n\n\n }\n break;\n\n }\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public static String tenthsToString(int time) {\r\n\t\t// If we have negative time, just return zero\r\n\t\tif ( time < 0 ) {\r\n\t\t\treturn \"0:00.0\";\r\n\t\t}\r\n\t\t\r\n\t\tint tenths = time % 10;\r\n\t\tint sec = (time / 10) % 60;\r\n\t\tint min = (time / 10) / 60;\r\n\t\treturn String.format(\"%d:%02d.%d\", min, sec, tenths);\r\n\t}", "private String getMinutesInTime(int time) {\n String hour = String.valueOf(time / 60);\n String minutes = String.valueOf(time % 60);\n\n if(minutes.length() < 2) {\n minutes = \"0\" + minutes;\n }\n\n return hour + \":\" + minutes;\n\n }", "public static String convert_minutes_to_hours(String minutess) {\n int hours = Integer.parseInt(minutess) / 60; //since both are ints, you get an int\n int minutes = Integer.parseInt(minutess) % 60;\n System.out.printf(\"%d:%02d\", hours, minutes);\n return hours + \":\" + minutes;\n }", "public static String convert(int secs) {\n int h = secs / 3600, i = secs - h * 3600, m = i / 60, s = i - m * 60;\n String timeF = \"\";\n\n if (h < 10) {\n timeF = timeF + \"\";\n }\n timeF = timeF + h + \" hour(s) \";\n if (m < 10) {\n timeF = timeF + \"\";\n }\n timeF = timeF + m + \" minute(s) \";\n if (s < 10) {\n timeF = timeF + \"\";\n }\n timeF = timeF + s + \" second(s) \";\n\n return timeF;\n }", "public static String milToStandard(int milTime){\n\n String output;\n int tempHours = milTime / 100;\n String ampm;\n if(tempHours - 12 < 0){\n if(tempHours == 0){tempHours = 12;}\n ampm = \"AM\";\n }\n else{\n tempHours = tempHours - 12;\n if(tempHours == 0){tempHours = 12;}\n ampm = \"PM\";\n }\n output = tempHours+\":\";\n int tempMins = milTime % 100;\n if(tempMins < 10){ output = output + \"0\" + tempMins + ampm;}\n else{ output = output + tempMins + ampm;}\n\n return output;\n\n }", "private String format(TimeSpan value){\n\t\tString out = \"\";\n\t\tif(value == null){\n\t\t\tfor(int j=this.timeSpanForm.length-1; j>=0; j--){\n\t\t\t\tif(this.timeSpanForm[j]) out += TimeUnit.values()[j]+\":\";\n\t\t\t}\n\t\t\tout = out.substring(0, out.length()-2);\n\t\t}else{\n\t\t\tfor(int j=this.timeSpanForm.length-1; j>=0; j--){\n\t\t\t\tif(this.timeSpanForm[j]){\n\t\t\t\t\tif(this.timeSpanForm[j-1])\n\t\t\t\t\t\tout += value.getTimeTruncated(TimeUnit.values()[j])+\":\";\n\t\t\t\t\telse\n\t\t\t\t\t\tout += value.getTimeAsDouble(TimeUnit.values()[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}", "public String toString()\r\n {\r\n DecimalFormat twoDigits = new DecimalFormat( \"00\" );\r\n\r\n return ( this.getHour() == 12 || this.getHour() == 0 ?\r\n 12 : this.getHour() % 12 ) + \":\" +\r\n twoDigits.format( this.getMinute() ) + \":\" +\r\n twoDigits.format( this.getSecond() ) +\r\n ( this.getHour() < 12 ? \" AM\" : \" PM\" );\r\n }", "public String calculateHour() {\n\t\tString hora;\n\t\tString min;\n\t\tString seg;\n\t\tString message;\n\t\tCalendar calendario = new GregorianCalendar();\n\t\tDate horaActual = new Date();\n\t\tcalendario.setTime(horaActual);\n\n\t\thora = calendario.get(Calendar.HOUR_OF_DAY) > 9 ? \"\" + calendario.get(Calendar.HOUR_OF_DAY)\n\t\t\t\t: \"0\" + calendario.get(Calendar.HOUR_OF_DAY);\n\t\tmin = calendario.get(Calendar.MINUTE) > 9 ? \"\" + calendario.get(Calendar.MINUTE)\n\t\t\t\t: \"0\" + calendario.get(Calendar.MINUTE);\n\t\tseg = calendario.get(Calendar.SECOND) > 9 ? \"\" + calendario.get(Calendar.SECOND)\n\t\t\t\t: \"0\" + calendario.get(Calendar.SECOND);\n\n\t\tmessage = hora + \":\" + min + \":\" + seg;\n\t\treturn message;\n\n\t}", "public static String convertFromTime(int time){\n int hour = time/100;\n int min = time%100;\n String hourStr = String.format(\"%02d\", hour);\n String minStr = String.format(\"%02d\",min);\n return hourStr + \":\" + minStr;\n }", "private String TimeConversion() {\n\n int hours, minutes, seconds, dayOfWeek, date, month, year;\n\n seconds = ((raw[27] & 0xF0) >> 4) + ((raw[28] & 0x03) << 4);\n minutes = ((raw[28] & 0xFC) >> 2);\n hours = (raw[29] & 0x1F);\n dayOfWeek = ((raw[29] & 0xE0) >> 5);\n date = (raw[30]) & 0x1F;\n month = ((raw[30] & 0xE0) >> 5) + ((raw[31] & 0x01) << 3);\n year = (((raw[31] & 0xFE) >> 1) & 255) + 2000;\n\n\n\n return hR(month) + \"/\" + hR(date) + \"/\" + year + \" \" + hR(hours) + \":\" + hR(minutes) + \":\" + hR(seconds) + \":00\";\n }", "private void normalGmtStringToMinutes() {\n int i = Integer.parseInt(gmtString.substring(4, 6));\n offsetMinutes = i * 60;\n i = Integer.parseInt(gmtString.substring(7));\n offsetMinutes += i;\n if (gmtString.charAt(3) == MINUS) {\n offsetMinutes *= -1;\n }\n }", "private String getFormattedDate(Integer format) {\n Date date = new Date(format * 1000L);\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n dateFormat.setTimeZone(TimeZone.getTimeZone(\"Etc/UTC\"));\n Log.e(\"time\",dateFormat.format(date));\n return dateFormat.format(date);\n }", "public static String getHHMM(String time)\r\n\t{\r\n\t\tString finalTime = \"00/00 AM/PM\";\r\n\t\tString hh = time.substring(0, 2);\r\n\t\tString mm = time.substring(3, 5);\r\n\r\n\t\tint newHH = Integer.parseInt(hh);\r\n\t\tint newMM = Integer.parseInt(mm);\r\n\r\n\t\tnewMM = newMM % 60;\r\n\r\n\t\tif (newHH == 0)\r\n\t\t{\r\n\t\t\tfinalTime = \"12:\" + newMM + \" PM\";\r\n\t\t} else\r\n\t\t{\r\n\r\n\t\t\tif (newHH > 12)\r\n\t\t\t{\r\n\t\t\t\tnewHH = newHH % 12;\r\n\t\t\t\tfinalTime = newHH + \":\" + newMM + \" PM\";\r\n\t\t\t} else\r\n\t\t\t\tfinalTime = newHH + \":\" + newMM + \" AM\";\r\n\t\t}\r\n\r\n\t\tString HH = finalTime.substring(0, finalTime.indexOf(\":\"));\r\n\t\tString MM = finalTime.substring(finalTime.indexOf(\":\") + 1, finalTime\r\n\t\t\t\t.indexOf(\" \"));\r\n\t\tString AMPM = finalTime.substring(finalTime.indexOf(\" \"), finalTime\r\n\t\t\t\t.length());\r\n\r\n\t\tif (MM.length() == 1)\r\n\t\t\tMM = \"0\" + MM;\r\n\r\n\t\tfinalTime = HH + \":\" + MM /*+ \" \" */+ AMPM;\r\n\r\n\t\treturn (finalTime);\r\n\t}", "private String calculaTempo(Date dtTileLine) {\n\t\treturn \"2 minutos atrás (\"+dtTileLine.toString()+\")\";\n\t}", "@Test public void shouldGive120MinFor350cent() {\r\n // Two hours: $1.5+2.0\r\n assertEquals( 2 * 60 /*minutes*/ , rs.calculateTime(350) ); \r\n }", "public static String formattime(long millis) {\n\t\treturn String.format(\"%02d:%02d:%02d:%03d\", //This formats the time correctly\n\t\t\t\tTimeUnit.MILLISECONDS.toHours(millis),\n\t\t\t TimeUnit.MILLISECONDS.toMinutes(millis) -\n\t\t\t TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(millis)),\n\t\t\t TimeUnit.MILLISECONDS.toSeconds(millis) -\n\t\t\t TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(millis)),\n\t\t\t millis -\n\t\t\t TimeUnit.SECONDS.toMillis(TimeUnit.MILLISECONDS.toSeconds(millis)));\n\t\t\n\t}", "public String getDisplayValue()\n {\n\t\t\t\tString time_str;\n\t\t\t\tif (hours.getValue()<12&&minutes.getValue()<10) {\n time_str = \"0\" + hours.getValue()+ \": 0\" + minutes.getValue();\n }\n\t\t\t\tif (hours.getValue()<12) {\n time_str = \"0\" + hours.getValue()+ \": \" + minutes.getValue();\n } else if (minutes.getValue()<10) {\n time_str = hours.getValue()+\": 0\"+ minutes.getValue();\n } else {\n time_str = hours.getValue()+\":\"+ minutes.getValue();\n }\n\t\t\t\treturn time_str;\n }", "public static String fixAutoTime(String time) {\n if (time.length() < 3) {\n return fixAutoTime(\"0\".concat(time));\n }\n return time;\n }", "private static String timeFormat(long t, String format) {\n SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.US);\n try {sdf.setTimeZone(TimeZone.getTimeZone(\"UTC\"));} catch (Exception e) {}\n return sdf.format(new Date(t));\n }", "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 formatTime(long ms) {\n String format = String.format(\"%%.%df s\", decimals);\n return String.format(format, ms > 0 ? ms/1000f : 0f);\n }", "protected static String expandTimeString(String time) {\n StringBuilder expandedTime = new StringBuilder(13);\n\n expandedTime.append(\"000000\");\n\n switch (time.length()) {\n case 4:\n expandedTime.insert(0, '2').append(time).append(\"00\");\n break;\n case 5:\n expandedTime.insert(0, time.substring(0, 1)).append(time.substring(1)).append(\"00\");\n break;\n case 6:\n expandedTime.insert(0, '2').append(time);\n break;\n case 7:\n expandedTime.insert(0, time.substring(0, 1)).append(time.substring(1));\n break;\n default:\n throw new IllegalArgumentException(\"Given VDEW encoded Time-String must have between 4 to 7 characters, but we got \" + time.length() + \" characters being '\" + time + \"'\");\n }\n\n return expandDateTimeString(expandedTime.toString());\n }", "public static String getTimeString(int t) {\n\t\tint hours = t / 3600;\n\t\tint minutes = (t / 60) % 60;\n\t\tint seconds = t % 60;\n\t\treturn (hours < 10 ? \"0\" : \"\")\n\t\t\t+ hours\n\t\t\t+ (minutes < 10 ? \":0\" : \":\")\n\t\t\t+ minutes\n\t\t\t+ (seconds < 10 ? \":0\" : \":\")\n\t\t\t+ seconds;\n\t}", "public String toString() {\n return String.format(\"%d: %02d: %02d %s\",\n ((hour == 0 || hour == 12) ? 12 :hour % 12 ),\n minutes, seconds, (hour < 12 ? \"AM\" : \"PM\"));\n\n }", "public String TI()\n\t{\n\t\tDateTimeFormatter f = DateTimeFormatter.ofPattern(\"hh:mm a\");\n\t\tString ti = f.format(st);\n\t\tString ti2 = f.format(et);\n\t\treturn ti + \" - \" + ti2;\n \t}", "public static String getDurationString(long minutes, long seconds) {\n if(minutes>=0 && (seconds >=0 && seconds<=59)){\n// minutes = hours/60;\n// seconds = hours/3600;\n long hours = minutes / 60;\n long remainingMinutes = minutes % 60;\n\n return hours + \" h \" + remainingMinutes + \"m \" + seconds + \"s\";\n }\n else\n\n {\n return \"invalid value\";\n }\n }" ]
[ "0.6501716", "0.6402043", "0.6366613", "0.636131", "0.6324584", "0.6273941", "0.6212636", "0.6171613", "0.61575186", "0.6120437", "0.60720766", "0.6064707", "0.6017692", "0.6010606", "0.6008996", "0.5968568", "0.5958964", "0.5946261", "0.5926803", "0.5919578", "0.5911836", "0.59072536", "0.5903676", "0.5888624", "0.5880923", "0.5868339", "0.585394", "0.5851826", "0.5837091", "0.5836398", "0.5833593", "0.5829444", "0.5825055", "0.58231026", "0.58231026", "0.5819185", "0.581632", "0.5814923", "0.5813976", "0.58124316", "0.5807463", "0.5796583", "0.5790775", "0.57786834", "0.57783633", "0.5765906", "0.5756409", "0.57533914", "0.57432324", "0.57377905", "0.57305616", "0.57235557", "0.5710305", "0.5705365", "0.5661007", "0.565033", "0.5643586", "0.5634253", "0.563394", "0.5630965", "0.5608372", "0.5605979", "0.557444", "0.556481", "0.5564509", "0.55471075", "0.55444497", "0.5533013", "0.5528435", "0.5525243", "0.552464", "0.5496233", "0.54927874", "0.54856235", "0.5479093", "0.5477919", "0.54725266", "0.5456058", "0.5455535", "0.5455085", "0.5444975", "0.5434226", "0.54339916", "0.53992426", "0.5394124", "0.53816944", "0.53764117", "0.5371607", "0.5371204", "0.53653896", "0.5355683", "0.5345257", "0.5338621", "0.5337205", "0.53356", "0.5334929", "0.53345037", "0.53286266", "0.5327755", "0.5318362", "0.5306766" ]
0.0
-1
Creates an empty marker file corresponding to storage writer path.
private void createMarkerFile(String partitionPath, String dataFileName) { WriteMarkers writeMarkers = WriteMarkersFactory.get(writeConfig.getMarkersType(), table, instantTime); writeMarkers.create(partitionPath, dataFileName, IOType.CREATE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createStorageFile() throws IoDukeException {\n PrintWriter writer = null;\n try {\n writer = getStorageFile();\n } catch (IOException e) {\n throw new IoDukeException(\"Error opening task file for reading\");\n } finally {\n if (writer != null) {\n writer.close();\n }\n }\n }", "private PrintWriter getStorageFile() throws IOException {\n Path path = Paths.get(filePath);\n\n // Create directories if necessary\n if (path.getParent() != null) {\n Files.createDirectories(path.getParent().getFileName());\n }\n\n return new PrintWriter(new BufferedWriter(new FileWriter(filePath)));\n }", "private void writeMetadataChangeMarkerFile() {\n try {\n //noinspection ResultOfMethodCallIgnored\n new File(pathsProvider.getLocalProgramTempDir(), \"dbchangemarker.txt\").createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n public StorageOutputStream create(File file) throws IOException {\n\treturn null;\n }", "@Override\n public void createDirectory(File storageName) throws IOException {\n }", "public static void createSaveFile( )\n {\n try\n {\n new File( \"data\" ).mkdirs( );\n PrintWriter writer = new PrintWriter( \"data/\" + Game.instance.getCurrentSaveFile( ).SAVEFILENAME + \".txt\", \"UTF-8\" );\n writer.println( \"dkeys: \" + Game.START_DIAMOND_KEY_COUNT );\n writer.close( );\n }\n catch ( IOException e )\n {\n e.printStackTrace( );\n System.exit( 1 );\n }\n }", "private FSDataOutputStream createNewFile() throws Exception {\n\t\tlogger.traceEntry();\n\t\tPath newFile = new Path(rootDirectory, \"dim_\" + System.currentTimeMillis() + \".json\");\n\t\tlogger.debug(\"Creating file \" + newFile.getName());\n\t\tFSDataOutputStream dataOutputStream = null;\n\n\t\tif (!hadoopFileSystem.exists(newFile)) {\n\t\t\tdataOutputStream = hadoopFileSystem.create(newFile);\n\t\t} else {\n\t\t\tdataOutputStream = hadoopFileSystem.append(newFile);\n\t\t}\n\n\t\tdataOutputStreams.clear();\n\t\tdataOutputStreams.add(dataOutputStream);\n\t\tlogger.traceExit();\n\t\treturn dataOutputStream;\n\t}", "public File createLoneBuffer()\n {\n String bufferName = \"#\" + \"Untitled\" + (++this.untitledCounter) + \".btm\";\n File buffer = new File(this.getHome() + bufferName);\n\n this.buffer2file.put(buffer, null);\n\n return buffer;\n }", "@Produces\n\tpublic Path produceFile() throws IOException{\n\t\tlogger.info(\"The path (generated by PathProducer) will be injected here - # Path : \"+path);\n\t\tif(Files.notExists(path)){\n\t\t\tFiles.createDirectory(path);\n\t\t\tlogger.info(\" Directory Created :: \" +path);\n\t\t}\n\t\t/*\n\t\t * currentTimeMillis will be injected by NumberPrefixProducer and has a seperate qualifier\n\t\t */\n\t\tPath file = path.resolve(\"myFile_\" + currentTimeMillis + \".txt\");\n\t\tlogger.info(\"FileName : \"+file);\n\t\tif(Files.notExists(file)){\n\t\t\tFiles.createFile(file);\n\t\t}\n\t\tlogger.info(\" File Created :: \" +file);\n\t\treturn file;\n\t}", "private void writeToFile(SVGGraphics2D generator, String path) throws IOException {\n\t\tFile file = new File(path);\n\t\tif (!file.exists())\n\t\t\tfile.createNewFile();\n\t\tFileWriter fw = new FileWriter(file);\n\t\tPrintWriter writer = new PrintWriter(fw);\n\t\tgenerator.stream(writer);\n\t\twriter.close();\n\t}", "public void createTestFileWithoutKey() {\n\t\tList<String> lines = new ArrayList<>(0);\n\t\tPath file = Paths.get(TEST_FILE_NAME);\n\t\ttry {\n\t\t\tFiles.write(file, lines);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Nonnull\r\n @Override\r\n public FileSystem produce() throws IOException {\r\n return newInstance();\r\n }", "private Path createMobStoreFile(String family) throws IOException {\n return createMobStoreFile(HBaseConfiguration.create(), family);\n }", "protected void createHMetisOutFilePath() {\n\t\tString file = \"\";\n\t\tfile += \"TEMP_GRAPH_FILE.hgr.part.\";\n\t\tfile += this.getPartitioner().getPartition().getNumBlock();\n\t\tthis.setHMetisOutFile(file);\t\n\t}", "@Override\n public FSDataOutputStream create(Path f) throws IOException {\n return super.create(f);\n }", "Write createWrite();", "@Override\n public File createFile(String path) throws IOException {\n String pathStr=path+fileSeparator+\"Mail.json\";\n File file = new File(pathStr);\n file.createNewFile();\n return file;\n }", "public static File createSmallFile() throws IOException{\n\t\tFile smallFile = File.createTempFile(\"TempFile\", \".txt\");\n\t\tsmallFile.deleteOnExit();\n\t\t\n\t\tWriter writer = new OutputStreamWriter(new FileOutputStream(smallFile));\n\t\twriter.write(\"0\");\n\t\twriter.close();\n\t\treturn smallFile;\n\t\t\t\t\n\t}", "private File createTempFile(TransferSongMessage message)\n throws IOException {\n File outputDir = MessagingService.this.getCacheDir(); // context being the Activity pointer\n String filePrefix = UUID.randomUUID().toString().replace(\"-\", \"\");\n int inx = message.getSongFileName().lastIndexOf(\".\");\n String extension = message.getSongFileName().substring(inx + 1);\n File outputFile = File.createTempFile(filePrefix, extension, outputDir);\n return outputFile;\n }", "public File generateFile()\r\n {\r\n return generateFile(null);\r\n }", "private String createEmptyLocationForHive(ArcticTable arcticTable) {\n String newLocation = ((SupportHive) arcticTable).hiveLocation() + \"/ts_\" + System.currentTimeMillis();\n OutputFile file = arcticTable.io().newOutputFile(newLocation + \"/.keep\");\n try {\n file.createOrOverwrite().close();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n return newLocation;\n }", "private void createDefaultMarker(Point2D framePosition) {\n Point newPoint = activeTrajectory.copyLastPoint();\n newPoint.setX((int) Math.round(framePosition.getX()));\n newPoint.setY((int) Math.round(framePosition.getY()));\n\n activeTrajectory.set(getCurrentFrame(), newPoint);\n save(activeTrajectory);\n }", "File createFile(String name) throws IOException {\n File storageFile = File.createTempFile(FILE_PREFIX + name + \"_\", null, this.subDirectories[fileCounter.getAndIncrement()&(this.subDirectories.length-1)]); //$NON-NLS-1$\n if (LogManager.isMessageToBeRecorded(org.teiid.logging.LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {\n LogManager.logDetail(org.teiid.logging.LogConstants.CTX_BUFFER_MGR, \"Created temporary storage area file \" + storageFile.getAbsoluteFile()); //$NON-NLS-1$\n }\n return storageFile;\n }", "public InstrumentedFileOutputStream(String name, boolean append, \r\n String recId) throws FileNotFoundException {\r\n super(name, append);\r\n this.recId = recId;\r\n }", "public\n BioterrainMarker() {\n\t\tmarker = new BioterrainMarkerDb();\n\t\tisNew = true;\n }", "public static File createPlayerFile(){\n try {\n playerFile = new File(System.getProperty(\"user.dir\") + \"/PlayerFiles/\" + \".txt\"); //creates player file, can it run on android?\n playerFile.createNewFile();\n }catch (IOException e){\n e.printStackTrace();\n }\n finally {\n return playerFile;\n }\n }", "public void crearPrimerFichero(){\n File f=new File(getApplicationContext().getFilesDir(),\"datos.json\");\n // si no existe lo creo\n if(!f.exists()) {\n String filename = \"datos.json\";\n String fileContents = \"[]\";\n FileOutputStream outputStream;\n\n try {\n outputStream = openFileOutput(filename, Context.MODE_PRIVATE);\n outputStream.write(fileContents.getBytes());\n outputStream.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n }", "@Nullable\n @Override\n public Path getPathToOutputFile() {\n return null; // I mean, seriously? OK.\n }", "private String saveTmpFile(ByteBuffer b, int offset, int len, String filename_hint) {\n\t\t\tString path = \"\";\n\t\t\tif (len > 0) {\n\t\t\t\tFileOutputStream fileOutputStream = null;\n\t\t\t\ttry {\n\t\t\t\t\tTempFile tempFile = this.tempFileManager.createTempFile(filename_hint);\n\t\t\t\t\tByteBuffer src = b.duplicate();\n\t\t\t\t\tfileOutputStream = new FileOutputStream(tempFile.getName());\n\t\t\t\t\tFileChannel dest = fileOutputStream.getChannel();\n\t\t\t\t\tsrc.position(offset).limit(offset + len);\n\t\t\t\t\tdest.write(src.slice());\n\t\t\t\t\tpath = tempFile.getName();\n\t\t\t\t} catch (Exception e) { // Catch exception if any\n\t\t\t\t\tthrow new Error(e); // we won't recover, so throw an error\n\t\t\t\t} finally {\n\t\t\t\t\tsafeClose(fileOutputStream);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn path;\n\t\t}", "private HFile.Writer getNewWriter(final HFile.Writer writer,\n final Path familydir)\n throws IOException {\n close(writer);\n return new HFile.Writer(fs, StoreFile.getUniqueFile(fs, familydir),\n blocksize, compression, KeyValue.KEY_COMPARATOR);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(97);\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\\\"\");\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\\\"\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\\\"\");\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n simpleNode0.setIdentifier(\"<\");\n StringWriter stringWriter0 = new StringWriter();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\\\"\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"<\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"{>%;1sZP#Dq\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"*ge\");\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, true, false);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"Fel8BN^#Fkq[^^KqS\");\n simpleNode0.dump(\"Fel8BN^#Fkq[^^KqS\", stringWriter0);\n assertEquals(\"<MarkerAnnotation>\\n <identifier>*lt</identifier>\\n</MarkerAnnotation>\\n\", stringWriter0.toString());\n \n String string0 = simpleNode0.toString();\n assertEquals(\"MarkerAnnotation : <\", string0);\n }", "@Override\n protected void createFile(String directoryName, String fileNamePrefix) {\n }", "@Override\n public OutputStream openInternalOutputFile(String pathname) throws IOException {\n return new FileOutputStream(pathname);\n }", "private String generateFilename() {\n UUID uuid = UUID.randomUUID();\n return uuid.toString();\n }", "Data() throws IOException {\n // Initialise new default path from scratch\n path = Path.of(\"src/main/data/duke.txt\");\n new File(\"src/main/data\").mkdirs();\n new File(path.toString()).createNewFile();\n }", "private void CreateNewFile() {\n\tcheckState();\n\t\n\tif (CanR=CanW=true)\n\t{\n\t\t\n\t\ttry {\n\t\t root = Environment.getExternalStorageDirectory();\n\t\t \n\t\t if (root.canWrite()){\n\t\t gpxfile = new File(root, \"Speed_SD.csv\");\n\t\t gpxwriter = new FileWriter(gpxfile,true);\n\t\t out = new BufferedWriter(gpxwriter);\nout.append(\"\"+\",\"+\"\"+\",\"+\"\");\n\t\t out.newLine();\n\t\t }\n\t\t} catch (IOException e) {\n\t\t //Log.e(, \"Could not write file \" + e.getMessage());\ne.printStackTrace();\n\t\t\n\t}\n\t\t\n}\n\t\t}", "private void createFile() {\n if (mDriveServiceHelper != null) {\n Log.d(\"error\", \"Creating a file.\");\n\n mDriveServiceHelper.createFile()\n .addOnSuccessListener(fileId -> readFile(fileId))\n .addOnFailureListener(exception ->\n Log.e(\"error\", \"Couldn't create file.\", exception));\n }\n }", "public PipedWriter() { throw new RuntimeException(\"Stub!\"); }", "public void emptyFile() throws IOException {\n FileWriter fileWriter = new FileWriter(filePath);\n fileWriter.close();\n }", "private File m29051a(String str) {\n File externalStorageDirectory = Environment.getExternalStorageDirectory();\n if (externalStorageDirectory == null) {\n return null;\n }\n File file = new File(String.format(\"%s%s%s\", new Object[]{externalStorageDirectory.getAbsolutePath(), File.separator, str}));\n if (!file.exists()) {\n file.mkdirs();\n }\n return file;\n }", "private File createNewFile(String prefix){\n if(prefix==null || \"\".equalsIgnoreCase(prefix)){\n prefix=\"IMG_\";\n }\n File newDirectory = new File(Environment.getExternalStorageDirectory()+\"/mypics/\");\n if(!newDirectory.exists()){\n if(newDirectory.mkdir()){\n Log.d(mContex.getClass().getName(), newDirectory.getAbsolutePath()+\" directory created\");\n }\n }\n File file = new File(newDirectory,(prefix+ System.currentTimeMillis()+\".jpg\"));\n if(file.exists()){\n //this wont be executed\n file.delete();\n try {\n file.createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n return file;\n }", "private void createWriter() throws IOException {\n if (outputFile.exists()) {\n outputFile.delete();\n }\n FileWriter outFw = null;\n try {\n outFw = new FileWriter(outputFile.getAbsolutePath());\n } catch (IOException e) {\n LOG.error(\"Can not create writer for {} {}\", outputFile.getAbsolutePath(), e);\n throw e;\n }\n this.bufferedWriter = new BufferedWriter(outFw);\n writeOutputLine(\"User Agent - started\");\n }", "@Test\n public void testStorageLocationMkdirs() throws Exception {\n MemoryBackendCheckpointStorageAccess storage =\n new MemoryBackendCheckpointStorageAccess(\n new JobID(), randomTempPath(), null, DEFAULT_MAX_STATE_SIZE);\n\n File baseDir = new File(storage.getCheckpointsDirectory().getPath());\n assertFalse(baseDir.exists());\n\n // mkdirs only be called when initializeLocationForCheckpoint\n storage.initializeLocationForCheckpoint(177L);\n assertTrue(baseDir.exists());\n }", "private File createTempFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File albumF = getAlbumDir();\n File mediaF = null;\n\n profile = IMG_FILE_PREFIX + timeStamp+\"_\";\n mediaF = File.createTempFile(profile, IMG_FILE_SUFFIX, albumF);\n\n return mediaF;\n }", "public static FilePath empty() {\n return EMPTY;\n }", "protected void createHMetisInFilePath() {\n\t\tString file = \"\";\n\t\tfile += this.getRuntimeEnv().getOptionValue(PTArgString.OUTPUTDIR);\n\t\tfile += Utils.getFileSeparator();\n\t\tfile += \"TEMP_GRAPH_FILE.hgr\";\n\t\tthis.setHMetisInFile(file);\n\t}", "private WriterFactory() {\n }", "private File createFilePictures() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String pictureName = \"BEER_\" + timeStamp + \"_\";\n File storageDir = getActivity().getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n pictureName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPicturePath = image.getAbsolutePath();\n return image;\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 Storage(String path) throws IOException {\n assert path != null : \"Path for file storage cannot be null.\";\n file = new File(path);\n if (!file.getParentFile().exists()) {\n file.getParentFile().mkdir();\n file.createNewFile();\n }\n }", "protected IMarkable createMarkable() {\n \t\treturn new Markable();\n \t}", "public void makeRoot() throws FileSystemNotWritableException {\r\n\tif (isWritable()) {\r\n\t\tsetModificationTime();\r\n\t\tsetDir(null);\r\n\t}\r\n\telse {\r\n\t\tthrow new FileSystemNotWritableException(this);\r\n\t}\r\n}", "public void createFiles() {\r\n try {\r\n FileWriter file = new FileWriter(registerNumber + \".txt\");\r\n file.write(\"Name : \" + name + \"\\n\");\r\n file.write(\"Surname : \" + surname + \"\\n\");\r\n file.write(\"Registration Number : \" + registerNumber + \"\\n\");\r\n file.write(\"Position : \" + position + \"\\n\");\r\n file.write(\"Year of Start : \" + yearOfStart + \"\\n\");\r\n file.write(\"Total Salary : \" + Math.round(totalSalary) + \".00 TL\" +\"\\n\");\r\n file.close();\r\n }\r\n catch(IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void newDemo() {\r\n \t\t\r\n \t\tString date = new SimpleDateFormat(\"yyyy-MM-dd_HH-mm-ss\").format(new Date());\r\n \t\tthis.fileName = this.demoFolder + this.map.replace(\".xml\", \"\") + \"_\" + date + \".r2d\";\r\n \t\ttry {\r\n \t\t\tthis.fos = (FileOutputStream)this.fileIO.writeFile(this.fileName);\r\n \t\t} catch (IOException e) {\r\n \t\t}\r\n \t\t\r\n \t\ttry {\r\n \t\t\tthis.demoParts.put(this.map + \"/\");\r\n \t\t} catch (InterruptedException e) {\r\n \t\t}\r\n \t}", "public InstrumentedFileOutputStream(String name, boolean append)\r\n throws FileNotFoundException {\r\n super(name, append);\r\n }", "private static int generateMarkerId(){\n return snextMarkerId.incrementAndGet();\n\n }", "private PrintWriter getWriter(String signature) throws IOException {\n\n\tFile f = signature2file.get(signature);\n\n\tif (f == null) {\n\n\t throw new IllegalStateException(\"Supposed to have file name for \"\n\t\t + signature + \", but don't???\");\n\t}\n\n\t// Create a FileWriter with 'append'\n\treturn new PrintWriter(new FileWriter(f, true));\n }", "public InstrumentedFileOutputStream(String name, String recId) \r\n throws FileNotFoundException {\r\n super(name);\r\n this.recId = recId;\r\n }", "public void tempSaveToFile() {\n try {\n ObjectOutputStream outputStream = new ObjectOutputStream(\n this.openFileOutput(MenuActivity2048.TEMP_SAVE_FILENAME, MODE_PRIVATE));\n outputStream.writeObject(boardManager);\n outputStream.close();\n } catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }", "FileReference createFile(String fileName, String toolId);", "public\n static\n FileWrapper\n createTempFile( String prefix,\n String suffix,\n boolean deleteOnExit )\n throws IOException\n {\n inputs.notNull( prefix, \"prefix\" );\n\n File tmp = File.createTempFile( prefix, suffix );\n if ( deleteOnExit ) tmp.deleteOnExit();\n\n return new FileWrapper( tmp );\n }", "Path createPath();", "public static void createTempMapsetName() {\r\n UUID id;\r\n String tmpPrefix;\r\n String tmpSuffix;\r\n String tmpBase;\r\n String tmpFolder;\r\n\r\n id = UUID.randomUUID();\r\n tmpPrefix = new String(GrassUtils.TEMP_PREFIX);\r\n tmpSuffix = new String(\"_\" + id);\r\n tmpBase = new String(System.getProperty(\"java.io.tmpdir\"));\r\n if (tmpBase.endsWith(File.separator)) {\r\n tmpFolder = new String(tmpBase + tmpPrefix + tmpSuffix.replace('-', '_') + File.separator + \"user\");\r\n }\r\n else {\r\n tmpFolder = new String(tmpBase + File.separator + tmpPrefix + tmpSuffix.replace('-', '_') + File.separator + \"user\");\r\n }\r\n m_sGrassTempMapsetFolder = tmpFolder;\r\n\r\n }", "@Model \r\n\tprivate static String getDefaultName() {\r\n\t\treturn \"new_fileSystem\";\r\n\t}", "Saver() throws IOException\n\t\t{\n\t\t\tthis(new File(file.getParentFile(),\n\t\t\t\t\"#\" + file.getName() + \"#save#\"));\n\t\t}", "@Nullable\n private static File generateFile(Context context, @NonNull String fileName) {\n File file = null;\n if (isExternalStorageAvailable()) {\n// String path = Environment.getExternalStorageDirectory().getAbsolutePath()+\"/showlog\";\n\n String path = context.getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getAbsolutePath()+\"/showlog\";\n Log.d(\"ZINGLOGSHOW\", path);\n File root = new File(path);\n\n boolean dirExists = true;\n\n if (!root.exists()) {\n dirExists = root.mkdirs();\n }\n\n if (dirExists) {\n file = new File(root, fileName);\n }\n }\n return file;\n }", "private File createNewRotationFile(String clearName, String extension, Path parent){\n\n Path newPath = getPathRotationFile(clearName, lastCountRotation+1, extension, parent);\n try{\n File ret = Files.createFile(newPath).toFile();\n return ret;\n } catch (IOException ex){\n System.out.println(\"Ошибка в создании файла: \"+ex.getMessage());\n }\n System.out.println(\"Ошибка в создании файла: \"+newPath);\n return file;\n }", "public FileSupport(String defaultPath){\n\t this.defaultPath = defaultPath;\n\t \n\t File dir = new File(defaultPath);\n\t \n\t if(!dir.exists()){\n\t\t try{\n\t\t\t dir.mkdir();\n\t\t } catch(SecurityException e){\n\t\t\t \n\t\t }\n\t\t \n\t }\n }", "@Override\n protected CheckpointStorageAccess createCheckpointStorage(Path checkpointDir) throws Exception {\n return new MemoryBackendCheckpointStorageAccess(\n new JobID(), checkpointDir, null, DEFAULT_MAX_STATE_SIZE);\n }", "@Override\r\n\tpublic File createPDF() {\n\t\treturn null;\r\n\t}", "public File toFile() throws WoodException\n {\n if(!exists()) {\n throw new WoodException(\"Attempt to use not existing file path |%s|.\", value);\n }\n return file;\n }", "private void createFile(PonsFileFactory ponsFileFactory, Profile profile){\n moveX(profile);\n ponsFileFactory.setProfile(profile);\n String text = ponsFileFactory.createPonsFile();\n String profileName = profile.getName();\n WriteFile.write(text,pathTextField.getText() + \"/\" + profileName.substring(0,profileName.indexOf(\".\")));\n }", "public void createMarksheet() {\n }", "private static File createTempFile(final byte[] data) throws IOException {\r\n \t// Genera el archivo zip temporal a partir del InputStream de entrada\r\n final File zipFile = File.createTempFile(\"sign\", \".zip\"); //$NON-NLS-1$ //$NON-NLS-2$\r\n final FileOutputStream fos = new FileOutputStream(zipFile);\r\n\r\n fos.write(data);\r\n fos.flush();\r\n fos.close();\r\n\r\n return zipFile;\r\n }", "public interface IOFactory {\n\n public FileIO newFile(String path);\n\n}", "File getDefaultFile();", "private BufferedWriter getWriter(int secretPos) throws IOException {\n\t\tFile file = new File(\"reportingTool_tmp\" + sep + this.uniqueName + \"-\" + \"histogram_\" + this.dataset.getSecrets().get(secretPos).getFileName() + \".txt\");\n\t\tFileWriter writer = new FileWriter(file);\n\t\tBufferedWriter bw = new BufferedWriter(writer);\n\t\treturn bw;\n\t}", "private void createFile() {\n if (mDriveServiceHelper != null) {\n Log.d(TAG, \"Creating a file.\");\n\n mDriveServiceHelper.createFile()\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n //progressDialog.setProgress(100);\n progressDialog.dismiss();\n Toast.makeText(MainActivity.this, \"Download Successful\", Toast.LENGTH_SHORT).show();\n }\n })\n .addOnFailureListener(exception ->\n Log.e(TAG, \"Couldn't Create file.\", exception));}\n }", "private static BufferedWriter createFileWriter(String filePath) {\n String[] pathComponents = filePath.split(\"/data/\");\n //to avoid heavy nesting in output, replace nested directory with filenames\n\n String output = pathComponents[0] + \"/out/rule_comparisons/\" + pathComponents[1].replace(\"/\",\"-\");\n\n File file = new File(output);\n try {\n //create file in this location if one does not exist\n if (!file.exists()) {\n file.createNewFile();\n }\n return new BufferedWriter(new FileWriter(file));\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\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 }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(getString(R.string.day_format)).format(new Date());\n String imageFileName = getString(R.string.image_file_prefix) + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(imageFileName, getString(R.string.image_file_format),\n storageDir\n );\n\n return image;\n }", "@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}", "private BufferedWriter createWriter(String filePath, String fileName)\r\n\t\t\tthrows IOException {\r\n\t\tString fullPath = filePath + \"/\" + fileName;\r\n\t\tFile file = new File(fullPath);\r\n\t\tboolean exists = new File(filePath).exists();\r\n\t\tif (!exists) {\r\n\t\t\tfile.mkdir();\r\n\t\t}\r\n\t\tFileWriter writer = new FileWriter(file);\r\n\t\tBufferedWriter bufferWriter = new BufferedWriter(writer);\r\n\r\n\t\treturn bufferWriter;\r\n\t}", "public StorageManager() {\n makeDirectory();\n }", "@Override\n public File getSaveFile()\n {\n return null;\n }", "public void makeProgressFile() {\n progressData = new File(wnwData, \"progress.dat\");\n try {\n progressData.createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n progressData.setWritable(true);\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 }", "@Override\n public OutputStream openOutputFile(String pathname) throws IOException {\n return new FileOutputStream(pathname);\n }", "public File getScratchDir();", "private void generate() throws FileNotFoundException {\n if (clazz.isInterface())\n generateInterface();\n writer.close();\n }", "public Storage(String filePath) {\n file = new File(filePath);\n try {\n file.getParentFile().mkdir();\n file.createNewFile();\n } catch (IOException e) {\n System.err.println(\"Unable to create file\");\n }\n }", "private final FileOutputStream zabz() {\n Serializable serializable = this.zalj;\n if (serializable == null) {\n serializable = new IllegalStateException(\"setTempDir() must be called before writing this object to a parcel\");\n throw serializable;\n }\n Object object = \"teleporter\";\n String string2 = \".tmp\";\n try {\n serializable = File.createTempFile((String)object, string2, (File)serializable);\n }\n catch (IOException iOException) {\n object = new IllegalStateException(\"Could not create temporary file\", iOException);\n throw object;\n }\n try {\n object = new FileOutputStream((File)serializable);\n int n10 = 0x10000000;\n string2 = ParcelFileDescriptor.open((File)serializable, (int)n10);\n this.zalg = string2;\n ((File)serializable).delete();\n return object;\n }\n catch (FileNotFoundException fileNotFoundException) {\n serializable = new IllegalStateException(\"Temporary file is somehow already deleted\");\n throw serializable;\n }\n }", "@VisibleForTesting\n public File getMetaFile() {\n return new File(getDir(),\n DatanodeUtil.getMetaName(getBlockName(), getGenerationStamp()));\n }", "private static void createTestFile(String path) throws IOException {\n\t\tFile file = new File(path);\n\t\tFileWriter writer = new FileWriter(file);\n\t\twriter.write(\"Jenkins Test : \"+new Date() + \" ==> Writing : \" + Math.random());\n\t\twriter.flush();\n\t\twriter.close();\n\t}", "public static void initializeOutputFolder() {\n\t\tString default_folder = PropertiesFile.getInstance().getProperty(\"default_folder\");\n\t\t\n\t\t// The file has to exist and is a directory (Not just a child file)\n\t\tString fullQualifiedFolderName = getFullyQualifiedFileName(default_folder);\n\t\tFile defaultDir = new File(fullQualifiedFolderName);\n\t\tif (!checkFolder(fullQualifiedFolderName)) {\n\t\t\tboolean dirCreated = defaultDir.mkdir();\n\t\t\tif(dirCreated == false) {\n\t\t\t\tlog.error(\"Could not create generation folder\");\n\t\t\t}\n\t\t} else\n\t\t\tdeleteFolderRecursively(defaultDir);\n\t}", "private File createImageFile() throws IOException {\n @SuppressLint({\"NewApi\", \"LocalSuppress\"}) String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.getDefault()).format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n return File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n }", "public static void init(){\n Path path = FileDirectoryUtil.getPath(\"src\", \"fileIO\", \"test.txt\");\n FileDirectoryUtil.tryCreateDirectory(path);\n\n // Try to create the file\n path = Paths.get(path.toAbsolutePath().toString(), \"test.txt\");\n FileDirectoryUtil.tryCreateFile(path);\n\n // Print out the final location of the file\n System.out.println(path.toAbsolutePath());\n\n // Try to write to the file\n IOUtil.tryWriteToFile(getContent(), path);\n\n // Try to print the content of the file\n IOUtil.tryPrintContents(path);\n\n }", "private String getTempFileString() {\n final File path = new File(getFlagStoreDir() + String.valueOf(lJobId) + File.separator);\n // // If this does not exist, we can create it here.\n if (!path.exists()) {\n path.mkdirs();\n }\n //\n return new File(path, Utils.getDeviceUUID(this)+ \".jpeg\")\n .getPath();\n }", "protected void storeDataPath(FSDataOutputStream output, DataEntry storageEntry) throws IOException {\n OBJECT_MAPPER.writeValue(output, storageEntry);\n }", "public static AddressableDataFile getEmptyImmutableDataFile() {\n return new EmptyDataFile();\n }" ]
[ "0.6352825", "0.5926979", "0.5798716", "0.5632999", "0.548742", "0.5440764", "0.530832", "0.52839476", "0.51685786", "0.5159995", "0.5111541", "0.5089324", "0.508504", "0.5079639", "0.5067076", "0.5035104", "0.5007376", "0.49819985", "0.49656528", "0.49512228", "0.49428877", "0.4913802", "0.49134725", "0.48825255", "0.48592925", "0.48544478", "0.48485178", "0.4839816", "0.48381287", "0.48283282", "0.48282433", "0.48281604", "0.48179543", "0.48177794", "0.48129353", "0.4800133", "0.48000458", "0.47969502", "0.4792522", "0.4790772", "0.4771431", "0.47532767", "0.4752311", "0.47435293", "0.474276", "0.47317556", "0.47267213", "0.47215572", "0.47182372", "0.47141066", "0.47044712", "0.47017106", "0.470039", "0.4700147", "0.46995097", "0.46745712", "0.46677667", "0.46674338", "0.46662816", "0.46603486", "0.46511206", "0.46500024", "0.46492356", "0.46432832", "0.46344504", "0.46342108", "0.46299636", "0.46233892", "0.4620546", "0.46181896", "0.46160907", "0.46110335", "0.46080655", "0.46067286", "0.45914552", "0.45841858", "0.4582721", "0.45807484", "0.45797834", "0.45790264", "0.45758536", "0.45723706", "0.4571661", "0.45714697", "0.45706508", "0.45687512", "0.45671943", "0.45617387", "0.45519224", "0.45506638", "0.4546792", "0.45426455", "0.454054", "0.45400074", "0.45393753", "0.45309392", "0.4529424", "0.45293143", "0.4529124", "0.45278367" ]
0.6193825
1
final File folder = new File("E:\\STUDY\\Advanced Computing Concepts\\Lab9\\Languages\\W3C Web Pages"); String[] _arrayOfFilesName = listFilesForFolder(folder);
public static void main(String[] args) throws IOException,FileNotFoundException,NullPointerException { int _fileNumber = 1; try { File _directory = new File("C:\\Users\\Aayush\\Desktop\\Advance Computing Concepts\\W3C Web Pages"); File[] _fileArray = _directory.listFiles(); File[] _fileArray2 = new File[102]; int _numberOfFiles=0; for(int _i=0;_i<(_fileArray.length);_i++) { if(_fileArray[_i].isFile()) { _fileArray2[_numberOfFiles] = _fileArray[_i]; _numberOfFiles++; } } for(int i=0;i<100;i++) { convertHtmlToText(_fileArray2[i],_fileNumber); _fileNumber = _fileNumber + 1; } } catch (Exception e) { System.out.println("Exception:"+e); } finally { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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[] allDocs() {\r\n\t\t\r\n\t\tFile folderNames = new File(folderName);\r\n int i=0;\r\n File[] files = folderNames.listFiles();\r\n String[] documents = new String[files.length];\r\n for (File file: files)\r\n {\r\n \tdocuments[i] = file.getName();\r\n i++;\r\n }\r\n return documents;\t\r\n\t}", "public static List<String> getFile(String path){\n File file = new File(path);\n // get the folder list\n File[] array = file.listFiles();\n\n List<String> fileName = new ArrayList<>();\n\n for(int i=0;i<array.length;i++){\n if(array[i].isFile()){\n // only take file name\n fileName.add(array[i].getName());\n }else if(array[i].isDirectory()){\n getFile(array[i].getPath());\n }\n }\n return fileName;\n }", "public static List<String> getFilesFromDirectory(){\n File wordTextFolder = new File(FOLDER_OF_TEXT_FILES.toString());\n File[] filesInsideFolder = wordTextFolder.listFiles();\n List<String> paths = new ArrayList<>();\n String name;\n\n for (File txtFile : filesInsideFolder){\n paths.add( txtFile.getPath() );\n name = txtFile.getName();\n name = name.substring(0, name.lastIndexOf('.'));\n\n if(name.length() > Table.maxFileNameLength){\n Table.setMaxFileNameLength(name.length());\n }\n }\n return paths;\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 }", "public String [] listContents(File directory) throws IOException{\n\t\tFile [] dirContents = directory.listFiles();\n\t\tString [] arrOfFileNames = new String[dirContents.length];\n\t\tint i = 0;\n\t\tfor(File file: dirContents) {\n\t\t\tarrOfFileNames[i++] = file.getName();\n }\n return arrOfFileNames;\n }", "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 List<String> getFiles();", "List<String> getFiles(String path) throws IOException;", "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}", "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 static void main(String[] args) {\nFile files=new File(\"C:\\\\Users\\\\k74\");\nString filenames[]=files.list();\nfor(String filename :filenames)\n\tSystem.out.println(filename);\n\t}", "public String[] getFileName();", "public abstract List<String> getFiles( );", "public String[] getListOfFileInArray() {\n String[] items = new String[this.listOfFile.size()];\n for(int x=0;x<this.listOfFile.size();x++) {\n items[x]=this.listOfFile.get(x).getName();\n }\n return items;\n }", "public String[] listFilesString() {\n\t\tFile[] FL = listFiles();\n\t\treturn FU.listFilesString(FL);\n\t}", "File[] getFilesInFolder(String path) {\n return new File(path).listFiles();\n }", "List<Path> getFiles();", "public Vector<String> listFiles()\n {\n Vector<String> fileNames = new Vector<String>();\n\n File[] files = fileLocation.listFiles();\n\n for (File file : files)\n {\n fileNames.add(file.getName());\n }\n\n return fileNames;\n }", "private File[] getFilesInDirectory() {\n\t\t//Show Directory Dialog\n\t\tDirectoryChooser dc = new DirectoryChooser();\n\t\tdc.setTitle(\"Select Menu File Directory\");\n\t\tString folderPath = dc.showDialog(menuItemImport.getParentPopup().getScene().getWindow()).toString();\n\t\t\n\t\t//Update Folder location text\n\t\ttxtFolderLocation.setText(\"Import Folder: \" + folderPath);\n\t\t//Now return a list of all the files in the directory\n\t\tFile targetFolder = new File(folderPath);\n\t\t\n\t\treturn targetFolder.listFiles(); //TODO: This returns the names of ALL files in a dir, including subfolders\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}", "public static void getAllFiles()\n\t{\n\t\t//Getting the File Name\n\n\t\tList<String> fileNames = FileManager.getAllFiles(folderpath);\n\t\n\t\tfor(String f:fileNames)\n\t\tSystem.out.println(f);\n\t\n\t}", "public List listFiles(String path);", "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 ArrayList<String> listFilesForFolder(File folder, TaskListener listener) {\n \tArrayList<String> lista = new ArrayList<String>();\n \tif(folder.exists()){\n\t \tFile[] listOfFiles = folder.listFiles();\n\t\t\t if(listOfFiles != null){\t\n\t\t\t\tfor (File file : listOfFiles) {\n\t\t\t\t\t if (file.isDirectory()) {\t\n\t\t\t\t \tlista.add(file.getName());\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t }\n\t\t}\n\t\treturn lista;\n\t}", "String[] getFileTypes();", "private File[] getResourceFolderFiles(String folder) {\n\t\tClassLoader loader = Thread.currentThread().getContextClassLoader();\n\t\tURL url = loader.getResource(folder);\n\t\tString path = url.getPath();\n\n\t\treturn new File(path).listFiles();\n\n\t}", "protected abstract String[] getFolderList() throws IOException;", "java.util.List<java.lang.String>\n getFileNamesList();", "public String[] listDirectory( String directory, FileType type );", "protected File[] getFiles() {\r\n DirectoryScanner scanner = new DirectoryScanner(rootDir,true,\"*.xml\");\r\n List<File> files = scanner.list();\r\n return files.toArray(new File[files.size()]);\r\n }", "public static File[] readFileFolder(String filepath) throws FileNotFoundException, IOException {\n File file = new File(filepath);\n if (file.isDirectory()) {\n File[] filelist = file.listFiles();\n return filelist;\n }\n \n return null;\n }", "public File[] listFiles(File file) {\n if (executionEnvironment.isLocal()) {\n return file.listFiles();\n } else {\n final ExitStatus res = ProcessUtils.execute(executionEnvironment, \"ls\", \"-A1\"); //NOI18N\n if (res.isOK()) {\n String files = res.getOutputString();\n if (files != null) {\n BufferedReader bufferedReader = new BufferedReader(new StringReader(files));\n String line;\n ArrayList<File> lines = new ArrayList<File>();\n try {\n while ((line = bufferedReader.readLine()) != null) {\n lines.add(new File(line));\n }\n bufferedReader.close();\n } catch (IOException ex) {\n //hardly can happen during reading string\n Exceptions.printStackTrace(ex);\n return null;\n }\n return lines.toArray(new File[lines.size()]);\n }\n }\n }\n return null;\n }", "private List<File> getContents(String whichFiles) {\n List<File> result = new ArrayList<File>();\n Files f1 = mService.files();\n Files.List request = null;\n\n do {\n try { \n request = f1.list();\n // get the language folders from drive\n request.setQ(whichFiles);\n FileList fileList = request.execute();\n \n result.addAll(fileList.getItems());\n request.setPageToken(fileList.getNextPageToken());\n } catch (UserRecoverableAuthIOException e) {\n startActivityForResult(e.getIntent(), REQUEST_AUTHORIZATION);\n } catch (IOException e) {\n e.printStackTrace();\n if (request != null) \n request.setPageToken(null);\n }\n } while ((request.getPageToken() != null) \n && (request.getPageToken().length() > 0));\n \n return result;\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 static List<String> getAllFileNames() {\n List<String> fileNames = new ArrayList();\n\n String sql = \"SELECT fileName FROM files;\";\n\n try (Connection conn = DatabaseOperations.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n while (rs.next()) {\n fileNames.add(rs.getString(\"fileName\"));\n }\n return fileNames;\n } catch (SQLException e) {\n System.out.println(\"getAllFileIDs: \" + e.getMessage());\n }\n return null;\n }", "static void viewFiles()\r\n\t {\n\t\t File directoryPath = new File(\"D:\\\\java_project\");\r\n\t File filesList[] = directoryPath.listFiles();\r\n System.out.println(\"List of files and directories in the specified directory:\");\r\n\t for(File file : filesList) \r\n\t {\r\n\t System.out.println(\"File name: \"+file.getName());\r\n\t System.out.println(\"File path: \"+file.getAbsolutePath());\r\n\t System.out.println(\"Size :\"+file.getTotalSpace());\r\n\t System.out.println(\"last time file is modified :\"+new Date(file.lastModified()));\r\n System.out.println(\" \");\r\n\t }\r\n }", "public static String[] listFilesAsArray() {\n\t\t// Recursively find all .java files\n\t\tFile path = new File(Project.pathWorkspace());\n\t\tFilenameFilter filter = new FilenameFilter() {\n\n\t\t\tpublic boolean accept(File directory, String fileName) {\n\t\t\t\treturn fileName.endsWith(\".java\");\n\t\t\t}\n\t\t};\n\t\tCollection<File> files = listFiles(path, filter, true);\n\n\t\tArrayList<File> t = new ArrayList<File>(files);\n\t\tfor (int i = 0; i < t.size(); i++) {\n\t\t\tString s = t.get(i).getAbsolutePath();\n\t\t\tif (s.contains(\"XX\") || s.contains(\"testingpackage\") || s.contains(\"datageneration\")) {\n\t\t\t\tt.remove(t.get(i));\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t\tfiles = t;\n\n\t\t// Convert the Collection into an array\n\t\tFile[] allJavaFiles = new File[files.size()];\n\t\tfiles.toArray(allJavaFiles);\n\n\t\tString[] allTestClasses = new String[allJavaFiles.length];\n\t\tString temp = \"\";\n\n\t\t// convert file path to full package declaration for the class\n\t\tfor (int i = 0; i < allJavaFiles.length; i++) {\n\t\t\ttemp = allJavaFiles[i].toString();\n\t\t\ttemp = temp.replace(\".java\", \"\").replace(\"\\\\\", \".\"); // remove .java convert backslash\n\t\t\tif (temp.indexOf(\"com.textura\") < 0) {\n\t\t\t\tallTestClasses[i] = \"null\";\n\t\t\t} else {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\"com.textura\"));\n\t\t\t\ttemp = temp.replace(\"com.\", \"\");\n\t\t\t\tallTestClasses[i] = temp;\n\t\t\t}\n\t\t}\n\t\treturn allTestClasses;\n\t}", "public File[] getFiles(File folder) {\n\t\treturn folder.listFiles();\n\t}", "private static ArrayList<String> getImagesInFileSystem() {\n\t\t// get file list in database\n\t\tArrayList<String> fileNameList = new ArrayList<String>();\n\t\t\n\t\tFile folder = new File(IMAGE_DIRECTORY);\n\t File[] listOfFiles = folder.listFiles();\n\t \n\t for (File currFile : listOfFiles) {\n\t if (currFile.isFile() && !currFile.getName().startsWith(\".\")) {\n\t \t fileNameList.add(currFile.getName());\n\t }\n\t }\n\t \n\t return fileNameList;\n\t}", "public String[] getFileNamesFromDir(File dir) {\n\t\tFile[] allFiles = dir.listFiles();\n\t\tSystem.out.println(\"Total Files: \" + allFiles.length);\n\t\tString[] allFileNames = new String[allFiles.length];\n\t\tfor (int i = 0; i < allFiles.length; i++) {\n\t\t\tallFileNames[i] = allFiles[i].getName();\n//\t\t\tSystem.out.println(\"\\t\" + allFiles[i].getName());\n\t\t}\n\t\t\n\t\treturn allFileNames;\n\t}", "List<File> getSystemDescriptionFiles();", "private static ArrayList<File> buildFilesArray() {\n ArrayList<File> result = new ArrayList<>();\n rAddFilesToArray(workingDirectory, result);\n return result;\n }", "public List<File> getFiles();", "public String[] getFiles() throws Exception\n {\n if (dir == null)\n {\n throw new Exception(\"No directory specified for filelist.\");\n }\n\n if (filenames.size() == 0)\n {\n throw new Exception(\"No files specified for filelist.\");\n }\n\n String[] result = new String[filenames.size()];\n filenames.copyInto(result);\n return result;\n }", "java.util.List<java.lang.String>\n getFileNamesList();", "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 }", "private static void getFile(String path){\n File file = new File(path); \r\n // get the folder list \r\n File[] array = file.listFiles();\r\n // flag = array.length;\r\n \r\n for(int i=0;i<array.length;i++){ \r\n if(array[i].isFile()){ \r\n // only take file name \r\n //System.out.println(\"^^^^^\" + array[i].getName()); \r\n // take file path and name \r\n //System.out.println(\"#####\" + array[i]); \r\n // take file path and name \r\n System.out.println(\"*****\" + array[i].getPath()); \r\n\t\t\tcalculate_Ave(array[i].getPath());\r\n } \r\n }\r\n}", "public File[] showFiles(String filePath) throws FileNotFoundException {\r\n File folder = new File(filePath);\r\n File[] listOfFiles = folder.listFiles();\r\n if (listOfFiles == null) {\r\n throw new FileNotFoundException(\"No files found in directory\");\r\n }\r\n for (int i = 0; i < listOfFiles.length; i++) {\r\n if (listOfFiles[i].isFile()) {\r\n System.out.println(\"(\"+i+\") \" + listOfFiles[i].getName());\r\n }\r\n }\r\n return listOfFiles;\r\n }", "public static File[] findFiles(String fileName) {\n List<File> fileList_ = new ArrayList<File>();\n if(fileRepoPath_ != null)\n listFiles(new File(fileRepoPath_),fileName, fileList_);\n if(fileList_.size()==0) {\n try {\n \t Enumeration<URL> en_ = FileFinder.class.getClassLoader().getResources(fileName);\n \t while(en_.hasMoreElements()) {\n \t fileList_.add(new File(en_.nextElement().getFile().replaceAll(\"%20\",\" \")));\n \t }\n \t } \n \t catch(IOException e) { }\n }\n \treturn (File[])fileList_.toArray(new File[fileList_.size()]);\n }", "public List<String> getDownloadableFiles() throws IOException {\n List<String> fileNameList = new ArrayList<>();\n Files.walk(Paths.get(this.sharedFolder)).forEach(ruta -> {\n if (Files.isRegularFile(ruta)) {\n fileNameList.add(ruta.getFileName().toString());\n }\n });\n return fileNameList;\n }", "public String[] getFileNames(String fileNames,boolean isFoldersRequired) throws FileSystemUtilException\r\n\t{\t\t\r\n\t\tVector<String> files = new Vector<String>();\r\n\t\tString[] filesList = null;\r\n\t\tString fileName = null;\r\n\t\tlogger.debug(\"Begin: \"+getClass().getName()+\":getFileNamesArray()\");\r\n\t\t\r\n\t\tlogger.debug(\"filenames are \"+fileNames);\r\n\t\tBufferedReader reader = new BufferedReader(new StringReader(fileNames));\r\n\t\ttry \t\r\n\t\t{//it is used when only folders required\r\n\t\t\tif(isFoldersRequired)\r\n\t\t\t{\r\n\t\t\t\twhile((fileName = reader.readLine()) != null )\r\n\t\t\t\t{\r\n\t\t\t\t\tif(fileName.endsWith(\"/\") && isValidString(fileName))\r\n\t\t\t\t\t\tfiles.add(fileName);\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse if(!isFoldersRequired){//it is used when only files required\r\n\t\t\twhile((fileName = reader.readLine()) != null)\r\n\t\t\t{\r\n\t\t\t\tif(!fileName.endsWith(\"/\") && isValidString(fileName))\r\n\t\t\t\t\tfiles.add(fileName);\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\tlogger.debug(\"files are \"+files);\r\n\t\t\tif(files.size() != 0)\r\n\t\t\t{\r\n\t\t\t\tfilesList = new String[files.size()];\r\n\t\t\t\tfor(int i = 0; i < files.size(); i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tString tempFname = (String) files.get(i);\r\n\t\t\t\t\tif(tempFname.endsWith(\"*\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttempFname = tempFname.substring(0,tempFname.length()-1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\tfilesList[i]= tempFname;\r\n\t\t\t\t\tlogger.debug(\"file name at \"+i+\" is \"+filesList[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tfilesList = new String[0];\r\n\t\t\t}\t\t\t\r\n\t\t}\t\t\r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\tthrow new FileSystemUtilException(\"ET0021\",e);\t\t\t\r\n\t\t}\r\n\t\tlogger.debug(\"length of fileslist is \"+filesList.length);\r\n\t\tlogger.debug(\"End: \"+getClass().getName()+\":getFileNamesArray()\");\r\n\t\treturn filesList;\r\n\t}", "public String[] listFilesString(String extension) {\n\t\tFile[] FL = listFiles(extension);\n\t\treturn FU.listFilesString(FL);\n\t}", "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 File[] getLocalFiles() {\n\t\tFile[] filesArray = new File(this.fileStorage.toString()).listFiles(\n\t\t\t\tnew FileFilter() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean accept(File file) {\n\t\t\t\t\t\treturn !file.isHidden();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\treturn filesArray;\n\t}", "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}", "public File[] getAllFiles(String sFolderPath) {\n\n File[] files = null;\n ArrayList<File> altemp = new ArrayList<File>();\n try {\n File folder = new File(sFolderPath);\n files = folder.listFiles();\n\n for (int i = 0; i < files.length; i++) {\n if (files[i].isFile()) {\n altemp.add(files[i]);\n }\n }\n\n files = null;\n files = altemp.toArray(new File[altemp.size()]);\n\n } catch (Exception e) {\n files = null;\n } finally {\n return files;\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 void getImagesFromFolder() {\n File file = new File(Environment.getExternalStorageDirectory().toString() + \"/saveclick\");\n if (file.isDirectory()) {\n fileList = file.listFiles();\n for (int i = 0; i < fileList.length; i++) {\n files.add(fileList[i].getAbsolutePath());\n Log.i(\"listVideos\", \"file\" + fileList[0]);\n }\n }\n }", "public File[] listFiles() {\n\n\t\tFileFilter Ff = f -> true;\n\t\treturn this.listFiles(Ff);\n\t}", "public String[] getListOfFiles() {\n\t\treturn listOfFiles;\n\t}", "private static String[] getAllFiles(File directory, String extension) {\n // TODO: extension has to be .txt, .doc or .docx\n File[] files = directory.listFiles(File::isFile);\n String[] filepaths = new String[files.length];\n String regex = \"^.*\" + extension + \"$\";\n for (int i = 0; i < filepaths.length; i++) {\n if (files[i].getPath().matches(regex)) {\n filepaths[i] = files[i].getPath();\n }\n }\n writeOutput(\"The folder \" + directory + \" contains \" + filepaths.length + \" \" + extension + \" file(s).\" + \"\\n\");\n return filepaths;\n }", "public File[] GetAllFiles(String[] fileNames) {\n \tList<File> fileList = new ArrayList<>();\n \tFile dir = new File(fileStorageLocation.toString());\n\n \t\n \tfor (int i = 0; i < fileNames.length; i++) \n \t{\n \t\tString sSearchName = fileNames[i];\n \tFile[] matchingFile = dir.listFiles(new FilenameFilter() {\n \t public boolean accept(File dir, String name) {\n \t return name.endsWith(\"_\" + sSearchName);\n \t }\n \t});\n \t\n \tfileList.add(matchingFile[matchingFile.length-1]);\n \t}\n \tFile[] matchingFiles = fileList.parallelStream().toArray(n -> new File[n]);\n \treturn matchingFiles;\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 }", "List<File> list(String directory) throws FindException;", "private String[] getFileNamesArray(String fileNames) throws FileSystemUtilException\r\n\t{\t\t\r\n\t\tVector<String> files = new Vector<String>();\r\n\t\tString[] filesList = null;\r\n\t\tString fileName = null;\r\n\t\tlogger.debug(\"Begin: \"+getClass().getName()+\":getFileNamesArray()\");\r\n\t\t\r\n\t\tlogger.debug(\"filenames are \"+fileNames);\r\n\t\tBufferedReader reader = new BufferedReader(new StringReader(fileNames));\r\n\t\ttry \r\n\t\t{\r\n\t\t\twhile((fileName = reader.readLine()) != null)\r\n\t\t\t{\r\n\t\t\t\tif(isValidString(fileName))\r\n\t\t\t\t\tfiles.add(fileName);\r\n\t\t\t}\r\n\t\t\tlogger.debug(\"files are \"+files);\r\n\t\t\tif(files.size() != 0)\r\n\t\t\t{\r\n\t\t\t\tfilesList = new String[files.size()];\r\n\t\t\t\tfor(int i = 0; i < files.size(); i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tString tempFname = (String) files.get(i);\r\n\t\t\t\t\tif(tempFname.endsWith(\"*\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttempFname = tempFname.substring(0,tempFname.length()-1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfilesList[i]= tempFname;\r\n\t\t\t\t\tlogger.debug(\"file name at \"+i+\" is \"+filesList[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tfilesList = new String[0];\r\n\t\t\t}\t\t\t\r\n\t\t}\t\t\r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\tthrow new FileSystemUtilException(\"ET0021\",e);\t\t\t\r\n\t\t}\r\n\t\tlogger.debug(\"length of fileslist is \"+filesList.length);\r\n\t\tlogger.debug(\"End: \"+getClass().getName()+\":getFileNamesArray()\");\r\n\t\treturn filesList;\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 static List<String> loadDocuments(String path) throws Exception {\n\t\tFile folder = new File(path);\n\t\tArrayList<String> documents = new ArrayList<String>();\n\t\tfor (final File fileEntry : folder.listFiles()) {\n\t\t\tSystem.out.println(fileEntry.getName());\n\t\t\tif (fileEntry.isFile() && !fileEntry.isHidden()) {\n\t\t\t\tString content = getTextFromHtml(fileEntry);\n\t\t\t\tdocuments.add(content);\n\t\t\t}\n\t\t}\n\t\treturn documents;\n\t}", "java.lang.String getFileNames(int index);", "java.lang.String getFileNames(int index);", "public File[] CreateListFiles() {\n\t\tif (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {\n\t\t\tToast.makeText(this, \"Error! No SDCARD Found!\", Toast.LENGTH_LONG).show();\n\t\t} else {\n\t\t\tfile = new File(Environment.getExternalStorageDirectory(), File.separator + \"/MelanomaPics/\" + File.separator + MelanomaActivity.pacientSelected);\n\t\t\tfile.mkdirs();\n\t\t}\n\t\t// pega todas as imagens do diretorio MelanomaPics e coloca dentro de\n\t\t// uma lista\n\t\tif (file.isDirectory()) {\n\t\t\tlistFile = file.listFiles();\n\t\t}\n\t\treturn listFile;\n\t}", "public static File[] listFiles(File f) {\n return f.listFiles();\n }", "private List<String> returnFiles(int selection) {\n\t\tString path = System.getProperty(\"user.dir\");\n\t\tList<String> allImages = new ArrayList<String>();\n\t\tpath += this.setFolderPath(selection);\n\t\tFile[] files = new File(path).listFiles();\n\n\t\tfor (File file : files) {\n\t\t\tif (file.isFile() && isCorrectFile(file)) {\n\t\t\t\tallImages.add(file.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t\treturn allImages;\n\t}", "public String[] listFiles() throws FileSystemUtilException \r\n\t{\r\n\t\tString remoteDir = null;\r\n\t\tString remoteFileName = null;\r\n\t\tString command = null;\r\n\t\tint signal = -1;\r\n\t\tlogger.debug(\"Begin: \"+getClass().getName()+\":listFiles()\");\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tconnect(); \r\n\t\t\t\r\n\t\t\tint lastSeperatorIndex = -1;\r\n\t\r\n\t\t\tif(remoteFilePath.lastIndexOf(\"/\") != -1){\r\n\t\t\t\tlastSeperatorIndex = remoteFilePath.lastIndexOf(\"/\");\r\n\t\t\t}else if(remoteFilePath.lastIndexOf(\"\\\\\") != -1){\r\n\t\t\t\tlastSeperatorIndex = remoteFilePath.lastIndexOf(\"\\\\\");\r\n\t\t\t}\r\n\t\t\tif(lastSeperatorIndex == remoteFilePath.length()-1)\r\n\t\t\t{\r\n\t\t\t\tremoteDir = remoteFilePath;\r\n\t\t\t\tremoteFileName = \"\";\r\n\t\t\t\tlogger.debug(\"file path ends with / - directory is \"+remoteDir+\" , filename is \"+remoteFileName);\r\n\t\t\t\tcommand = \"cd \"+remoteDir;\t\t\t\r\n\t\t\t\tsignal = executeSimpleCommand(command);\r\n\t\r\n\t\t\t\tif(signal != 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t//invlid directory/file\r\n\t\t\t\t\tthrow new FileSystemUtilException(\"ET0017\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tremoteDir = remoteFilePath.substring(0,lastSeperatorIndex+1);\r\n\t\t\t\tremoteFileName = remoteFilePath.substring(lastSeperatorIndex+1,remoteFilePath.length());\r\n\t\t\t\tlogger.debug(\"file path not ends with / - directory is \"+remoteDir+\" , filename is \"+remoteFileName);\r\n\t\t\t\tcommand = \"cd \"+remoteDir;\r\n\t\t\t\tsignal = executeSimpleCommand(command);\r\n\t\t\t\tif(signal != 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t//invlid directory/file\r\n\t\t\t\t\tthrow new FileSystemUtilException(\"ET0017\");\r\n\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\tif(!remoteFileName.startsWith(\"*.\") && !remoteFileName.endsWith(\".*\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tlogger.debug(\"file/directory name \"+remoteFileName+\" not started with *. or ends wirh .*\");\r\n\t\t\t\t\tcommand = \"cd \"+remoteDir+remoteFileName;\r\n\t\t\t\t\tsignal = executeSimpleCommand(command);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\tif(signal != 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tboolean isFile = false;\r\n\t\t\t\t\t\tcommand = \"ls \"+remoteDir;\r\n\t\t\t\t\t\texecuteSimpleCommand(command);\r\n\t\t\t\t\t\tString[] tempFileNames = getFileNamesArray(output);\r\n\t\t\t\t\t\tfor(int j = 0; j < tempFileNames.length; j++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(remoteFileName.equals(tempFileNames[j]))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tisFile = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(!isFile)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t//invlid directory/file\r\n\t\t\t\t\t\t\tthrow new FileSystemUtilException(\"ET0017\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tlogger.debug(remoteFileName+\" is a file\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlogger.debug(remoteFileName+\" is a directory\");\r\n\t\t\t\t\t\tremoteDir = remoteDir+remoteFileName;\r\n\t\t\t\t\t\tremoteFileName = \"\";\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlogger.debug(\"Before getting list of files : current dir \"+remoteDir+\" getting files list for \"+remoteFileName);\r\n\t\t\tcommand = \"cd \"+remoteDir+\";ls -F \"+remoteFileName;\r\n\t\t\tsignal = executeSimpleCommand(command);\r\n\t\t\tdisconnect();\r\n\t\t\tif(signal != 0)\r\n\t\t\t{\t\t\t \r\n\t\t\t\tthrow new FileSystemUtilException(\"ET0017\");\r\n\t\t\t}\r\n\t\t\tString[] filesList = getFileNamesArray(output);\t\t\r\n\t\t\tlogger.debug(\"End: \"+getClass().getName()+\":listFiles()\");\r\n\t\t\treturn filesList;\r\n\t\t}\r\n\t\t\r\n\t\tcatch(FileSystemUtilException e)\r\n\t\t{\r\n\t\t disconnect();\r\n\t\t if(e.getMessage() != null && e.getMessage().equals(\"FL0071\")){\r\n\t\t \tthrow new FileSystemUtilException(\"FL0071\");\r\n\t\t }\r\n\t\t\tthrow new FileSystemUtilException(e.getErrorCode(),e.getException());\r\n\t\t}\r\n\t\t\r\n\t}", "void getFilesInfoInFolder(String pathToFolder) {\n File[] listOfFiles = getFilesInFolder(pathToFolder);\n for (int i = 0; i < listOfFiles.length; i++) {\n if (listOfFiles[i].isFile()) {\n System.out.println(\"File \" + listOfFiles[i].getName());\n continue;\n }\n\n if (listOfFiles[i].isDirectory()) {\n System.out.println(\"Directory \" + listOfFiles[i].getName());\n }\n }\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 }", "private String[] nlstHelper(String args) {\n // Construct the name of the directory to list.\n String filename = currDirectory;\n if (args != null) {\n filename = filename + fileSeparator + args;\n }\n\n // Now get a File object, and see if the name we got exists and is a\n // directory.\n File f = new File(filename);\n\n if (f.exists() && f.isDirectory()) {\n return f.list();\n } else if (f.exists() && f.isFile()) {\n String[] allFiles = new String[1];\n allFiles[0] = f.getName();\n return allFiles;\n } else {\n return null;\n }\n }", "public String[] GetAllFileNames(String sfileName) {\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.endsWith(\"_\" + sfileName);\n \t }\n \t});\n \t\n \tArrays.sort(matchingFiles);\n return matchingFiles;\n }", "java.util.List<ds.hdfs.generated.FileMetadata> \n getFilesList();", "private static void retrieveFiles(File fileDir) {\n List<String> files = Arrays.asList(fileDir.list());\n if (files.isEmpty()) {\n System.out.println(\"There are no files under current directory.\");\n return;\n }\n Collections.sort(files);\n int numOfFiles = files.size();\n System.out.println(\"There are \" + numOfFiles + \" files under current directory.\");\n for (int i = 1; i <= numOfFiles; i++) {\n System.out.println(i + \" - \" + files.get(i - 1));\n }\n }", "@Override\r\n\tpublic String[] listFolders() throws FileSystemUtilException {\r\n\t\t// getting all the files and folders in the given file path\r\n\t\tString[] files = listFiles();\r\n\t\tList foldersList = new ArrayList();\r\n\t\tfor (int i = 0; i < files.length; i++) {\r\n\t\t\t// all the folder are ends with '/'\r\n\t\t\tif (files[i].endsWith(\"/\") && isValidString(files[i])) {\r\n\t\t\t\tfoldersList.add(files[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tString[] folders = new String[foldersList.size()];\r\n\t\t// getting only folders from returned array of files and folders\r\n\t\tfor (int i = 0; i < foldersList.size(); i++) {\r\n\t\t\tfolders[i] = foldersList.get(i).toString();\r\n\t\t}\r\n\t\treturn folders;\r\n\r\n\t}", "private void initializeFileArrays(){\n File downloadedFilesFolder = new File(MainActivity.DB_PATH);\n File[] files = downloadedFilesFolder.listFiles();\n System.out.println(\"*** \" + files.length + \" ***\");\n if(files != null){\n System.out.println(\"*** \" + files.length + \" ***\");\n for(File f : files){\n if(f != null){\n System.out.println(\"***\\n FILE FOUND - \" + f.getAbsolutePath()+\"\\nSIZE - \" +\n f.length() + \" BYTES \\n***\");\n fileNames.add(f.getName());\n fileSizes.add(f.length()+\"\");\n this.files.add(f);\n }\n }\n }\n }", "public java.lang.String[] getNewFiles(){\r\n return localNewFiles;\r\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}", "public abstract List<File> listFiles() throws AccessException;", "protected String[] readInFile(String filename) {\n Vector<String> fileContents = new Vector<String>();\n try {\n InputStream gtestResultStream1 = getClass().getResourceAsStream(File.separator +\n TEST_TYPE_DIR + File.separator + filename);\n BufferedReader reader = new BufferedReader(new InputStreamReader(gtestResultStream1));\n String line = null;\n while ((line = reader.readLine()) != null) {\n fileContents.add(line);\n }\n }\n catch (NullPointerException e) {\n CLog.e(\"Gest output file does not exist: \" + filename);\n }\n catch (IOException e) {\n CLog.e(\"Unable to read contents of gtest output file: \" + filename);\n }\n return fileContents.toArray(new String[fileContents.size()]);\n }", "private static void listar(Path a){\n File dir = new File(a.toString());\n if(dir.isDirectory()){\n String[] dirContents = dir.list();\n for(int i =0; i < dirContents.length; i++){\n System.out.println(dirContents[i]);\n }\n }\n }", "private static List<File> listChildFiles(File dir) throws IOException {\n\t\t List<File> allFiles = new ArrayList<File>();\n\t\t \n\t\t File[] childFiles = dir.listFiles();\n\t\t for (File file : childFiles) {\n\t\t if (file.isFile()) {\n\t\t allFiles.add(file);\n\t\t } else {\n\t\t List<File> files = listChildFiles(file);\n\t\t allFiles.addAll(files);\n\t\t }\n\t\t }\n\t\t return allFiles;\n\t\t }", "private DMTFile[] listFilesWithoutConsoleMessage(String path) {\t\n\t\tDMTFile[] fileList = listFiles(path, true);\n\t\treturn fileList;\n\t}", "public List<String> listFilesForFolder(File folder) {\n\t\tList<String> fileList= new ArrayList<String>();\n\t for (final File fileEntry : folder.listFiles()) {\n\t if (fileEntry.isDirectory()) {\n\t listFilesForFolder(fileEntry);\n\t } else {\n\t \tfileList.add(fileEntry.getName());\n\t }\n\t }\n\t return fileList;\n\t}", "private void listFiles(JSONArray parameter) {\n String response = \"Files and Directorys to list: \";\n if (parameter.size() == 1) {\n File file = new File((String) parameter.get(0));\n for (String s : file.list()) {\n response = response + \"\\n\" + s;\n }\n clientResponse(response);\n } else {\n failedClientResponse(\"Wrong Parameters! -400\");\n }\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}", "public void listFiles(String path) {\r\n String files;\r\n File folder = new File(path);\r\n File[] listOfFiles = folder.listFiles();\r\n\r\n for (int i = 0; i < listOfFiles.length; i++) {\r\n\r\n if (listOfFiles[i].isFile()) {\r\n files = listOfFiles[i].getName();\r\n if (files.endsWith(\".png\") || files.endsWith(\".PNG\")\r\n || files.endsWith(\".gif\") || files.endsWith(\".GIF\")) {\r\n //System.out.println(files);\r\n pathList.add(path+\"\\\\\");\r\n fileList.add(files);\r\n }\r\n }\r\n \r\n else {\r\n listFiles(path+\"\\\\\"+listOfFiles[i].getName());\r\n }\r\n }\r\n }", "public abstract List<LocalFile> getAllFiles();", "public ArrayList<String> getDirFiles(String filePath){\n ArrayList<String> results = new ArrayList<String>();\n File[] files = new File(filePath).listFiles();\n\n for (File file : files){\n if (file.isFile()) {\n results.add(file.getName());\n }\n }\n return results;\n }", "public static void main(String[] args) { String dirname = \"/home/diego/IdeaProjects/JAVAStuff/src/tmp/dirTest.txt\";\n// File d = new File(dirname);\n// d.mkdirs();\n//\n File file = null;\n String[] paths;\n\n try {\n file = new File(\"/home/diego/IdeaProjects/JAVAStuff/src\");\n paths = file.list();\n\n for(String s: paths) {\n System.out.println(s);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }", "private File[] arrayDosArquivos() {\r\n\t\tFile file = new File(CAMINHO);\r\n\t\tfile.mkdirs();\r\n\t\treturn file.listFiles();\r\n\t}", "public String[] getFilesFor(String userPublicKey) {\n Log.i(\"getFilesFor\", \"Getting files for \" + userPublicKey);\n Cursor resultSet = database.rawQuery(\"SELECT DISTINCT File FROM FileKeys \" +\n \"WHERE UserPublicKey = '\" + userPublicKey + \"' AND isOwner = 1\", 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 List<File> getFiles(String dir)\r\n\t{\r\n\t\tList<File> result = null;\r\n\t\tFile folder = new File(dir);\r\n\t\tif (folder.exists() && folder.isDirectory())\r\n\t\t{\r\n\t\t\tFile[] listOfFiles = folder.listFiles(); \r\n\t\t\t \r\n\t\t\tresult = new ArrayList<File>();\r\n\t\t\tfor (File file : listOfFiles)\r\n\t\t\t{\r\n\t\t\t\tif (file.isFile())\r\n\t\t\t\t\tresult.add(file);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tlogger.error(\"check to make sure that \" + dir + \" exists and you have permission to read its contents\");\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}", "public void listFiles(String directoryName) throws IOException{\n File directory = new File(directoryName);\n //get all the files from a directory\n System.out.println(\"List of Files in: \" + directory.getCanonicalPath());\n File[] fList = directory.listFiles();\n for (File file : fList){\n if (file.isFile()){\n System.out.println(file.getName());\n }\n }\n }", "static String[] getRepositoryNames(File rootDirFile) {\n\t\tFile[] dirList = rootDirFile.listFiles();\n\t\tif (dirList == null) {\n\t\t\t//throw new FileNotFoundException(\"Folder \" + rootDirFile + \" not found\");\n\t\t\treturn new String[0];\n\t\t}\n\t\tArrayList<String> list = new ArrayList<>(dirList.length);\n\t\tfor (File element : dirList) {\n\t\t\tif (!element.isDirectory() ||\n\t\t\t\tLocalFileSystem.isHiddenDirName(element.getName())) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!NamingUtilities.isValidMangledName(element.getName())) {\n\t\t\t\tlog.warn(\"Ignoring repository directory with bad name: \" + element);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tlist.add(NamingUtilities.demangle(element.getName()));\n\t\t}\n\t\tCollections.sort(list);\n\t\tString[] names = new String[list.size()];\n\t\treturn list.toArray(names);\n\t}" ]
[ "0.75718445", "0.7301997", "0.7295691", "0.7223733", "0.7216682", "0.7191931", "0.71686405", "0.70753056", "0.7014147", "0.70118797", "0.69783205", "0.69719803", "0.69413507", "0.69331074", "0.69240093", "0.6920463", "0.6912139", "0.6883332", "0.6865604", "0.68645126", "0.6827581", "0.6825775", "0.6822979", "0.67737883", "0.6752679", "0.67417526", "0.674019", "0.6672985", "0.66634446", "0.66433257", "0.664281", "0.66382146", "0.66362786", "0.66308343", "0.66155684", "0.66111606", "0.6603008", "0.65991026", "0.6583298", "0.6569856", "0.6569647", "0.65615827", "0.65577906", "0.65428853", "0.6540523", "0.65314114", "0.6530248", "0.6527129", "0.6522439", "0.6514644", "0.6485428", "0.6484794", "0.6477224", "0.6450074", "0.64475375", "0.64451736", "0.64415115", "0.6439458", "0.64381194", "0.64239854", "0.6420752", "0.63964623", "0.6392237", "0.6375788", "0.6361197", "0.6355097", "0.6351085", "0.6330479", "0.62993914", "0.62993914", "0.6297605", "0.6295465", "0.6294086", "0.62928843", "0.6278401", "0.6278064", "0.6264602", "0.6258803", "0.62411433", "0.6225711", "0.6199111", "0.6193686", "0.6189643", "0.6176473", "0.61680084", "0.61627024", "0.6152733", "0.615154", "0.61432135", "0.6138884", "0.6132827", "0.612445", "0.6122706", "0.61196464", "0.6118343", "0.6118041", "0.6117648", "0.6104851", "0.6098451", "0.60940295", "0.60897934" ]
0.0
-1
Teen valmis ussi, toidu ja kujunduse.
private Parent content() { // Kujundus. BorderPane bp = new BorderPane(); Pane side = new Pane(controls); side.getStyleClass().add("pane"); Pane window = new Pane(); window.setPrefSize(APP_W, APP_H); window.getStyleClass().add("board"); bp.setCenter(window); bp.setLeft(side); Group snakeBody = new Group(); snake = snakeBody.getChildren(); points.setText("Points: " + punktid); points.setTextFill(Color.WHITE); points.setTranslateX(APP_W / 1.15); points.setTranslateY(2); controls.setTextFill(Color.WHITE); Line rLine = new Line(APP_W, 0, APP_W, APP_H); rLine.getStyleClass().add("line"); rLine.setStrokeWidth(5); Line tLine = new Line(0, 0, APP_W, 0); tLine.getStyleClass().add("line"); tLine.setStrokeWidth(5); Line bLine = new Line(0, APP_H, APP_W, APP_H); bLine.getStyleClass().add("line"); bLine.setStrokeWidth(5); // Tekib toit. Circle food = new Circle(BLOCK_SIZE / 2, BLOCK_SIZE / 2, 5); food.setFill(Color.CHARTREUSE); food.setTranslateX((int) (Math.random() * (APP_W - BLOCK_SIZE) / BLOCK_SIZE) * BLOCK_SIZE); food.setTranslateY((int) (Math.random() * (APP_H - BLOCK_SIZE) / BLOCK_SIZE) * BLOCK_SIZE); Rfood = 1; // Aja algus. KeyFrame frame = new KeyFrame(Duration.seconds(0.1), event -> { if (!running) return; // Kui ussi pikkus on 1 liigub ise edasi, kui 2 v�i enam v�tab // viimase t�ki ja t�stab ette. boolean toRemove = snake.size() > 1; Node tail = toRemove ? snake.remove(snake.size() - 1) : snake.get(0); // J�tan meelde ussi kordinaadid double tailX = tail.getTranslateX(); double tailY = tail.getTranslateY(); // kuhu ja kuidas uss liigub iga suuna korral switch (direction) { case UP: tail.setTranslateX(snake.get(0).getTranslateX()); tail.setTranslateY(snake.get(0).getTranslateY() - BLOCK_SIZE); break; case DOWN: tail.setTranslateX(snake.get(0).getTranslateX()); tail.setTranslateY(snake.get(0).getTranslateY() + BLOCK_SIZE); break; case LEFT: tail.setTranslateX(snake.get(0).getTranslateX() - BLOCK_SIZE); tail.setTranslateY(snake.get(0).getTranslateY()); break; case RIGHT: tail.setTranslateX(snake.get(0).getTranslateX() + BLOCK_SIZE); tail.setTranslateY(snake.get(0).getTranslateY()); break; } moved = true; // Lisame tagasi �rav�etud t�ki if (toRemove) snake.add(0, tail); // Kui uss vastu iseennast for (Node part : snake) { if (part != tail && tail.getTranslateX() == part.getTranslateX() && tail.getTranslateY() == part.getTranslateY()) { stopGame(); over.setTextFill(Color.WHITE); over.setText("GAME OVER !"); over.setTranslateX(APP_W / 2.5); over.setTranslateY(APP_H / 4); over.setVisible(true); break; } // Kui uss l�heb vastu seina if (tail.getTranslateX() < 0 || tail.getTranslateX() == APP_W || tail.getTranslateY() < 0 || tail.getTranslateY() == APP_H) { stopGame(); over.setTextFill(Color.WHITE); over.setText("GAME OVER ! "); over.setTranslateX(APP_W / 2.25); over.setTranslateY(APP_H / 4); over.setVisible(true); break; } } // Kui uss l�heb vastu boonus toitu if (tail.getTranslateX() == bonus.getTranslateX() && tail.getTranslateY() == bonus.getTranslateY()) { bonus.setVisible(false); bonus.isVisible(); bonus.setDisable(true); bonus.isDisable(); if (bonusFood == 1) { punktid = punktid + 50; points.setText("Points: " + punktid); points.setTextFill(Color.WHITE); points.setTranslateX(APP_W / 1.15); Circle circ2 = new Circle(BLOCK_SIZE / 2, BLOCK_SIZE / 2, 5, Color.WHITE); circ2.setTranslateX(tailX); circ2.setTranslateY(tailY); Circle circ3 = new Circle(BLOCK_SIZE / 2, BLOCK_SIZE / 2, 5, Color.WHITE); circ3.setTranslateX(tailX); circ3.setTranslateY(tailY); snake.addAll(circ2, circ3); bonusFood = 0; Rfood = 1; food.setVisible(true); } } if (Rfood == 1) { // Kui uss l�heb vastu tavalist toitu if (tail.getTranslateX() == food.getTranslateX() && tail.getTranslateY() == food.getTranslateY()) { food.setTranslateX((int) (Math.random() * (APP_W - BLOCK_SIZE) / BLOCK_SIZE) * BLOCK_SIZE); food.setTranslateY((int) (Math.random() * (APP_H - BLOCK_SIZE) / BLOCK_SIZE) * BLOCK_SIZE); punktid = punktid + 10; points.setText("Points: " + punktid); points.setTextFill(Color.WHITE); points.setTranslateX(APP_W / 1.15); points.setTranslateY(2); Circle circ = new Circle(BLOCK_SIZE / 2, BLOCK_SIZE / 2, 5, Color.WHITE); circ.setTranslateX(tailX); circ.setTranslateY(tailY); // Boonus toidu tekkimine if (7 < (int) (Math.random() * 10)) { Rfood = 0; bonusFood = 1; bonus.setVisible(true); bonus.setDisable(false); bonus.getStyleClass().add("bonus"); bonus.setTranslateX((int) (Math.random() * (APP_W - BLOCK_SIZE) / BLOCK_SIZE) * BLOCK_SIZE); bonus.setTranslateY((int) (Math.random() * (APP_H - BLOCK_SIZE) / BLOCK_SIZE) * BLOCK_SIZE); food.setVisible(false); food.isVisible(); } snake.add(circ); } } }); // Keyframe k�ib l�pmatult timeline.getKeyFrames().add(frame); timeline.setCycleCount(Timeline.INDEFINITE); window.getChildren().addAll(bonus, food, snakeBody, points, over, rLine, tLine, bLine); return bp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\n }\n }", "public void validerSaisie();", "public void zapisUrok() {\r\n\r\n\t\taktualnyZostatok = getZostatok() * urokovaSadzba / 100;\r\n\t\tsetVklad(aktualnyZostatok);\r\n\r\n\t}", "private void tallennaTiedostoon() {\n viitearkisto.tallenna();\n }", "private void kasvata() {\n T[] uusi = (T[]) new Object[this.arvot.length * 3 / 2 + 1];\n for (int i = 0; i < this.arvot.length; i++) {\n uusi[i] = this.arvot[i];\n }\n this.arvot = uusi;\n }", "public void kast() {\n\t\t// vaelg en tilfaeldig side\n\t\tdouble tilfaeldigtTal = Math.random();\n\t\tvaerdi = (int) (tilfaeldigtTal * 6 + 1);\n\t}", "public void anulaAvaluo() {\r\n try {\r\n if (\"\".equals(mBRadicacion.Radi.getObservacionAnulaAvaluo())) {\r\n mbTodero.setMens(\"Falta informacion por Llenar\");\r\n mbTodero.warn();\r\n } else {\r\n int CodRad = mBRadicacion.Radi.getCodAvaluo();\r\n mBRadicacion.Radi.AnulaRadicacion(mBsesion.codigoMiSesion());\r\n mbTodero.setMens(\"El Avaluo N*: \" + CodRad + \" ha sido anulada\");\r\n mbTodero.info();\r\n mbTodero.resetTable(\"FRMSeguimiento:SeguimientoTable\");\r\n mbTodero.resetTable(\"FormMisAsignados:RadicadosSegTable\");\r\n RequestContext.getCurrentInstance().execute(\"PF('DLGAnuAvaluo').hide()\");\r\n ListSeguimiento = Seg.ConsulSeguimAvaluos(mBsesion.codigoMiSesion());//VARIABLES DE SESION\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".anulaAvaluo()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n }", "private void esqueceu() {\n\n //Declaração de Objetos\n Veterinario veterinario = new Veterinario();\n\n //Declaração de Variaveis\n int crmv;\n String senha;\n\n //Atribuição de Valores\n try {\n crmv = Integer.parseInt(TextCrmv.getText());\n senha = TextSenha.getText();\n \n //Atualizando no Banco\n veterinario.Vdao.atualizarAnimalSenhaPeloCrmv(senha, crmv);\n \n } catch (NumberFormatException ex) {\n JOptionPane.showMessageDialog(null, \"APENAS NUMEROS NO CRMV!\");\n }\n JOptionPane.showMessageDialog(null, \"SUCESSO AO ALTERAR SENHA!\");\n\n }", "public void cambioEstadAvaluo() {\r\n try {\r\n if (\"\".equals(mBRadicacion.Radi.getObservacionAvaluo()) || \"\".equals(mBRadicacion.Radi.getEstadoAvaluo())) {\r\n mbTodero.setMens(\"Falta informacion por Llenar\");\r\n mbTodero.warn();\r\n } else {\r\n mBRadicacion.Radi.CambioEstRad(mBsesion.codigoMiSesion());\r\n mbTodero.setMens(\"La informacion ha sido guardada correctamente\");\r\n mbTodero.info();\r\n mbTodero.resetTable(\"FRMSeguimiento:SeguimientoTable\");\r\n RequestContext.getCurrentInstance().execute(\"PF('DlgEstAvaluo').hide()\");\r\n ListSeguimiento = Seg.ConsulSeguimAvaluos(mBsesion.codigoMiSesion());//VARIABLES DE SESION\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".cambioEstadAvaluo()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n }", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}", "private void laskeMatkojenPituus() {\n matkojenpituus = 0.0;\n\n for (Matka m : matkat) {\n matkojenpituus += m.getKuljettumatka();\n }\n\n }", "private void limpiarValores(){\n\t\tpcodcia = \"\";\n\t\tcedula = \"\";\n\t\tcoduser = \"\";\n\t\tcluser = \"\";\n\t\tmail = \"\";\n\t\taudit = \"\";\n\t\tnbr = \"\";\n\t\trol = \"\";\n\t}", "public void vaaraSyote() {\n System.out.println(\"En ymmärtänyt\");\n kierros();\n }", "private void asetaAlaTeksti(String uusiteksti)\n\t{\n\t\talapaneeliteksti.setText(uusiteksti);\n\t}", "public void setKelas(String sekolah){\n\t\ttempat = sekolah;\n\t}", "private void remplirUtiliseData() {\n\t}", "public static void provjeriValutu(String valuta) {\r\n\t\tif (Podrzana_Valuta.equals(valuta) == false) {\r\n\t\t\tthrow new NepodrzanaValutaException(\"unijeli ste valutu \" + valuta\r\n\t\t\t\t\t+ \"koja nije podrzana.\");\r\n\t\t}\r\n\t}", "private void valider() {\n\n\t\t/**\n\t\t * Renvoie un tableau de caractères qui sera transformé en chaine de caractère\n\t\t **/\n\n\t\tString passewordTraduit = new String(passeword.getPassword());\n\n\t\t/**\n\t\t * login.getText() récupère le contenu de la barre de saisie\n\t\t **/\n\t\t\n\t\tString user = login.getText();\n\t\tString passwd = passewordTraduit;\n\t\t/**\n\t\t *Permettra de savoir si la connexion à la BDD SQL c'est bien passée.\n\t\t */\n\t\tboolean reussite;\n\t\t/**\n\t\t * On va créer la BDD si elle n'existe pas\n\t\t */\n\t\t\n\t\treussite = Initialisation.getInstance().creerBDD(user, passwd);\n\t\t/**\n\t\t * On set le password et l'utilisateur pour que les paramètres de connexion soient les bons\n\t\t */\n\t\tInitialisation.getInstance().setPasswd(passwd);\n\t\tInitialisation.getInstance().setUser(user);\n\t\tModification.getInstance().setPasswd(passwd);\n\t\tModification.getInstance().setUser(user);\n\t\tif(reussite) {\n\t\t\t/**\n\t\t\t *Si tout c'est bien passé on regarde si l'utilisateur existe dans le fichier et dans le cas contraire on le crée.\n\t\t\t */\n\t\t\tif(personnesDejaInscrite.getInstance().getMaListDePersonneInscrite().get(user) == null) {\n\t\t\t\tpersonnesDejaInscrite.getInstance().getMaListDePersonneInscrite().put(user, new CompteAdministrateur(passwd));\n\t\t\t\tpersonnesDejaInscrite.getInstance().sauvegarder();\n\t\t\t}\n\t\t\tFenetreLogin.getInstance().dispose();\n\t\t\tFenetreFond.getInstance().changerFenetre(login.getText());\n\t\t\t/**\n\t\t\t *On remet les champs à nul pour que quand on se déconnecte on est pas le login et le mot de passe de l'utilisateur précédent.\n\t\t\t */\n\t\t\tlogin.setText(\"\");\n\t\t\tpasseword.setText(\"\");\n\t\t}\n\t\n\t}", "public static String seuraavaArvaus(HashMap<String, Integer> muisti, String viimeisimmat, String kaikki) {\n if (kaikki.length() < 3) {\n return \"k\";\n }\n\n String viimKivi = viimeisimmat + \"k\";\n String viimPaperi = viimeisimmat + \"p\";\n String viimSakset = viimeisimmat + \"s\";\n \n int viimKiviLkm = 0;\n int viimPaperiLkm = 0;\n int viimSaksetLkm = 0;\n String arvaus = \"k\";\n int viimValueMax = 0;\n /*\n Sopivan valinnan etsiminen tehdään tarkastelemalla käyttäjän kahta viimeistä\n syötettä ja vertailemalla niitä koko historiaan. Mikäli historian mukaan\n kahta viimeistä syötettä seuraa useimmin kivi, tekoälyn tulee pelata paperi.\n Mikäli kahta viimeistä syötettä seuraa useimmin paperi, tekoälyn tulee \n pelata sakset. Mikäli taas kahta viimeistä syötettä seuraa useimmin sakset, \n tekoälyn tulee pelata kivi. Muissa tapauksissa pelataan kivi.\n */\n if (muisti.containsKey(viimKivi)) {\n viimKiviLkm = muisti.get(viimKivi);\n }\n if (muisti.containsKey(viimPaperi)) {\n viimPaperiLkm = muisti.get(viimPaperi);\n }\n if (muisti.containsKey(viimSakset)) {\n viimSaksetLkm = muisti.get(viimSakset);\n }\n\n if (viimKiviLkm > viimPaperiLkm && viimKiviLkm > viimSaksetLkm) {\n return \"p\";\n }\n if (viimPaperiLkm > viimKiviLkm && viimPaperiLkm > viimSaksetLkm) {\n return \"s\";\n }\n if (viimSaksetLkm > viimKiviLkm && viimSaksetLkm > viimPaperiLkm) {\n return \"k\";\n }\n\n return arvaus;\n }", "public void niveauSuivant() {\n niveau = niveau.suivant();\n }", "public static void prikaziValutu(Valuta valuta,JTextField textFieldNaziv,JTextField textFieldSkraceniNaziv,\r\n\t\t\tJTextField textFieldSifra,JTextField textFieldProdajniKurs,JTextField textFieldKupovniKurs,JTextField textFieldSrednjiKurs) {\n\t\ttextFieldNaziv.setText(valuta.getNaziv());\r\n\t\ttextFieldSkraceniNaziv.setText(valuta.getSkraceniNaziv());\r\n\t\ttextFieldSifra.setText(\"\"+valuta.getSifra());\r\n\t\ttextFieldProdajniKurs.setText(\"\"+valuta.getProdajni());\r\n\t\ttextFieldKupovniKurs.setText(\"\"+valuta.getKupovni());\r\n\t\ttextFieldSrednjiKurs.setText(\"\"+valuta.getSrednji());\t\t\t\t\r\n\t}", "public void verwerkRijVoorKassa() {\r\n while(kassarij.erIsEenRij()) {\r\n Persoon staatBijKassa = kassarij.eerstePersoonInRij();\r\n kassa.rekenAf(staatBijKassa);\r\n }\r\n }", "private void ulangiEnkripsi() {\n this.tfieldP.setText(\"P\");\n this.tfieldQ.setText(\"Q\");\n this.tfieldN.setText(\"N\");\n this.tfieldTN.setText(\"TN\");\n this.tfieldE.setText(\"E\");\n this.tfieldD.setText(\"D\");\n this.tfieldLokasidannamafilehasilenkripsi.setText(\"Lokasi & Nama File Hasil Enkripsi\");\n this.tfieldLokasidannamafileenkripsi.setText(\"Lokasi & Nama File\");\n this.fileAsli = null;\n this.pbEnkripsi.setValue(0);\n this.enkripsi.setP(null);\n this.enkripsi.setQ(null);\n this.enkripsi.setN(null);\n this.enkripsi.setTn(null);\n this.enkripsi.setE(null);\n this.enkripsi.setD(null);\n }", "private void laskeMatkojenKesto() {\n matkojenkesto = 0.0;\n\n for (Matka m : matkat) {\n matkojenkesto += m.getKesto();\n }\n }", "public static void Latihan() {\n Model.Garis();\n System.out.println(Model.subTitel[0]);\n Model.Garis();\n\n System.out.print(Model.subTitel[1]);\n Model.nilaiTebakan = Model.inputUser.nextInt();\n\n System.out.println(Model.subTitel[2] + Model.nilaiTebakan);\n\n // Operasi Logika\n Model.statusTebakan = (Model.nilaiTebakan == Model.nilaiBenar);\n System.out.println(Model.subTitel[3] + Model.hasilTebakan(Model.TrueFalse) + \"\\n\\n\");\n }", "private void vuoronKolmasHeitto() {\n while (heittojaJaljella == 1) {\n if (tulosLaitettu) {\n break;\n }\n try {\n Thread.sleep(100);\n } catch (InterruptedException ex) {\n System.out.println(\"Ei ole heitetty tai laitettu tulosta\");\n }\n }\n }", "@Test\n public void testSetSiirSuunta() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n try {\n k.setSiirSuunta(-1);\n } catch (Exception e) {\n assertTrue(\"Sirtymissuunnan muutos aiheuttaa virheen\", true);\n }\n }", "public void urciStupneVrcholu(){\n\t\tfor(int i = 0;i < vrchP.length; i++){\n\t\t\tstupenVrcholu(vrchP[i].klic);\n\t\t}\n\t}", "public void updateKetraVarka() {\n if (ItemFunctions.getItemCount(this, 7215) > 0) {\n _ketra = 5;\n } else if (ItemFunctions.getItemCount(this, 7214) > 0) {\n _ketra = 4;\n } else if (ItemFunctions.getItemCount(this, 7213) > 0) {\n _ketra = 3;\n } else if (ItemFunctions.getItemCount(this, 7212) > 0) {\n _ketra = 2;\n } else if (ItemFunctions.getItemCount(this, 7211) > 0) {\n _ketra = 1;\n } else if (ItemFunctions.getItemCount(this, 7225) > 0) {\n _varka = 5;\n } else if (ItemFunctions.getItemCount(this, 7224) > 0) {\n _varka = 4;\n } else if (ItemFunctions.getItemCount(this, 7223) > 0) {\n _varka = 3;\n } else if (ItemFunctions.getItemCount(this, 7222) > 0) {\n _varka = 2;\n } else if (ItemFunctions.getItemCount(this, 7221) > 0) {\n _varka = 1;\n } else {\n _varka = 0;\n _ketra = 0;\n }\n }", "static void cetak_data(String nama, int usia) {\n int tahun_sekarang = 2020, tahun_lahir = tahun_sekarang - usia;\r\n System.out.println(\"---------\\nNama Saya : \" + nama + \"\\nUsia Saya : \" + usia + \"\\nTahun Lahir : \" + tahun_lahir);\r\n }", "public void sacuvajUFajl(String putanja) {\r\n\t\tSOSacuvajUFajl.izvrsi(putanja, lista);\r\n\t}", "private void vereenvoudigAction() {\n foutLabel.setText(\"\");\n int teller = Integer.parseInt(tellerVeld.getText());\n int noemer = Integer.parseInt(noemerVeld.getText());\n if (noemer <= 0) {\n foutLabel.setText(\"Noemer moet positief zijn\");\n }\n else if (teller < 0) {\n foutLabel.setText(\"Teller mag niet negatief zijn\");\n }\n else {\n Breuk breuk = new Breuk(teller, noemer); \n if (breuk != null) {\n breuk.vereenvoudig();\n tellerVeld.setText(breuk.getTeller() + \"\");\n noemerVeld.setText(breuk.getNoemer() + \"\");\n }\n }\n }", "public void atakuj() {\n\n System.out.println(\"to metoda atakuj z klasy Potwor \");\n\n }", "public void asetaTeksti(){\n }", "public Asiakas(){\n\t\tid++;\n\t\tbussiNumero = new Random().nextInt(OmaMoottori.bussienMaara);\n\t\tsaapumisaika = Kello.getInstance().getAika();\n\t}", "private void atualizarTela() {\n\t\tif(this.primeiraJogada == true) {//SE FOR A PRIMEIRA JOGADA ELE MONTA O LABEL DOS NUMEROS APOS ESCOLHER A POSICAO PELA PRIMEIRA VEZ\r\n\t\t\tthis.primeiraJogada = false;\r\n\t\t\tthis.montarLabelNumeros();\r\n\t\t}\r\n\r\n\t\tthis.esconderBotao();\r\n\t\t\r\n\t\tthis.acabarJogo();\r\n\t}", "public static void setUserHintValues()\n {\n int hintValueNum=1; //Número de casillas que son reveladas al inicio de la partida.\n \n switch(GameManager.getGameLevel())\n {\n case 1: hintValueNum = 9;\n break;\n case 2: hintValueNum = 6;\n break;\n case 3: hintValueNum = 3;\n break;\n }\n \n int row; //Número de fila.\n int col; //Número de columna.\n boolean isSet; //Define si el valor de la casilla ya ha sido inicializado anteriormente.\n \n for (int i = 0; i < hintValueNum; i++)\n {\n isSet=false;\n do{\n row = (int) (Math.random() * 4);\n col = (int) (Math.random() * 4);\n \n if (playerBoardPos[row][col]==0)\n {\n //Inicializa algunas posiciones aleatorias para las pistas iniciales del tablero del jugador.\n playerBoardPos[row][col] = boardPos[row][col]; \n isDefaultPos[row][col]=true;\n isSet=true;\n }\n }while (isSet==false);\n }\n }", "public String tegevuseSuvalineSoovitus(){\n int listiSuurus = tegevused.size();\n return tegevused.get((int)(Math.random()*listiSuurus));\n }", "public void vlozNaUcet(int ciastka, BeznyUcet beznyUcet) {\r\n\r\n\t\tcislo += ciastka;\r\n\t\tbeznyUcet.setVklad(ciastka);\r\n\t\tsetVyber(ciastka);\r\n\r\n\t}", "public void setAktiivisuus()\r\n\t{\r\n\t\tonAktiivinen = false;\r\n\t}", "public void tulostaKomennot() {\n this.io.tulostaTeksti(\"Komennot: \");\n for (int i = 1; i <= this.komennot.keySet().size(); i++) {\n this.io.tulostaTeksti(this.komennot.get(i).toString());\n }\n this.io.tulostaTeksti(\"\");\n }", "private void volverValoresADefault( )\n {\n if( sensorManag != null )\n sensorManag.unregisterListener(sensorListener);\n gameOn=false;\n getWindow().getDecorView().setBackgroundColor(Color.WHITE);\n pantallaEstabaTapada=false;\n ((TextView)findViewById(R.id.txtPredSeg)).setText(\"\");\n segundosTranscurridos=0;\n }", "private void vuoronKaikkiHeitotHeitetty() {\n while (heittojaJaljella < 1) {\n if (tulosLaitettu) {\n break;\n }\n try {\n Thread.sleep(100);\n } catch (InterruptedException ex) {\n System.out.println(\"Ei ole laitettu tulosta\");\n }\n }\n }", "public void vlozNaUcet(int ciastka, TerminovanyUcet terminovanyUcet) {\r\n\t\tcislo += ciastka;\r\n\t\tterminovanyUcet.setVklad(ciastka);\r\n\t\tSporiaciUcet.super.setVyber(ciastka);\r\n\t}", "private void vuoronToinenHeitto() {\n while (heittojaJaljella == 2) {\n if (tulosLaitettu) {\n break;\n }\n try {\n Thread.sleep(100);\n } catch (InterruptedException ex) {\n System.out.println(\"Ei ole heitetty tai laitettu tulosta\");\n }\n }\n }", "public static void korisnikNijeUneoIspravnuSifru() {\r\n\t\tJOptionPane.showMessageDialog(teretanaGui.getContentPane(), \"Niste uneli ispravnu sifru!\", \"Obavestenje\",\r\n\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t}", "private void actualizaSugerencias() { \t \t\n\n \t// Pide un vector con las últimas N_SUGERENCIAS búsquedas\n \t// get_historial siempre devuelve un vector tamaño N_SUGERENCIAS\n \t// relleno con null si no las hay\n \tString[] historial = buscador.get_historial(N_SUGERENCIAS);\n \t\n \t// Establece el texto para cada botón...\n \tfor(int k=0; k < historial.length; k++) { \t\t \t\t\n \t\t\n \t\tString texto = historial[k]; \n \t\t// Si la entrada k está vacía..\n \t\tif ( texto == null) {\n \t\t\t// Rellena el botón con el valor por defecto\n \t\t\ttexto = DEF_SUGERENCIAS[k];\n \t\t\t// Y lo añade al historial para que haya concordancia\n \t\t\tbuscador.add_to_historial(texto);\n \t\t} \t\t\n \t\tb_sugerencias[k].setText(texto);\n \t} \t\n }", "private boolean estValide() {\n if (textFieldNom.getText() == null || textFieldNom.getText().isEmpty() || comboBoxVisibilite.getSelectionModel().getSelectedItem() == null\n || comboBoxType.getSelectionModel().getSelectedItem() == null) {\n erreurLabel.setText(\"Tous les champs doivent etre remplis\");\n return false;\n }\n erreurLabel.setText(\"\");\n return true;\n }", "public void vainqueurs (HashMap<Integer, Integer> vainqueurs) {\r\n\t\t// Mettre a jour Global.banque si on gagne\r\n\t}", "@SuppressWarnings(\"SuspiciousMethodCalls\")\n private int houve_estouro()\n {\n int retorno = 0;\n boolean checar = false;\n for (Map.Entry i: janela.entrySet())\n {\n if (janela.get(i.getKey()).isEstouro())\n {\n janela.get(i.getKey()).setEstouro(false);\n retorno =(int) i.getKey();\n checar = true;\n break;\n }\n }\n for(Map.Entry i2: janela.entrySet()) janela.get(i2.getKey()).setEstouro(false);\n if(checar) return retorno;\n else return -69;\n }", "public void setLongueur(int longueur) {\r\n this.longueur = longueur;\r\n }", "public void sumaPuntos() {\r\n int rojo = 0;\r\n int azul = 0;\r\n for (int i = 1; i < 10; i++) {\r\n\r\n if (tablero[1][i].getTipo().equals(\"Rojo\")) {\r\n rojo += tablero[1][i].getValor();\r\n }\r\n\r\n if (tablero[8][i].getTipo().equals(\"Azul\")) {\r\n azul += tablero[8][i].getValor();\r\n }\r\n\r\n }\r\n if (rojo > azul) {\r\n this.setResultado(\"Rojo\");\r\n this.agregarVictoria(jugadorRojo);\r\n }\r\n if (azul > rojo) {\r\n this.setResultado(\"Azul\");\r\n this.agregarVictoria(jugadorAzul);\r\n }\r\n \r\n this.setReplay(true);\r\n }", "@Override\r\n\tpublic void salarioAtual() {\n\t\tSystem.out.print(\"VALOR ATUAL\"+this.valor);\r\n\t\t\r\n\t}", "private void lisaaMiinaVasemmalle(int i, int j) {\n ArrayList<Ruutu> lista;\n if (i - 1 >= 0) {\n lista = this.ruudukko[i - 1];\n lista.get(j).setViereisetMiinat(1);\n if (j - 1 >= 0) {\n lista.get(j - 1).setViereisetMiinat(1);\n }\n if (j + 1 < x) {\n lista.get(j + 1).setViereisetMiinat(1);\n }\n }\n }", "public void atualizar() {\n System.out.println(\"Metodo atualizar chamado!\");\n setR1(0);\n setR2(0);\n setR3(0);\n setN(0);\n\n //context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Atualizado!\", \"\"));\n }", "@Test\n public void yksiVasemmalle() {\n char[][] kartta = Labyrintti.lueLabyrintti(\"src/main/resources/labyrinttiTestiVasen.txt\");\n assertFalse(kartta == null);\n Labyrintti labyrintti = new Labyrintti(kartta);\n RatkaisuLeveyshaulla ratkaisuSyvyyshaulla = new RatkaisuLeveyshaulla(labyrintti);\n String ratkaisu = ratkaisuSyvyyshaulla.ratkaisu();\n assertTrue(Tarkistaja.tarkista(ratkaisu, labyrintti));\n }", "public void faiLavoro(){\n System.out.println(\"Scrivere 1 per Consegna lunga\\nSeleziona 2 per Consegna corta\\nSeleziona 3 per Consegna normale\");\n\n switch (creaturaIn.nextInt()) {\n case 1 -> {\n soldiTam += 500;\n puntiVita -= 40;\n puntiFame -= 40;\n puntiFelicita -= 40;\n }\n case 2 -> {\n soldiTam += 300;\n puntiVita -= 20;\n puntiFame -= 20;\n puntiFelicita -= 20;\n }\n case 3 -> {\n soldiTam += 100;\n puntiVita -= 10;\n puntiFame -= 10;\n puntiFelicita -= 10;\n }\n }\n checkStato();\n }", "private void dibujarEstado() {\n\n\t\tcantidadFichasNegras.setText(String.valueOf(juego.contarFichasNegras()));\n\t\tcantidadFichasBlancas.setText(String.valueOf(juego.contarFichasBlancas()));\n\t\tjugadorActual.setText(juego.obtenerJugadorActual());\n\t}", "private void xuLyThanhToanDichVu() {\n if(checkGia(txtThanhToanDVSoLuongCu.getText())== false){\n JOptionPane.showMessageDialog(null, \"Số lượng không hợp lệ. Vui lòng kiểm tra lại!\");\n txtThanhToanDVSoLuongCu.requestFocus();\n return;\n }//Kiem tra so luong cu\n \n if(checkGia(txtThanhToanDVSoLuongMoi.getText())== false){\n JOptionPane.showMessageDialog(null, \"Số lượng không hợp lệ. Vui lòng kiểm tra lại!\");\n txtThanhToanDVSoLuongMoi.requestFocus();\n return;\n }//kiem tra so luong moi\n \n float soLuongCu = Float.valueOf(txtThanhToanDVSoLuongCu.getText().trim());\n float soLuongMoi = Float.valueOf(txtThanhToanDVSoLuongMoi.getText().trim());\n float soLuong = soLuongMoi - soLuongCu;\n txtThanhToanDVSoLuong.setText(soLuong+\"\");\n tongCong += soLuong * Float.valueOf(txtThanhToanDVGiaDV.getText().trim());\n txtThanhToanTongCong.setText(tongCong+\" VNĐ\");\n \n }", "private String tulostuksenApu(){\r\n String apu = \"Rivitiedosto: \";\r\n for(int i = 0; i<rivitiedot.length; i++){\r\n apu = apu + i+\": \";\r\n for(int k = 1; k <= rivitiedot[i].getKoko(); k++){\r\n apu = apu + \" \"+rivitiedot[i].get(k);\r\n }\r\n apu = apu + \" \";\r\n }\r\n\r\n return apu;\r\n }", "public void AumentarVictorias() {\r\n\t\tthis.victorias_actuales++;\r\n\t\tif (this.victorias_actuales >= 9) {\r\n\t\t\tthis.TituloNobiliario = 3;\r\n\t\t} else if (this.victorias_actuales >= 6) {\r\n\t\t\tthis.TituloNobiliario = 2;\r\n\t\t} else if (this.victorias_actuales >= 3) {\r\n\t\t\tthis.TituloNobiliario = 1;\r\n\t\t} else {\r\n\t\t\tthis.TituloNobiliario = 0;\r\n\t\t}\r\n\t}", "public void lanzarJuegoPianino(View view){\n\n puntuacion=0;\n notasTocadas=0;\n mensaje.setText(R.string.repite);\n switch(pref.getString(\"dificultad\", \"1\")){\n case \"0\": nuevaSecuencia=generarSecuencia(4);\n nuevaSecuencia[3]=nuevaSecuencia[0];\n secuenciaJugador= new int[4];\n break;\n case \"1\": nuevaSecuencia=generarSecuencia(7);\n nuevaSecuencia[6]=nuevaSecuencia[0];\n secuenciaJugador= new int[7];\n break;\n case \"2\": nuevaSecuencia=generarSecuencia(10);\n secuenciaJugador= new int[10];\n break;\n default: nuevaSecuencia= new int[7];\n }\n\n reproducirSecuencia(nuevaSecuencia,false);\n\n }", "public void somaVezes(){\n qtVezes++;\n }", "public void trykkPaa() throws TrykketPaaBombe {\n // Ingenting skal skje dersom en av disse er true;\n if (brettTapt || trykketPaa || flagget) {\n return;\n }\n\n // Om ruten er en bombe taper man brettet\n if (bombe) {\n trykketPaa = true;\n setText(\"x\");\n setBackground(new Background(new BackgroundFill(Color.RED, CornerRadii.EMPTY, Insets.EMPTY)));\n throw new TrykketPaaBombe();\n }\n // Om ruten har null naboer skal et stoerre omraade aapnes\n else if (bombeNaboer == 0) {\n Lenkeliste<Rute> besokt = new Lenkeliste<Rute>();\n Lenkeliste<Rute> aapneDisse = new Lenkeliste<Rute>();\n aapneDisse.leggTil(this);\n // Rekursiv metode som fyller aapneDisse med riktige ruter\n finnAapentOmraade(besokt, aapneDisse);\n for (Rute r : aapneDisse) {\n r.aapne();\n }\n } else {\n aapne();\n }\n }", "public void setPoistumisaika(double poistumisaika) {\n\t\tthis.poistumisaika = poistumisaika + ThreadLocalRandom.current().nextDouble(1, 10);\n\t}", "public void avvia() {\n /* variabili e costanti locali di lavoro */\n\n try { // prova ad eseguire il codice\n getModuloRisultati().avvia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n super.avvia();\n\n }", "private void carregarAlunosTurma() {\n AcessoFirebase.getFirebase().addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n getUidUsuariosTurma(dataSnapshot);\n montandoArrayListUsuarios(dataSnapshot);\n }\n @Override\n public void onCancelled(DatabaseError databaseError) {\n }\n });\n }", "public void dohvatiOtpad(KonkretniSpremnik ks) {\n VozilaLogger.printRad(this, ks);\n if (ks.getNazivBroj() == getVrsta()) {\n float nova_popunjenost = popunjenost + ks.getNapunjenost();\n if (nova_popunjenost >= nosivost) {\n notifyAllObservers();\n } else {\n popunjenost = nova_popunjenost;\n ks.isprazni();\n azurirajStatistikuOtpada(1, ks.getNapunjenost());\n }\n }\n }", "public void jumlahgajianggota(){\n \n jmlha = Integer.valueOf(txtha.getText());\n jmlharga = Integer.valueOf(txtharga.getText());\n jmlanggota = Integer.valueOf(txtanggota.getText());\n \n if (jmlanggota == 0){\n txtgajianggota.setText(\"0\");\n }else{\n jmltotal = jmlharga * jmlha;\n hasil = jmltotal / jmlanggota;\n txtgajianggota.setText(Integer.toString(hasil)); \n }\n\n \n }", "private static void afisareSubsecventaMaxima() {\n afisareSir(citireSir().SecvMax());\n }", "public void calcular() {\n int validar, c, d, u;\n int contrasena = 246;\n c = Integer.parseInt(spiCentenas.getValue().toString());\n d = Integer.parseInt(spiDecenas.getValue().toString());\n u = Integer.parseInt(spiUnidades.getValue().toString());\n validar = c * 100 + d * 10 + u * 1;\n //Si es igual se abre.\n if (contrasena == validar) {\n etiResultado.setText(\"Caja Abierta\");\n }\n //Si es menor nos indica que es mas grande\n if (validar < contrasena) {\n etiResultado.setText(\"El número secreto es mayor\");\n }\n //Si es mayot nos indica que es mas pequeño.\n if (validar > contrasena) {\n etiResultado.setText(\"El número secreto es menor\");\n }\n }", "public void choixduJeu() {\n afficheMessage(\"*- Choisissez le jeu auquel vous voulez jouer : \\n- R pour Recherche +/-\\n- M pour Mastermind\");\n choixJeu = Console.saisieListeDeChoix(\"R|M\");\n afficheMessage(\"*- Choisissez le mode de jeu auquel vous voulez jouer :\\n- C pour Challenger,\\n- U pour Duel\\n- D pour Defense\");\n choixModeJeu = Console.saisieListeDeChoix(\"C|U|D\");\n }", "private void ufotAlemmasVasReunassa(Ufo ufo, int x) {\n if (ufo.isVisible()) {\n if (x <= RuudunVasenReuna && suunta != 1) {\n suunta = 1;\n Iterator i2 = ufot.iterator();\n while (i2.hasNext()) {\n ufo = (Ufo) i2.next();\n ufo.setY(ufo.getY() + UfotLiikkuvatRivinALas);\n }\n }\n }\n }", "private void xuLyThemSD(){\n if (checkNgay(txtNgaySD.getText())==false){\n JOptionPane.showMessageDialog(null, \"Ngày sử dụng phải thuộc dạng [YYYY-MM-DD].\\n Vui lòng kiểm tra lại!\");\n txtNgaySD.requestFocus();\n return;\n }//kiem tra ngay su dung\n \n if (checkGia(txtGiaDV.getText())==false){\n JOptionPane.showMessageDialog(null, \"Ngày sử dụng phải là ký tự số.\\n Vui lòng kiểm tra lại!\");\n txtGiaDV.requestFocus();\n return;\n }//kiem tra gia dich vu\n \n \n SuDungService suDungService = new SuDungService();\n int x = suDungService.themSuDung(cbbMaDV.getSelectedItem().toString(),\n cbbMaKH.getSelectedItem().toString(),\n txtNgaySD.getText(), Float.valueOf(txtGiaDV.getText()));\n \n if (x>0){\n hienThiSuDung();\n JOptionPane.showMessageDialog(null, \"Đã thêm!\");\n }else{\n JOptionPane.showMessageDialog(null, \"Thêm thất bại!\");\n cbbMaDV.requestFocus();\n return;\n }\n }", "public void controllore() {\n if (puntiVita > maxPunti) puntiVita = maxPunti;\n if (puntiFame > maxPunti) puntiFame = maxPunti;\n if (puntiFelicita > maxPunti) puntiFelicita = maxPunti;\n if (soldiTam < 1) {\n System.out.println(\"Hai finito i soldi\");\n System.exit(3);\n }\n //controlla che la creatura non sia morta, se lo è mette sonoVivo a false\n if (puntiVita <= minPunti && puntiFame <= minPunti && puntiFelicita <= minPunti) sonoVivo = false;\n }", "public final void setRiippumatonMuuttuja(final int muuttuja) {\r\n this.riippumatonMuuttuja = muuttuja;\r\n }", "private void actualizaUsuario() {\n\t\t\n\t\tInteger edad=miCoordinador.validarEdad(campoEdad.getText().trim());\n\t\t\n\t\tif (edad!=null) {\n\t\t\t\n\t\t\tUsuarioVo miUsuarioVo=new UsuarioVo();\n\t\t\t//se asigna cada dato... el metodo trim() del final, permite eliminar espacios al inicio y al final, en caso de que se ingresen datos con espacio\n\t\t\tmiUsuarioVo.setDocumento(campoDocumento.getText().trim());\n\t\t\tmiUsuarioVo.setNombre(campoNombre.getText().trim());\n\t\t\tmiUsuarioVo.setEdad(Integer.parseInt(campoEdad.getText().trim()));\n\t\t\tmiUsuarioVo.setProfesion(campoProfesion.getText().trim());\n\t\t\tmiUsuarioVo.setTelefono(campoTelefono.getText().trim());\n\t\t\tmiUsuarioVo.setDireccion(campoDireccion.getText().trim());\n\t\t\t\n\t\t\tString actualiza=\"\";\n\t\t\t//se llama al metodo validarCampos(), este retorna true o false, dependiendo de eso ingresa a una de las opciones\n\t\t\tif (miCoordinador.validarCampos(miUsuarioVo)) {\n\t\t\t\t//si se retornó true es porque todo está correcto y se llama a actualizar\n\t\t\t\tactualiza=miCoordinador.actualizaUsuario(miUsuarioVo);//en registro se almacena ok o error, dependiendo de lo que retorne el metodo\n\t\t\t}else{\n\t\t\t\tactualiza=\"mas_datos\";//si validarCampos() retorna false, entonces se guarda la palabra mas_datos para indicar que hace falta diligenciar los campos obligatorios\n\t\t\t}\n\t\t\t\n\t\t\t//si el registro es exitoso muestra un mensaje en pantalla, sino, se valida si necesita mas datos o hay algun error\n\t\t\tif (actualiza.equals(\"ok\")) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \" Se ha Modificado Correctamente \",\"Confirmación\",JOptionPane.INFORMATION_MESSAGE);\t\t\t\n\t\t\t}else{\n\t\t\t\tif (actualiza.equals(\"mas_datos\")) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Debe Ingresar los campos obligatorios\",\"Faltan Datos\",JOptionPane.WARNING_MESSAGE);\t\t\t\n\t\t\t\t}else{\n\t\t JOptionPane.showMessageDialog(null, \"Error al Modificar\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\t\t\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\tJOptionPane.showMessageDialog(null, \"Debe ingresar una edad Valida!!!\",\"Advertencia\",JOptionPane.ERROR_MESSAGE);\n\t\t}\n\n\t\t\t\t\n\t}", "public void setPuertas(int puerta) {\n\t\t\r\n\t}", "public static void TroskoviPredjenogPuta() {\n\t\tUtillMethod.izlistavanjeVozila();\n\t\tSystem.out.println(\"Unesite redni broj vozila za koje zelite da racunate predjeni put!\");\n\t\tint redniBroj = UtillMethod.unesiteInt();\n\t\tif (redniBroj < Main.getVozilaAll().size()) {\n\t\t\tif (!Main.getVozilaAll().get(redniBroj).isVozObrisano()) {\n\t\t\t\tSystem.out.println(\"Unesite broj kilometara koje ste presli sa odgovarajucim vozilom\");\n\t\t\t\tdouble km = UtillMethod.unesiteBroj();\n\t\t\t\tVozilo v = Main.getVozilaAll().get(redniBroj);\n\t\t\t\tdouble rezultat;\n\t\t\t\tif(v.getGorivaVozila().size()>1) {\n\t\t\t\t\tGorivo g = UtillMethod.izabirGoriva();\n\t\t\t\t\trezultat = cenaTroskaVoz(v,km,g);\n\t\t\t\t}else {\n\t\t\t\t\t rezultat = cenaTroskaVoz(v,km,v.getGorivaVozila().get(0));\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Cena troskova za predjeni put je \" + rezultat + \"Dinara!\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Ovo vozilo je obrisano i ne moze da se koristi!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Uneli ste pogresan redni broj!\");\n\t\t}\n\t}", "private void razia(){\n /* Mereset semua Error dan fokus menjadi default */\n mViewUser.setError(null);\n mViewPassword.setError(null);\n View fokus = null;\n boolean cancel = false;\n\n /* Mengambil text dari form User dan form Password dengan variable baru bertipe String*/\n String user = mViewUser.getText().toString();\n String password = mViewPassword.getText().toString();\n\n /* Jika form user kosong atau TIDAK memenuhi kriteria di Method cekUser() maka, Set error\n * di Form User dengan menset variable fokus dan error di Viewnya juga cancel menjadi true*/\n if (TextUtils.isEmpty(user)){\n mViewUser.setError(\"This field is required\");\n fokus = mViewUser;\n cancel = true;\n }else if(!cekUser(user)){\n mViewUser.setError(\"This Username is not found\");\n fokus = mViewUser;\n cancel = true;\n }\n\n /* Sama syarat percabangannya dengan User seperti di atas. Bedanya ini untuk Form Password*/\n if (TextUtils.isEmpty(password)){\n mViewPassword.setError(\"This field is required\");\n fokus = mViewPassword;\n cancel = true;\n }else if (!cekPassword(password)){\n mViewPassword.setError(\"This password is incorrect\");\n fokus = mViewPassword;\n cancel = true;\n }\n\n /* Jika cancel true, variable fokus mendapatkan fokus */\n if (cancel) fokus.requestFocus();\n else masuk();\n }", "public doimatkhau() {\n initComponents();\n setLocationRelativeTo(null);\n txtTendangnhap.setText(sharehelper.user.getMaNV());\n }", "private void viderZonesSaisies() {\n // libellé\n EditText libelleSport = findViewById(R.id.saisieSport);\n libelleSport.setText(\"\");\n // checkbox durée\n CheckBox dureeSport = findViewById(R.id.chkDureeSport);\n dureeSport.setChecked(false);\n // checkbox distance\n CheckBox distanceSport = findViewById(R.id.chkDistanceSport);\n distanceSport.setChecked(false);\n }", "void berechneUmfang() {\r\n\t\tfor (int i = 1; i < m_ANZAHL_POINTS; i++) {\r\n\t\t\tm_umfang += m_pointArray[i].distance(m_pointArray[i-1]);\t\t\r\n\t\t}\r\n\t}", "public final int getRiviMuuttujaAihe() {\r\n return riviMuuttujaAihe;\r\n }", "public void nastaviIgru() {\r\n\t\t// nastavi igru poslije pobjede\r\n\t\tigrajPoslijePobjede = true;\r\n\t}", "public boolean estValide()\r\n\t{\r\n\t\tif (size() == 5)\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }", "public void nullValues() {\r\n\t\tJOptionPane.showMessageDialog(null,\r\n\t\t\t\t\"Null values ​​are not allowed or incorrect values\");\r\n\t}", "void tampilKarakterA();", "public void storeSeSu(String sesu, String ergZweiteZeile) {\n\t\tValueElement vm = hm.get(sesu);\n\t\tif (vm==null) {\n\t\t\thm.put(sesu, new ValueElement(ergZweiteZeile, 1, Integer.valueOf(bMovie? 1 : 0), Integer.valueOf(bBook? 1 : 0)));\n\t\t} else {\n\t\t\tint newcount = ++vm.count;\n\t\t\tint cRefMovies = vm.cRefMovies + (bMovie? 1 : 0); // wichtig wenn title schon aus anderem Typ\n\t\t\tint cRefBooks = vm.cRefBooks + (bBook? 1 : 0); // \"\n\t\t\tif (newcount < 4) {\n\t\t\t\tString delim = (newcount==1 ? \"\" : \", \");\n\t\t\t\thm.put(sesu, new ValueElement(new String(vm.zweiteZeile + delim + ergZweiteZeile),\n\t\t\t\t\t\t newcount, cRefMovies, cRefBooks));\n\t\t\t} else {\n\t\t\t\thm.put(sesu, new ValueElement(vm.zweiteZeile,\n newcount, cRefMovies, cRefBooks));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// update title \n\t\tvm = hm.get(title);\n\t\tint count = ++vm.count;\n\t\tint cRefMovies = vm.cRefMovies + (bMovie? 1 : 0); // wichtig wenn title schon aus anderem Typ\n\t\tint cRefBooks = vm.cRefBooks + (bBook? 1 : 0); // \"\n\t\tif (count < 4) {\n\t\t\tString delim = (count==1 ? \"\" : \", \");\n\t\t\thm.put(title, new ValueElement(new String(vm.zweiteZeile + delim + sesu), count, cRefMovies, cRefBooks));\n\t\t} else {\n\t\t\thm.put(title, new ValueElement(vm.zweiteZeile, count, cRefMovies, cRefBooks));\n\t\t}\t\n\t}", "@Test\n public void konstruktoriAsettaaSateenOikein() {\n assertEquals(3.0, lierio.getSade(), 1);\n }", "@Test\n public void testSetQuant_livros_locados() {\n System.out.println(\"setQuant_livros_locados\");\n int quant_livros_locados = 0;\n Usuario instance = null;\n instance.setQuant_livros_locados(quant_livros_locados);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "private void lisaaMiinaOikealle(int i, int j) {\n ArrayList<Ruutu> lista;\n if (i + 1 < x) {\n lista = this.ruudukko[i + 1];\n lista.get(j).setViereisetMiinat(1);\n if (j - 1 >= 0) {\n lista.get(j - 1).setViereisetMiinat(1);\n }\n if (j + 1 < x) {\n lista.get(j + 1).setViereisetMiinat(1);\n }\n }\n }", "public void xuLyThemPhieuThanhToan(){\n //Ngat chuoi\n String strTongTien = txtTongTien.getText().trim();\n String[] tongTien = strTongTien.split(\"\\\\s\");\n String strTienPhaiTra = txtTienPhaiTra.getText().trim();\n String[] tienPhaiTra = strTienPhaiTra.split(\"\\\\s\");\n\n //xu ly them vao data base\n PhieuThanhToanSevice phieuThanhToanSevice = new PhieuThanhToanSevice();\n int x = phieuThanhToanSevice.themPhieuThanhToan(txtMaPTT.getText().trim(),\n cbbMaPDK.getSelectedItem().toString(),\n Integer.valueOf(txtSoThang.getText().trim()),\n txtNgayTT.getText().trim(), Float.valueOf(tongTien[0]), Float.valueOf(tienPhaiTra[0]));\n\n if (x > 0) {\n JOptionPane.showMessageDialog(null, \"Thanh toán thành công\");\n } else {\n JOptionPane.showMessageDialog(null, \"Thanh toán thất bại\");\n return;\n }\n\n }", "private void xuLyLayMaDichVu() {\n int result = tbDichVu.getSelectedRow();\n String maDV = (String) tbDichVu.getValueAt(result, 0);\n hienThiDichVuTheoMa(maDV);\n }", "private void srediTabelu() {\n\n mtu = (ModelTabeleUlica) jtblUlica.getModel();\n ArrayList<Ulica> ulice = kontrolor.Kontroler.getInstanca().vratiUlice();\n mtu.setLista(ulice);\n\n }", "public boolean voikoSulkea() {\n handleTallenna();\n return true;\n }", "public void program() throws Exception {\r\n int valg;\r\n skrivInn(\"dvdarkiv2.txt\");//leser inn fra dvd arkivet\r\n while(true) {\r\n meny();//kaller paa meny for a skrive ut menyen etter hvert fullforte valg\n System.out.println(\"Skriv inn valget ditt\");\n valg = sjekkOmTall();//kaller paa metoden for o sorge for aa faa valg\n if (valg == 1) {\n nyPerson();\n }\n else if (valg == 2) {\n kjop();\n }\n else if (valg == 3) {\n laan();\n }\n else if (valg == 4) {\n visPerson();\n }\n else if (valg == 5) {\n visOversikt();\n }\n else if (valg == 6){\n retur();\n }\n else if (valg == 7) {\n avslutt();\n }\n }\r\n }", "private void verificaVencedor(){\n\n // Metodo para verificar o vencedor da partida\n\n if(numJogadas > 4) {\n\n String vencedor = tabuleiro.verificaVencedor();\n\n vencedor = (numJogadas == tabuleiro.TAM_TABULEIRO && vencedor == null) ? \"Deu Velha!\" : vencedor;\n\n if (vencedor != null) {\n\n mostraVencedor(vencedor);\n temVencedor = true;\n\n }\n\n }\n\n }", "public final int[] luoSatunnainenData() {\r\n int[] uusiData = new int[this.asteikko.length];\r\n\r\n while (true) {\r\n int summa = 0;\r\n for (int i = 0; i < uusiData.length; i++) {\r\n summa = summa + uusiData[i];\r\n }\r\n if (summa == this.n) {\r\n break;\r\n } else {\r\n int x = super.getRandom().nextInt(uusiData.length);\r\n uusiData[x]++;\r\n }\r\n }\r\n return uusiData;\r\n }", "public boolean estValide() {\n\t\treturn ( estDedans() && estImpaire() ); \n }" ]
[ "0.6805984", "0.66040814", "0.6594061", "0.65894973", "0.6543546", "0.65216494", "0.6494137", "0.64932644", "0.641487", "0.6384663", "0.63518804", "0.6295488", "0.62790555", "0.62503856", "0.6237463", "0.6217388", "0.61957073", "0.6135661", "0.6124717", "0.6112308", "0.6102001", "0.6060478", "0.6031004", "0.60255975", "0.60219276", "0.5956206", "0.59551424", "0.59423244", "0.5926015", "0.59183735", "0.5911559", "0.59087044", "0.59048396", "0.5898163", "0.58921343", "0.58881414", "0.5886845", "0.58730876", "0.5858761", "0.5853538", "0.5840726", "0.5835138", "0.58138865", "0.5806053", "0.5799815", "0.5799585", "0.5793929", "0.5791758", "0.57841396", "0.5780573", "0.5779341", "0.5775762", "0.5745165", "0.5744162", "0.5741548", "0.57406944", "0.57399666", "0.5732093", "0.5731401", "0.5729213", "0.5724846", "0.5718086", "0.5713552", "0.5701576", "0.57007414", "0.5695309", "0.5694845", "0.5691486", "0.56905085", "0.5689291", "0.56844026", "0.5673806", "0.56652164", "0.5662474", "0.56609386", "0.5660775", "0.5660486", "0.5659486", "0.56568384", "0.5650305", "0.56430656", "0.56409496", "0.5640049", "0.5639916", "0.563174", "0.5623513", "0.5622071", "0.5615276", "0.56123686", "0.559796", "0.55958223", "0.55937064", "0.55926657", "0.55886775", "0.55872214", "0.5585003", "0.55839556", "0.5578031", "0.55773574", "0.5574847", "0.55745435" ]
0.0
-1
Created by xqy on 17/9/25.
public interface OuterBean { void testRequired(User user); void testRequiresNew(User user); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "protected boolean func_70814_o() { return true; }", "private void m50366E() {\n }", "@Override\n public void perish() {\n \n }", "public void mo38117a() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "public void method_4270() {}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public void m23075a() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "private stendhal() {\n\t}", "public abstract void mo70713b();", "@Override\n\tprotected void interr() {\n\t}", "public void mo4359a() {\n }", "private static void cajas() {\n\t\t\n\t}", "public void mo12628c() {\n }", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private void m50367F() {\n }", "@Override\n public int describeContents() { return 0; }", "public final void mo91715d() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\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 }", "public void mo21877s() {\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "public void mo21779D() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "public abstract void mo56925d();", "protected boolean func_70041_e_() { return false; }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo12930a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "public void mo115190b() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void mo6081a() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void mo21878t() {\n }", "public void mo23813b() {\n }", "public abstract void mo27386d();", "public void mo21825b() {\n }", "public void skystonePos4() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public abstract void mo6549b();", "protected void mo6255a() {\n }", "void m1864a() {\r\n }", "public abstract void mo27385c();", "static void feladat9() {\n\t}", "private void init() {\n\n\t}", "public void mo21793R() {\n }", "public void mo9848a() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void init() {}", "public void mo97908d() {\n }", "private void level7() {\n }", "public void mo21787L() {\n }", "public void mo21792Q() {\n }", "public void mo3376r() {\n }", "public void mo21785J() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "static void feladat4() {\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "public void mo55254a() {\n }", "@Override public int describeContents() { return 0; }", "public void mo21782G() {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void mo3749d() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\r\n\tprotected void doF6() {\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\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}" ]
[ "0.5996939", "0.5931904", "0.58599263", "0.58556116", "0.57597005", "0.5725901", "0.570835", "0.5695918", "0.5677161", "0.5652634", "0.5645874", "0.56228465", "0.56228465", "0.55959713", "0.55888295", "0.5586134", "0.55667144", "0.556616", "0.55656004", "0.55358267", "0.55197674", "0.5510416", "0.5506012", "0.5486196", "0.54821", "0.54819685", "0.54796106", "0.5467332", "0.5466796", "0.5466796", "0.5466796", "0.5466796", "0.5466796", "0.54658425", "0.5464316", "0.54546803", "0.54546803", "0.54546803", "0.54546803", "0.54546803", "0.54546803", "0.54546803", "0.5447539", "0.54450285", "0.544489", "0.54409695", "0.5438768", "0.54376966", "0.5434878", "0.54174894", "0.5415406", "0.54045695", "0.53985304", "0.53964615", "0.5395989", "0.5392751", "0.53830767", "0.53828174", "0.5369976", "0.5369555", "0.53672", "0.53639174", "0.53505737", "0.53500205", "0.5348569", "0.5343554", "0.5341697", "0.53371423", "0.5331698", "0.5325191", "0.5324461", "0.5322528", "0.532054", "0.53183913", "0.5316159", "0.53074473", "0.53054625", "0.53045505", "0.53023887", "0.530174", "0.5301107", "0.5300683", "0.52956206", "0.52953357", "0.5294644", "0.52901983", "0.52897376", "0.5289567", "0.52885497", "0.5279773", "0.5279347", "0.52751076", "0.52669704", "0.52669704", "0.52669704", "0.52605724", "0.5257968", "0.5257968", "0.5257968", "0.52554876", "0.52545434" ]
0.0
-1
/ Show the event types and user id's also showing a related query if there is one and also showing the amount of the transaction if it is applicable
public static void analyzeEventsQueriesAmounts() throws SQLException { Statement stat = conn.createStatement(); ResultSet result = stat.executeQuery("SELECT * FROM fraud.afm_fraudeventrecord;"); while (result.next()) { String event = result.getString("eventType"); String user = result.getString("userId"); if ( (event.contains("LOAD")) && (user.equals("user40")) ){ System.out.print(new Date(result.getInt("timestamp"))); System.out.print(" User : " + user); System.out.print(" Event : " + event); String recordId = result.getString("fraudScoreRecordId"); if (recordId != null) { Statement stat2 = conn.createStatement(); ResultSet s = stat2.executeQuery("SELECT * FROM fraud.afm_fraudscorerecord where recordId='"+recordId+"';"); while (s.next()) { System.out.print(" Query Type: " + s.getString("queryType")); System.out.print(" Amount: " + s.getDouble("transactionAmount")); } } System.out.println(); } } stat.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void signUpForEventReporter(int type) {\n switch (type) {\n case 1:\n System.out.println(\"Here are the available Events\");\n break;\n case 2:\n System.out.println(\"Please select one of the available eventID or print '0' to exit\");\n break;\n case 3:\n System.out.println(\"The signup is cancelled\");\n break;\n case 4:\n System.out.println(\"Event Detail\");\n break;\n }\n\n }", "public String toString(){\n return \"Eventtype: \" + eventType + \", event time: \" + eventTime + \", Tally time: \" + tallyTime + \", cash: \" + cash;\n }", "@Override\n\tpublic List<Event> viewEventsOfUserDAO(EventSignUp e) throws SQLException {\n\t\treturn null;\n\t}", "@Override\n public List<Object[]> getStatistics(String owner, StatisticsGroup group, SearchEventType type) {\n String groupHQL = this.groupToHQL(group);\n List<Object[]> list = (List<Object[]>) getHibernateTemplate().findByNamedParam(\"select count(*), \"\n + \"count(distinct ipAddress), \" + groupHQL + \" \"\n + \"from SearchEvent \"\n + \"where owner like :owner \"\n + \"and eventType = :type \"\n + \"group by col_2_0_\", new String[]{\"owner\", \"type\"}, new Object[]{owner, type});\n return list;\n }", "private void queryEvents() {\n ParseQuery<Event> query = ParseQuery.getQuery(Event.class);\n // include data referred by user key\n query.include(Event.KEY_HOST);\n // limit query to latest 20 items\n query.setLimit(30);\n // order posts by creation date (newest first)\n query.addDescendingOrder(\"createdAt\");\n // start an asynchronous call for events\n query.findInBackground(new FindCallback<Event>() {\n @Override\n public void done(List<Event> events, com.parse.ParseException e) {\n\n // check for errors\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n\n // for debugging purposes let's print every event description to logcat\n for (Event event : events) {\n Log.i(TAG, \"Event: \" + event.getDescription() + \", username: \" + event.getHost().getUsername());\n }\n\n // save received events to list and notify adapter of new data\n allEvents.addAll(events);\n }\n\n });\n }", "@Override\n public List<Object[]> getStatistics(String owner, StatisticsGroup group, SearchEventType type, String from, String to) {\n String date = parseDateLimit(from, to);\n String groupHQL = this.groupToHQL(group);\n List<Object[]> list = (List<Object[]>) getHibernateTemplate().findByNamedParam(\"select count(*), \"\n + \"count(distinct ipAddress), \" + groupHQL + \" \"\n + \"from SearchEvent \"\n + \"where owner like :owner \"\n + \"and eventType = :type \"\n + date + \" \"\n + \"group by col_2_0_\", new String[]{\"owner\", \"type\"}, new Object[]{owner, type});\n return list;\n }", "private void userReport() {\n reportText.appendText(\"Report of appointments per User\\n\\n\");\n for (User user: Data.getUsers()) {\n reportText.appendText(\"\\n\\nUser: \" + user.getUsername() + \"\\n\");\n for (Appointment appointment: Data.getAppointments()) {\n if (appointment.getUser() == user.getId()) {\n reportText.appendText(\"Appointment ID: \" + appointment.getId() +\n \" \\tTitle: \" + appointment.getTitle() +\n \"\\tType: \" + appointment.getType() +\n \"\\tDescription: \" + appointment.getDescription() +\n \"\\tStart: \" + appointment.getStart() +\n \"\\tEnd: \" + appointment.getEnd() +\n \"\\tCustomer: \" + appointment.getCustomer() + \"\\n\");\n }\n System.out.println(\"\\n\\n\");\n }\n }\n\n }", "private void viewTransferHistory() {\n\t\tTransfer[] allTransfers = transferService.getTransferHistory(currentUser.getToken(),\n\t\t\t\tcurrentUser.getUser().getId());\n\n\t\tSystem.out.println(\"----------------------------------------------\");\n\t\tSystem.out.println(\"Transfers\");\n\t\tSystem.out.println(\"ID From/To Amount\");\n\t\tSystem.out.println(\"----------------------------------------------\");\n\n\t\t//loop through each transfer and print them out if they are associated with the current user\n\t\tfor (int i = 0; i < allTransfers.length; i++) {\n\n\n\t\t\tif (allTransfers[i].getToUserId() == currentUser.getUser().getId()) {\n\t\t\t\t\n\n\t\t\t\tSystem.out.println(allTransfers[i].getTransferId() + \" From: \"\n\t\t\t\t\t\t+ allTransfers[i].getFromUsername() + \" $ \" + allTransfers[i].getTransferAmount());\n\n\t\t\t} else if (allTransfers[i].getFromUserId() == currentUser.getUser().getId()) {\n\t\t\t\t\n\t\t\t\tSystem.out.println(allTransfers[i].getTransferId() + \" To: \" + allTransfers[i].getToUserName()\n\t\t\t\t\t\t+ \" $ \" + allTransfers[i].getTransferAmount());\n\t\t\t}\n\n\t\t}\n\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter the 'Transfer ID' to retreive details of the transfer or (0) to exit>>>>\");\n\t\tString stringTransferId = input.nextLine();\n\t\tboolean flagFoundId = false;\n\t\tlong transfersId = 0;\n\t\tBigDecimal transferAmount = new BigDecimal(0);\n\t\tString fromUserName = \"\";\n\t\tString toUserName = \"\";\n\t\tString typeOfTransfer = \"\";\n\t\tString statusOfTransfer = \"\";\n\t\t\n\n\t\t//display transfer details for selected transfer if a valid response\n\t\twhile (true && !String.valueOf(stringTransferId).equals(String.valueOf(0))) {\n\n\t\t\tfor (int i = 0; i < allTransfers.length; i++) {\n\t\t\t\tif (String.valueOf(stringTransferId).equals(String.valueOf(allTransfers[i].getTransferId()))) {\n\n\t\t\t\t\n\t\t\t\t\ttransfersId = allTransfers[i].getTransferId();\n\t\t\t\t\tfromUserName = allTransfers[i].getFromUsername();\n\t\t\t\t\ttoUserName = allTransfers[i].getToUserName();\n\t\t\t\t\ttypeOfTransfer = allTransfers[i].getTypeOfTransfer();\n\t\t\t\t\tstatusOfTransfer = allTransfers[i].getStatusOfTransfer();\n\t\t\t\t\ttransferAmount = allTransfers[i].getTransferAmount();\n\n\t\t\t\t\tflagFoundId = true;\n\t\t\t\t\tstringTransferId = \"0\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (flagFoundId == false) {\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\"Please enter the valid 'Transfer ID' to retreive details of the transfer or (0) to exit>>>>\");\n\t\t\t\tstringTransferId = input.nextLine();\n\n\t\t\t}\n\n\t\t}\n\n\t\tif (flagFoundId == true) {\n\t\t\tSystem.out.println(\"----------------------------------------------\");\n\t\t\tSystem.out.println(\"Transfer Details\");\n\t\t\tSystem.out.println(\"----------------------------------------------\");\n\t\t\tSystem.out.println(\"Id: \" + transfersId);\n\t\t\tSystem.out.println(\"From: \" + fromUserName);\n\t\t\tSystem.out.println(\"To: \" + toUserName);\n\t\t\tSystem.out.println(\"Type: \" + typeOfTransfer);\n\t\t\tSystem.out.println(\"Status: \" + statusOfTransfer);\n\t\t\tSystem.out.println(\"Amount: \" + transferAmount);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t// }\n\n\t}", "@Override\r\n public void onShowQueryResult() {\n }", "public void printVenueCharges (Event _event) {\n\t}", "public UserModel getUserWithEventsById(String account);", "@Override\n\tpublic ArrayList<Event> showAllEventsForOneUsersDAO(EventSignUp eventSignUp)\n\t\t\tthrows ClassNotFoundException, SQLException, IOException {\n\t\treturn null;\n\t}", "public static \tTransactionEventType getTransactionEventTypeSample(){\n\t\t\n\t\tTransactionEventType transactionEventType=new TransactionEventType();\n\t\t\n\t\tGregorianCalendar gRecordTime = new GregorianCalendar();\n\t\tXMLGregorianCalendar recordTime;\n\t\ttry {\n\t\t\trecordTime = DatatypeFactory.newInstance().newXMLGregorianCalendar(gRecordTime);\n\t\t\ttransactionEventType.setEventTime(recordTime);\n\t\t\ttransactionEventType.setRecordTime(recordTime);\n\t\t} catch (DatatypeConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\ttransactionEventType.setEventTimeZoneOffset(\"eventTimeZoneOffset_T\");\n\t\ttransactionEventType.setParentID(\"parentID_T\");\n\t\t\n\t\tEPCListType transactionEventEPCs=new EPCListType();\n\t\t\n\t\t\n\t\torg.oliot.model.epcis.EPC epc1=new org.oliot.model.epcis.EPC (\"epc1_T\");\n\t\t\n\t\torg.oliot.model.epcis.EPC epc2=new org.oliot.model.epcis.EPC (\"epc2_T\");\n\t\t\t\t\n\t\ttransactionEventEPCs.getEpc().add(epc1);\n\t\ttransactionEventEPCs.getEpc().add(epc2);\n\t\ttransactionEventType.setEpcList(transactionEventEPCs);\n\t\t\n\t\ttransactionEventType.setAction(ActionType.fromValue(\"ADD\"));\t\n\t\ttransactionEventType.setBizStep(\"bizStep_T\");\n\t\ttransactionEventType.setDisposition(\"disposition_T\");\n\t\t\n\t\t\n\t\tReadPointType readPoint=new ReadPointType();\n\t\treadPoint.setId(\"ReadPoint_object\");\n\t\tReadPointExtensionType readPointExtension=new ReadPointExtensionType();\n\t\treadPoint.setExtension(readPointExtension);\n\t\t\n\t\ttransactionEventType.setReadPoint(readPoint);\n\t\t\n\t\tBusinessLocationType businessLocation =new BusinessLocationType();\n\t\tbusinessLocation.setId(\"BusinessLocation_object\");\n\t\tBusinessLocationExtensionType businessLocationExtension= new BusinessLocationExtensionType();\n\t\tbusinessLocation.setExtension(businessLocationExtension);\n\t\t\n\t\ttransactionEventType.setBizLocation(businessLocation);\n\t\t\n\t\tBusinessTransactionListType businessTransactionList=new BusinessTransactionListType();\t\n\t\tBusinessTransactionType businessTransaction1=new BusinessTransactionType();\n\t\tbusinessTransaction1.setType(\"type1_o\");\n\t\tbusinessTransaction1.setValue(\"value1_o\");\n\t\tBusinessTransactionType businessTransaction2=new BusinessTransactionType();\n\t\tbusinessTransaction1.setType(\"type2_o\");\n\t\tbusinessTransaction1.setValue(\"value2_o\");\n\t\tbusinessTransactionList.getBizTransaction().add(businessTransaction1);\n\t\tbusinessTransactionList.getBizTransaction().add(businessTransaction2);\n\t\ttransactionEventType.setBizTransactionList(businessTransactionList);\n\t\t\n\t\t\n\t\tTransactionEventExtensionType transactionEventExtension =new TransactionEventExtensionType();\n\t\t\n\t\tQuantityListType quantityList =new QuantityListType();\n\t\tQuantityElementType quantityElement1=new QuantityElementType();\n\t\tquantityElement1.setEpcClass(\"epcClass1_O\");\n\t\tquantityElement1.setQuantity(111);\n\t\tquantityElement1.setUom(\"uom1_O\");\n\t\tQuantityElementType quantityElement2=new QuantityElementType();\n\t\tquantityElement2.setEpcClass(\"epcClass2_O\");\n\t\tquantityElement2.setQuantity(111);\n\t\tquantityElement2.setUom(\"uom2_O\");\n\t\tquantityList.getQuantityElement().add(quantityElement1);\n\t\tquantityList.getQuantityElement().add(quantityElement2);\n\t\t\n\t\ttransactionEventExtension.setQuantityList(quantityList);\n\t\t\n\t\tDestinationListType destinationList =new DestinationListType();\n\t\tSourceDestType sourceDest3=new SourceDestType( );\n\t\tSourceDestType sourceDest4=new SourceDestType( );\n\t\tsourceDest3.setValue(\"value3\");\n\t\tsourceDest3.setType(\"type3\");\n\t\tsourceDest4.setValue(\"value4\");\n\t\tsourceDest4.setType(\"type4\");\n\t\t\n\t\tdestinationList.getDestination().add(sourceDest3);\n\t\tdestinationList.getDestination().add(sourceDest4);\n\t\ttransactionEventExtension.setDestinationList(destinationList);\n\t\t\n\t\tSourceListType sourceList =new SourceListType();\n\t\tSourceDestType sourceDest1=new SourceDestType( );\n\t\tSourceDestType sourceDest2=new SourceDestType( );\n\t\tsourceDest1.setValue(\"value1\");\n\t\tsourceDest1.setType(\"type1\");\n\t\tsourceDest1.setValue(\"value2\");\n\t\tsourceDest1.setType(\"type2\");\n\t\t\n\t\tsourceList.getSource().add(sourceDest1);\n\t\tsourceList.getSource().add(sourceDest2);\n\t\t\n\t\t\n\t\ttransactionEventExtension.setSourceList(sourceList);\n\t\t\n\t\t\n\t\t\n\n\t\tTransactionEventExtension2Type transactionEventExtension2=\n\t\t\t\tnew TransactionEventExtension2Type();\n\t\t\n\t\ttransactionEventExtension.setExtension(transactionEventExtension2);\n\t\t\n\t\t\n\t\ttransactionEventType.setExtension(transactionEventExtension);\n\t\t\n\t\treturn transactionEventType;\n\t\t\n\t}", "public String toString() {\n\t\treturn this.getClass().getName() + \"::\" + this.Id_Event + \"::\"\n\t\t\t\t+ this.Id_User;\n\t}", "private void getResults(GetResultRequestEvent e){\n\t\ttable.generateTable(tf.getItemIDList(),\n\t\t\t\te.getBuySystem(), e.getBuyType(),\n\t\t\t\te.getSellSystem(), e.getSellType(),\n\t\t\t\te.getMinimumMargin());\n\t}", "public void printTransactions() {\n for (int i = 0; i < transactions.size(); i++) {\n\t\t\tint indeks = i+1;\n\t\t\tSystem.out.println(\"Transactions \" + indeks + \": \" + transactions.get(i).getType() + \" \" + transactions.get(i).getAmount());\n\t\t}\n }", "@SuppressWarnings(\"finally\")\n\t@Override\n\tpublic Response showEvent() {\n\t\tBaseResponse<NotifyTemplate> br = new BaseResponse<NotifyTemplate>();\n\t\ttry\n\t\t{\n\t\tList<NotifyTemplate> eventList;\n\t\tjdbcTemplate.setDataSource(dataSourceProvider.getDataSource(FiinfraConstants.BU_DEFAULT));\n\t\teventList=jdbcTemplate.query(FiinfraConstants.SP_GET_EVENT,new Object[]{} ,new BeanPropertyRowMapper<NotifyTemplate>(NotifyTemplate.class));\n\t\tbr.setResponseListObject(eventList); \n\t\tresponse=FiinfraResponseBuilder.getSuccessResponse(br, null);\n\t\t} \n\t\tcatch (DataAccessException e) {\n\t\t\tresponse = FiinfraResponseBuilder.getErrorResponse(e.getMessage().toString());\n\t\t}\n\t\tfinally\n\t\t{ \n\t\t\treturn response;\n\t\t\t\t} \n\t}", "private\n void\n createReportAndDisplayResults(Date start, Date end, TotalFilter filter)\n {\n CategoryReport report = CategoryReport.createReport(start, end, filter);\n IncomeExpenseTotal expenses = new IncomeExpenseTotal(EXPENSE_SUMMARY, TOTAL.toString());\n IncomeExpenseTotal income = new IncomeExpenseTotal(INCOME_SUMMARY, TOTAL.toString());\n\n // Add expense totals.\n for(IncomeExpenseTotal total : report.getExpenses())\n {\n getExpensePanel().getTable().add(total);\n\n // Combine all the expense totals into the total.\n expenses.setAmount(expenses.getAmount() + total.getAmount());\n }\n\n getExpensePanel().getTable().add(expenses);\n\n // Add income totals.\n for(IncomeExpenseTotal total : report.getIncome())\n {\n getIncomePanel().getTable().add(total);\n\n // Combine all the income totals into the total.\n income.setAmount(income.getAmount() + total.getAmount());\n }\n\n getIncomePanel().getTable().add(income);\n\n // Add transfer totals.\n for(TransferTotal total : report.getTransfers())\n {\n getTransferPanel().getTable().add(total);\n }\n\n // Display results.\n getExpensePanel().getTable().display();\n getIncomePanel().getTable().display();\n getTransferPanel().getTable().display();\n }", "private void CheckuserType() {\n DatabaseReference databaseReference=FirebaseDatabase.getInstance().getReference(\"Users\");\n databaseReference.orderByChild(\"uuid\").equalTo(firebaseAuth.getCurrentUser().getUid())\n .addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot ds:dataSnapshot.getChildren()){\n String accountType=\"\"+ds.child(\"accountType\").getValue();\n if (accountType.equals(\"Seller\")){\n progressDialog.dismiss();\n // user is seller\n Intent intent=new Intent(Login_Activity.this,MainSeller_Activity.class);\n startActivity(intent);\n finish();\n }else{\n if (accountType.equals(\"User\")){\n progressDialog.dismiss();\n // user is buyer\n Intent intent=new Intent(Login_Activity.this,MainUser_Activity.class);\n startActivity(intent);\n finish();\n }\n\n }\n }\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "public Page<Event> findEventsByEventTypeId(Long typeId , Pageable pageable);", "public void printAllSummaries()\n {\n String sum = \"\";\n for(KantoDex entry : entries)\n {\n sum = entry.getDexNum() + \": \" + entry.getName() + \" Types: \" + entry.getType1();\n if(!entry.getType2().equals(\"\"))\n {\n sum += \"/\" + entry.getType2();\n }\n System.out.println(sum);\n }\n }", "public void queryTransactions(){\n System.out.println(\"-----find transaction by condition-----\");\n System.out.println(\"--press enter to skip the input--\");\n //for every query input, do not format it into sql if it is null\n String sql = \"select * from transactionrecords join ClubMembers on transactionrecords.CustomerID = ClubMembers.CustomerID where 1=1\";\n System.out.print(\"TransactionID: \");\n String unuse=scanner.nextLine();\n String id=scanner.nextLine();\n\n //if id is given, no need for other information\n if(!StringUtils.isNullOrEmpty(id)){\n sql+=(\" and TransactionID=\"+id);\n }else{\n System.out.print(\"cashier id: \");\n String cashierid=scanner.nextLine();\n if(!StringUtils.isNullOrEmpty(cashierid)){\n sql+=(\" and CashierID=\"+cashierid);\n }\n System.out.print(\"store id: \");\n String storeid=scanner.nextLine();\n if(!StringUtils.isNullOrEmpty(storeid)){\n sql+=(\" and StoreID=\"+storeid);\n }\n System.out.print(\"customer id: \");\n String customerid=scanner.nextLine();\n if(!StringUtils.isNullOrEmpty(customerid)){\n sql+=(\" and CustomerID=\"+customerid);\n }\n }\n try {\n //System.out.println(sql);\n result = statement.executeQuery(sql);\n int cnt=0;\n\n //print all qualified result one by one\n while (result.next()) {\n cnt++;\n System.out.println(\"\\n=== No.\"+cnt+\" ===\");\n System.out.println(\"transaction id: \"+result.getInt(\"TransactionID\"));\n System.out.println(\"cashier id: \"+result.getInt(\"CashierID\"));\n System.out.println(\"store id: \"+result.getInt(\"StoreID\"));\n System.out.println(\"customer id: \"+result.getInt(\"CustomerID\"));\n System.out.println(\"customer first name: \"+result.getString(\"FirstName\"));\n System.out.println(\"customer last name: \"+result.getString(\"LastName\"));\n System.out.println(\"total price: \"+result.getDouble(\"TotalPrice\"));\n }\n System.out.println(\"Total rows: \"+cnt);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.showevent);\n Bundle extras = this.getIntent().getExtras();\n if(extras != null){\n \tevent = (EventPOJO)extras.get(\"eventPOJO\");\n \tuname = extras.getString(\"user\");\n \n \tEventPOJO event = (EventPOJO)extras.get(\"eventPOJO\");\n \tSystem.out.println(event.getEventTitle());\n \tTextView temp = (TextView)findViewById(R.id.eventTitleText);\n \ttemp.setText(event.getEventTitle());\n \ttemp = (TextView)findViewById(R.id.eventDescText);\n \ttemp.setText(event.getEventDesc());\n \ttemp = (TextView)findViewById(R.id.eventActionsText);\n \ttemp.setText(event.getEventActions());\n \ttemp = (TextView)findViewById(R.id.startDateDisplay2);\n \ttemp.setText(event.getStart());\n \ttemp = (TextView)findViewById(R.id.endDateDisplay2);\n \ttemp.setText(event.getEnd());\n \ttemp = (TextView)findViewById(R.id.affilsText);\n \t/*\n \tCharSequence[] temp2 = extras.getCharSequenceArray(\"affils\");\n \tboolean[] temp3 = extras.getBooleanArray(\"affilsChecked\");\n \tStringBuilder affilText = new StringBuilder();\n \tif(temp2 != null && temp3 != null){\n \t\tfor(int i = 0; i < temp2.length; i++){\n \t\t\tif(temp3[i])\n \t\t\t\taffilText.append(temp2[i] + \"\\t\");\n \t\t}\n \t}\n \t*/\n \tList<String> affilList = event.getAffils();\n \tStringBuilder affilText = new StringBuilder();\n \tfor(String s : affilList){\n \t\taffilText.append(s + \"\\t\");\n \t}\n \ttemp.setText(affilText.toString());\n \ttemp = (TextView)findViewById(R.id.systemsText);\n \t/*\n \ttemp2 = extras.getCharSequenceArray(\"systems\");\n \ttemp3 = extras.getBooleanArray(\"systemsChecked\");\n \tStringBuilder systemText = new StringBuilder();\n \tif(temp2 != null && temp3 != null){\n \t\tfor(int i = 0; i < temp2.length; i++){\n \t\t\tif(temp3[i])\n \t\t\t\tsystemText.append(temp2[i] + \"\\t\");\n \t\t}\n \t}\n \t*/\n \tList<String> systemList = event.getSystems();\n \tStringBuilder systemText = new StringBuilder();\n \tfor(String s : systemList){\n \t\tsystemText.append(s + \"\\t\");\n \t}\n \ttemp.setText(systemText.toString());\n \ttemp = (TextView)findViewById(R.id.personText1);\n \ttemp.setText(event.getContact1());\n \ttemp = (TextView)findViewById(R.id.personText2);\n \ttemp.setText(event.getContact2());\n \ttemp = (TextView)findViewById(R.id.severityText);\n \ttemp.setBackgroundColor(event.getSeverity());\n \ttemp = (TextView)findViewById(R.id.typeText);\n \ttemp.setText(event.getType());\n \t\n }\n }", "@RequestMapping(value = {\"/\", \"/transactions\"})\n\tpublic String listAllTransactions(Model model) {\n\t\t\n\t\t// fetch one user and transactions for that user\n\t\tUserDetails user = (UserDetails) SecurityContextHolder.getContext()\n\t\t\t\t.getAuthentication().getPrincipal();\n\t\tString username = user.getUsername();\n\t\tUser currentUser = userRepo.findByUsername(username);\n\t\tmodel.addAttribute(\"transactions\", traRepo.findByUser(currentUser));\n\t\t\n\t\tList<Transaction> traList = traRepo.findByUser(currentUser);\n\t\tdouble sum = 0;\n\t\tfor(int i = 0; i < traList.size(); i++) {\n\t\t\tif(traList.get(i).getType().getName() == \"income\") {\n\t\t\t\tsum += traList.get(i).getAmount();\n\t\t\t}\n\t\t\tif(traList.get(i).getType().getName() == \"expense\") {\n\t\t\t\tsum -= traList.get(i).getAmount();\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t\tmodel.addAttribute(\"sum\", sum);\n\t\t\n\t\treturn \"transactions\";\n\t}", "private void showResult(TYPE type){\r\n\t\tString brand = \"\";//brand\r\n\t\tString sub = \"\";//sub brand\r\n\t\tString area = \"\";//area\r\n\t\tString cus = \"\";//customer name\r\n\t\tString time = \"\";//time in second level\r\n\t\tKIND kind = null;//profit or shipment \r\n\t\t\r\n\t\tif(item1.getExpanded()){\r\n\t\t\tkind = KIND.SHIPMENT;\r\n\t\t\tbrand = combo_brand_shipment.getText();\r\n\t\t\tsub = combo_sub_shipment.getText();\r\n\t\t\tarea = combo_area_shipment.getText();\r\n\t\t\tcus = combo_cus_shipment.getText();\r\n\t\t}else if(item2.getExpanded()){\r\n\t\t\tkind = KIND.PROFIT;\r\n\t\t\tbrand = combo_brand_profit.getText();\r\n\t\t\tsub = combo_sub_profit.getText();\r\n\t\t\tarea = combo_area_profit.getText();\r\n\t\t\tcus = combo_cus_profit.getText();\r\n\t\t}else{//either item1 & item2 are not expanded\r\n\t\t\t//show a message?\r\n\t\t\tkind = KIND.NONE;\r\n\t\t}\r\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMddHHmmss\");\r\n\t\ttime = formatter.format(new Date());\r\n\t\tfinal Map<String, Object> args = new HashMap<String ,Object>();\r\n\t\targs.put(\"brand\", brand);\r\n\t\targs.put(\"sub_brand\", sub);\r\n\t\targs.put(\"area\", area);\r\n\t\targs.put(\"customer\", cus);\r\n\t\targs.put(\"time\", time);\r\n\t\targs.put(\"kind\", kind.toString());\r\n\t\targs.put(\"type\", type.toString());\r\n\t\t//call engine to get the data\t\r\n\t\t\r\n\t\tProgressMonitorDialog progressDialog = new ProgressMonitorDialog(Display.getCurrent().getActiveShell());\r\n\t\tIRunnableWithProgress runnable = new IRunnableWithProgress() { \r\n\t\t public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { \r\n\t\t \t\r\n\t\t Display.getDefault().asyncExec(new Runnable() { \r\n\t\t public void run() { \r\n\t\t monitor.beginTask(\"正在进行更新,请勿关闭系统...\", 100); \r\n\t\t \r\n\t\t monitor.worked(25); \r\n\t monitor.subTask(\"收集数据\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tro.getMap().clear();\r\n\t\t\t\t\tro=statistic.startAnalyzing(args, monitor);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\tMessageBox mbox = new MessageBox(MainUI.getMainUI_Instance(Display.getDefault()));\r\n\t\t\t\t\tmbox.setMessage(\"分析数据失败,请重试\");\r\n\t\t\t\t\tmbox.open();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\tmonitor.worked(100); \r\n\t monitor.subTask(\"分析完成\");\r\n\t \r\n\t\t monitor.done();\r\n\t\t }\r\n\t\t \t });\r\n\t\t } \r\n\t\t}; \r\n\t\t \r\n\t\ttry { \r\n\t\t progressDialog.run(true,/*是否开辟另外一个线程*/ \r\n\t\t false,/*是否可执行取消操作的线程*/ \r\n\t\t runnable/*线程所执行的具体代码*/ \r\n\t\t ); \r\n\t\t} catch (InvocationTargetException e) { \r\n\t\t\tMessageBox mbox = new MessageBox(MainUI.getMainUI_Instance(Display.getDefault()));\r\n\t\t\tmbox.setMessage(\"分析数据失败,请重试\");\r\n\t\t\tmbox.open();\r\n\t\t\treturn;\r\n\t\t} catch (InterruptedException e) { \r\n\t\t\tMessageBox mbox = new MessageBox(MainUI.getMainUI_Instance(Display.getDefault()));\r\n\t\t\tmbox.setMessage(\"分析数据失败,请重试\");\r\n\t\t\tmbox.open();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(ro.getMap().isEmpty())\r\n\t\t\treturn;\r\n\t\t\r\n\t\tPagination page1 = (Pagination) ro.get(\"table1\");\r\n\t\tPagination page2 = (Pagination) ro.get(\"table2\");\r\n\t\tPagination page3 = (Pagination) ro.get(\"table3\");\r\n\t\tList<Object> res1 = new ArrayList<Object>();\r\n\t\tList<Object> res2 = new ArrayList<Object>();\r\n\t\tList<Object> res3 = new ArrayList<Object>();\r\n\t\tif(page1 != null)\r\n\t\t\tres1 = (List<Object>)page1.getItems();\r\n\t\tif(page2 != null)\r\n\t\t\tres2 = (List<Object>)page2.getItems();\r\n\t\tif(page2 != null)\r\n\t\t\tres3 = (List<Object>)page3.getItems();\r\n\t\t\r\n\t\tif(res1.size()==0 && res2.size()==0 && res3.size()==0){\r\n\t\t\tMessageBox messageBox = new MessageBox(MainUI.getMainUI_Instance(Display.getDefault()));\r\n\t \tmessageBox.setMessage(\"没有满足查询条件的数据可供分析,请查询其他条件\");\r\n\t \tmessageBox.open();\r\n\t \treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//this if/else can be optimized, since it looks better in this way, leave it\t\t\r\n\t\t//case 1: brand ratio, area ratio, trend\r\n\t\tif(brand.equals(AnalyzerConstants.ALL_BRAND) && area.equals(AnalyzerConstants.ALL_AREA)){\r\n\t\t\t\t\t\t\r\n\t\t\t//brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(true);//all brands\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n \t\t\r\n \t\t//area ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(true);//all areas\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//area\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\r\n\t\t}\r\n\t\t//case 2: brand ratio, customer ratio, trend\r\n\t\telse if(brand.equals(AnalyzerConstants.ALL_BRAND) && cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n\t\t\t//brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(true);//all brands\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n \r\n \t\t//customer ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(false);//all areas\r\n \t\trb2.setArea(area);\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//area\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 3: brand ratio, trend\r\n\t\telse if(brand.equals(AnalyzerConstants.ALL_BRAND) && !area.equals(AnalyzerConstants.ALL_AREA) && !cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n\t\t\t//brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(true);//all brands\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 4: sub brand ratio, area ratio, trend\r\n\t\telse if(sub.equals(AnalyzerConstants.ALL_SUB) && area.equals(AnalyzerConstants.ALL_AREA)){\r\n\t\t\t//sub brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(false);//all brands\r\n\t\t\trb.setBrand(brand);\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n \r\n \t\t//area ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(true);//all areas\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//area\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 5: sub brand ratio, customer ratio, trend\r\n\t\telse if(sub.equals(AnalyzerConstants.ALL_SUB) && cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n\t\t\t//sub brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(false);//all brands\r\n\t\t\trb.setBrand(brand);\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n \r\n \t\t//customer ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(false);//all areas\r\n \t\trb2.setArea(area);\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//area\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 6: sub brand ratio, trend\r\n\t\telse if(sub.equals(AnalyzerConstants.ALL_SUB) && !area.equals(AnalyzerConstants.ALL_AREA) && !cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n\t\t\t//sub brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(false);//all brands\r\n\t\t\trb.setBrand(brand);\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 7: area ratio, trend\r\n\t\telse if(!brand.equals(AnalyzerConstants.ALL_BRAND) && !sub.equals(AnalyzerConstants.ALL_SUB) && area.equals(AnalyzerConstants.ALL_AREA)){\r\n \t\t//area ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(true);//all areas\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//brand\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 8: customer ratio, trend\r\n\t\telse if(!brand.equals(AnalyzerConstants.ALL_BRAND) && !sub.equals(AnalyzerConstants.ALL_SUB) && cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n \t\t//customer ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(false);//all areas\r\n \t\trb2.setArea(area);\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//brand\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 9: trend\r\n\t\telse if(!brand.equals(AnalyzerConstants.ALL_BRAND) && !sub.equals(AnalyzerConstants.ALL_SUB) && !area.equals(AnalyzerConstants.ALL_AREA) & !cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n\t\t\t//now, just trend, do nothing here\r\n\t\t}\r\n\t\tif(!kind.equals(KIND.NONE)){\r\n\t\t\t//trend, always has the trend graph \t\r\n\t\t\tTrendDataSet ts = new TrendDataSet();\r\n\t\t\tts.setKind(kind);\t\r\n\t\t\tts.setType(type);\r\n\t\t\tTrendComposite tc = new TrendComposite(composite_content, 0, ts, res3); \r\n\t\t\talys.add(tc);\r\n\t\t\tcomposite_content.setLayout(layout_content);\r\n\t\t\tcomposite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t\t\t\r\n\t}", "public void displayUserInformations() {\n println(\"getLocation(): \"+user.getLocation());\n println(\"getFriendsCount(): \"+user.getFriendsCount());\n println(\"getFollowersCount(): \"+user.getFollowersCount());\n println(\"getDescription(): \"+user.getDescription());\n println(\"getCreatedAt() : \"+user.getCreatedAt() );\n println(\"getDescriptionURLEntities(): \"+user.getDescriptionURLEntities());\n println(\"getFavouritesCount() : \"+user.getFavouritesCount() );\n }", "public String reportTransaction() {\n String verb = type.equals(\"buy\") ? \"bought\" : \"sold\";\n return volume + \" stocks of \" + symbol + \" \" + verb + \" @\" + price +\n \" USD (total value \" + String.format(\"%.2f\", getTransactionAmount()) + \" USD).\";\n }", "public String showAllEvents() {\n String allEvents = \"\";\n for (Event e: events)\n {\n allEvents = allEvents + e.getName() + \"\\n\";\n }\n return allEvents;\n }", "@Override\n public void infoUsersNotHaveData() {\n mSearchChildView.showEmptyArtistsLayout();\n }", "user showGoodsByUserId(long userId);", "public static ListObject getNearbyEvents (int userId) {\n\t\tProfile user = getUser(userId) ;\n\t\tList <Event> events =EventController.setUserStatus(user.getEventsWhoOwn(), 2);\n\t\tevents.addAll( EventController.setUserStatus(user.getEvents(), 1)) ;\n\t\tCollections.sort(events);\n\t\tList <Event> unfinished = EventController.getUnfinishedEvents(events) ;\n\t\tint size = 5 ;\n\t\tListObject obj ;\n\t\tif ( unfinished.size() <= 5 ) {\n\t\t\tobj = new ListObject(unfinished) ;\n\t\t\tif ( unfinished.size() >= events.size() ) {\n\t\t\t\tobj.moreExist = 1 ;\n\t\t\t}\n\t\t\telse obj.moreExist = 2 ;\n\t\t}\n\t\telse {\n\t\t\tobj = new ListObject(unfinished.subList(0,size));\n\t\t\tobj.moreExist = 2 ;\n\t\t}\n\t\t\n\t\treturn obj ;\n\t}", "public String getEventInfo()\n {\n return \"Event ID: \" + this.hashCode() + \" | Recorded User\\n\" + String.format(\"\\tName %s \\n\\tDate of Birth %s \\n\\tEmail %s \\n\\tContact Number %s \\n\\tAge %d \\nDate %s \\nTime %s \\nParty Size %d \\nEstablishment \\n\\tName: %s \\n\\tAddress: %s\",\n user.getName(), user.getDateOfBirthAsString(), user.getEmail(), user.getPhoneNumber(), \n user.getAge(), getEventDateAsString(), getEventTimeAsString(), partyNumber, establishment.getName(), establishment.getAddress());\n }", "@Override\r\n\t@Transactional\r\n\tpublic Integer TotalEventuales(int tipo, int estado) {\n\t\treturn dao.TotalEventuales(tipo, estado);\r\n\t}", "@Override\n public <E extends Event> Cursor<E> streamEvents(Class<E> type) {\n ensureRatingCache();\n return cache.streamEvents(type);\n }", "@RequestMapping(value = \"/events\", method = RequestMethod.GET)\r\n public ModelAndView showEvents() {\r\n ModelAndView mav = new ModelAndView(\"events\");\r\n User loggedIn = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\r\n User user = hibernateTemplate.get(User.class, loggedIn.getUsername());\r\n List<Event> events = dataAccessService.getEventsForUser(user, null);\r\n mav.addObject(\"events\", events);\r\n return mav;\r\n }", "@Override\r\n\tpublic int getTotalCount(Class<T> type) {\n\t\treturn (int) super.getSessionFactory().getCurrentSession().createQuery(\"select count(1) as num from \"+\r\n\t\t\t\ttype.getName()+\"\").uniqueResult();\r\n\t}", "public void askForType() {\n System.out.println(\"What type of event will this be?\");\n System.out.println(\"1) Normal 2) Multi-Speaker 3) VIP\");\n }", "public void getEventDetails() {\r\n\t\t// Query DB to get specific event information based on EventID.\r\n\t}", "protected void printEvent(Event event) {\n System.out.println(\"\\t\" + event.getName());\n System.out.println(\"\\t\" + event.getDate().getDate());\n System.out.println(\"\\t\" + event.getTime().get12HTime());\n\n if (event.getDuration() != 0) {\n System.out.println(\"\\tFor \" + event.getDuration() + \" minutes\");\n }\n }", "public void showDetails (Player player) {\r\n\t\tString \tc\t= Term.COLOR_INACTIVE.get();\r\n\t\t\r\n\t\t// Get the color\r\n\t\tif (getActivity() == Activity.SELL\t\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_SELL.get();\r\n\t\t\r\n\t\telse if (getActivity() == Activity.BUY\t\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_BUY.get();\r\n\t\t\r\n\t\telse if (getActivity() == Activity.EXCHANGE\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_EXCHANGE.get();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tList<String>\tmessage\t= new ArrayList<String>();\r\n\t\t\t\t\t\tmessage.add(Term.INFO_1.get() + c + getActivity().toString() \t+ Term.INFO_2.get() + c +scs.formatCurrency(getPrice())\t\t+ Term.INFO_9.get() + c + getOwner());\r\n\t\t\r\n\t\tString \ttext\t= null;\r\n\t\tString\tname\t= getItemName();\r\n\t\t\r\n\t\tif (!isUnlimited()) {\r\n\t\t\tif (getActivity() == Activity.BUY)\r\n\t\t\t\ttext = getAmount()+ \"/\" + getMaxAmount();\r\n\t\t\telse\r\n\t\t\t\ttext = \"\" + getAmount();\r\n\t\t} else {\r\n\t\t\ttext = Term.INFO_UNLIMITED.get();\r\n\t\t}\r\n\t\t\r\n\t\tif (getItemStack().getType() == Material.WRITTEN_BOOK)\r\n\t\t\tname = getNBTStorage().getBookTitle();\r\n\t\t\r\n\t\tmessage.add(Term.INFO_4.get() + c + name\t\t\t\t+ Term.INFO_3.get() + c + text);\r\n//\t\t\t\t\t\tmessage.add(Term.INFO_4.get() + c + getItemName()\t\t\t\t+ Term.INFO_3.get() + c + (!isUnlimited() ? (getActivity() == Activity.BUY ? getMaxAmount() : getAmount()) : Term.INFO_UNLIMITED.get()));\r\n\t\t\r\n\t\tStringBuffer\tbuffer \t= new StringBuffer();\r\n\t\tString\t\t\tdelim\t= \"\";\r\n\t\r\n\t\tfor (Enchantment en : getEnchantments().keySet()) {\r\n\t\t\tint lvl\t= getEnchantments().get(en);\r\n\t\t\t\r\n\t\t\tbuffer.append(delim + en.getName() + \" lvl \" + lvl);\r\n\t\t\tdelim\t= \", \";\r\n\t\t}\r\n\t\t\r\n\t\tif (buffer.toString().length() > 0)\r\n\t\t\tmessage.add(Term.INFO_8.get() + c + buffer.toString());\r\n\t\t\r\n\t\tif (player.hasPermission(Properties.permAdmin))\r\n\t\t\tmessage.add(c + getSHA1());\r\n\t\t\r\n\t\tMessaging.mlSend(player, message);\r\n\t}", "public void showNextEvents() {\n String textToShowCurrent = \"\";\n String textToShow0h = \"\";\n String textToShow1h = \"\";\n String textToShow2h = \"\";\n for (int i = 0; i < mNeededEvents.get(0).size(); i++) {\n textToShowCurrent += mNeededEvents.get(0).get(i).getEventName() + \", \";\n if (i == mNeededEvents.get(0).size() - 1) {\n textToShowCurrent = textToShowCurrent.substring(0, textToShowCurrent.toCharArray().length - 2) + \".\";\n }\n }\n for (int i = 0; i < mNeededEvents.get(1).size(); i++) {\n textToShow0h += mNeededEvents.get(1).get(i).getEventName() + \", \";\n if (i == mNeededEvents.get(1).size() - 1) {\n textToShow0h = textToShow0h.substring(0, textToShow0h.toCharArray().length - 2) + \".\";\n }\n }\n for (int i = 0; i < mNeededEvents.get(2).size(); i++) {\n textToShow1h += mNeededEvents.get(2).get(i).getEventName() + \", \";\n if (i == mNeededEvents.get(2).size() - 1) {\n textToShow1h = textToShow1h.substring(0, textToShow1h.toCharArray().length - 2) + \".\";\n }\n }\n for (int i = 0; i < mNeededEvents.get(3).size(); i++) {\n textToShow2h += mNeededEvents.get(3).get(i).getEventName() + \", \";\n if (i == mNeededEvents.get(3).size() - 1) {\n textToShow2h = textToShow2h.substring(0, textToShow2h.toCharArray().length - 2) + \".\";\n }\n\n }\n mEventCurrent.setText(textToShowCurrent);\n mEvent0h.setText(textToShow0h);\n mEvent1h.setText(textToShow1h);\n mEvent2h.setText(textToShow2h);\n }", "@Transactional(value = \"cleia-txm\", readOnly = true)\n public List<Medical> getMedicalUser(GridRequest filters, String username) {\n List<Medical> lm = new ArrayList<Medical>();\n Medical m = (Medical) entityManager.createQuery(\"select m from Medical m where m.username = :username\").setParameter(\"username\", username).getSingleResult();\n if (m instanceof Medical) {\n Medical medical = (Medical) m;\n medical.getPatient().getUser().getGroups().size();\n medical.getPatient().getUser().getRoles().size();\n medical.getPatient().getUser().getIds().size();\n medical.getPatient().getProcessInstances().size();\n lm.add(medical);\n \n }\n return lm;\n \n }", "public Page<Event> findEventsByUserId(Long userId , Pageable pageable);", "private String getEventType(Event event) {\n if (event instanceof Seminar) {\n return \"[S]: \";\n } else {\n return \"[E]: \";\n }\n }", "private static void revenueData() {\n\n if(getStatus().equals(\"no database\"))\n return;\n\n clearScreen();\n\n Scanner input = new Scanner(System.in);\n char opt = '_';\n \n while(opt != 'q')\n {\n\n System.out.print(\"Type (c)ount, (d)ays, or (r)evenue to view \"\n + \"different table data (or (q)uit to exit): \");\n\n opt = input.next().toLowerCase().charAt(0);\n\n if(opt == 'c')\n displayRevenue(\"Reservations\", \n \"COUNT(*) AS Reservations\");\n \n if(opt == 'd')\n displayRevenue(\"days_occupied\", \n \"SUM(DATEDIFF(CheckOut, CheckIn)) AS days_occupied\");\n\n if(opt == 'r')\n displayRevenue(\"Revenue\", \n \"SUM(DATEDIFF(CheckOut, CheckIn) * Rate) AS Revenue\");\n\n }\n\n }", "private void onGetAllIdentitet(Event<FintResource> responseEvent) {\n Identifikator batmanId = new Identifikator();\n batmanId.setIdentifikatorverdi(\"BATMAN\");\n Identitet batman = new Identitet();\n batman.setSystemId(batmanId);\n responseEvent.addData(FintResource\n .with(batman)\n .addRelations(new Relation.Builder().with(Identitet.Relasjonsnavn.PERSONALRESSURS).forType(Personalressurs.class).field(\"ansattnummer\").value(\"100001\").build())\n .addRelations(new Relation.Builder().with(Identitet.Relasjonsnavn.RETTIGHET).forType(Rettighet.class).field(\"systemid\").value(\"BATCAVE\").build())\n .addRelations(new Relation.Builder().with(Identitet.Relasjonsnavn.RETTIGHET).forType(Rettighet.class).field(\"systemid\").value(\"BATMOBILE\").build()));\n\n Identifikator robinId = new Identifikator();\n robinId.setIdentifikatorverdi(\"ROBIN\");\n Identitet robin = new Identitet();\n robin.setSystemId(robinId);\n responseEvent.addData(FintResource\n .with(robin)\n .addRelations(new Relation.Builder().with(Identitet.Relasjonsnavn.PERSONALRESSURS).forType(Personalressurs.class).field(\"ansattnummer\").value(\"100002\").build())\n .addRelations(new Relation.Builder().with(Identitet.Relasjonsnavn.RETTIGHET).forType(Rettighet.class).field(\"systemid\").value(\"BATCAVE\").build()));\n }", "public Integer getCount(Class<?> type) {\n return events.containsKey(type) ? events.get(type).size() : 0;\n }", "public void queryTransactionDetail(){\n System.out.println(\"-----find transaction detail by condition-----\");\n System.out.println(\"--press enter to skip the input--\");\n String sql = \"select * from TransactionContains join Merchandise on TransactionContains.ProductID = Merchandise.ProductID where TransactionID=\";\n System.out.print(\"TransactionID: \");\n String unuse=scanner.nextLine();\n String id=scanner.nextLine();\n sql+=id;\n try {\n //System.out.println(sql);\n result = statement.executeQuery(sql);\n int cnt=0;\n while (result.next()) {\n cnt++;\n System.out.println(\"\\n=== No.\"+cnt+\" ===\");\n System.out.println(\"transaction id: \"+result.getInt(\"TransactionID\"));\n System.out.println(\"product id: \"+result.getInt(\"ProductID\"));\n System.out.println(\"product name: \"+result.getString(\"ProductName\"));\n System.out.println(\"actual price: \"+result.getDouble(\"ActualPrice\"));\n }\n System.out.println(\"Total rows: \"+cnt);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "private void showData(String query) {\n try {\n ResultSet rs = DB.search(query);\n tbl.setRowCount(0);\n while (rs.next()) {\n Vector v = new Vector();\n v.add(rs.getString(1)); //inv id\n v.add(rs.getString(6)); //cus name\n v.add(rs.getString(2)); //date\n v.add(rs.getString(3)); //time\n v.add(rs.getString(10)); //price\n v.add(rs.getString(11)); //discount\n v.add(rs.getString(12)); //total\n v.add(rs.getString(13)); //pay method\n tbl.addRow(v);\n }\n //Calculating the total value of invoices\n double total = 0d;\n for (int row = 0; row < tbl.getRowCount(); row++) {\n total = total + Double.parseDouble(tbl.getValueAt(row, 4).toString());\n }\n lbAllValue.setText(String.valueOf(total));\n lbNoofnvs.setText(String.valueOf(tbl.getRowCount()));\n setCOLORSTB(jTable1);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void handleDataTypeInfoFocusEvent(DataTypeInfoFocusEvent event)\r\n {\r\n if (event.getSource() == this)\r\n {\r\n return;\r\n }\r\n Collection<? extends DataTypeInfo> types = event.getTypes();\r\n synchronized (myQueryRegions)\r\n {\r\n if (event.getFocusType() == FocusType.HOVER_GAINED && types.stream().anyMatch(t -> t.isQueryable()))\r\n {\r\n myQueryRegions.forEach(r -> r.getGeometries().forEach(\r\n g -> g.getRenderProperties().setHidden(!types.stream().anyMatch(t -> r.appliesToType(t.getTypeKey())))));\r\n }\r\n else\r\n {\r\n myQueryRegions.forEach(r -> r.getGeometries().forEach(g -> g.getRenderProperties().setHidden(false)));\r\n }\r\n }\r\n }", "@Override\n public Map<String, List<TrackedEntityDataValue>> queryTrackedEntityDataValues(\n Boolean singleEvents) {\n String queryStatement;\n if (singleEvents) {\n queryStatement = QUERY_TRACKED_ENTITY_DATA_VALUES_ATTACHED_TO_SINGLE_EVENTS;\n } else {\n queryStatement = QUERY_TRACKED_ENTITY_DATA_VALUES_ATTACHED_TO_TRACKER_EVENTS;\n }\n\n Cursor cursor = databaseAdapter.query(queryStatement);\n\n Map<String, List<TrackedEntityDataValue>> dataValues = mapFromCursor(cursor);\n\n return dataValues;\n }", "public void printByUser() {\r\n TUseStatus useStatus;\r\n\t for (int a=0; a < m_current_resources_count; a++)\r\n\t for (int b=0; b < m_current_users_count; b++) {\r\n\t useStatus = m_associations[a][b];\r\n\t if (useStatus!=null) System.out.println(useStatus.toString()); \r\n\t } \r\n }", "@Override\n public int getUserTypesCount() {\n return userTypes_.size();\n }", "@Query(\"select count(a) from Rendezvous a right join a.user r group by r.id\")\n\tCollection<Double> dashboardRendezvousesByUser();", "public void getEventByFees()\r\n {\r\n boolean b=false;\r\n \r\n String output = \"\";\r\n output=\"Id \"+\"Event Name \"+\"Organizer \"+\"Date \"+\" Fees($)\"+\"\\n\";\r\n \r\n List<Event> list2=new ArrayList();\r\n do{\r\n \r\n List<Event> list1=fillArrayList();\r\n \r\n \r\n String string=JOptionPane.showInputDialog(\"Enter Event Fees to search Event by Fees\");\r\n double fees=Double.parseDouble(string);\r\n for(Event e:list1)\r\n {\r\n if(e.getFees()==fees)\r\n {\r\n list2.add(e);\r\n b=true;\r\n break;\r\n }\r\n else\r\n {\r\n \r\n b=false;\r\n }\r\n }\r\n if(!b)\r\n JOptionPane.showMessageDialog(null,\"Event with fees \"+string+\" Does not exist! please try again\",\"Error\",JOptionPane.ERROR_MESSAGE);\r\n }while(!b);\r\n \r\n \r\n for(int i = 0; i<list2.size(); i++){\r\n \r\n String everything2 = list2.get(i).toString();\r\n\r\n output += everything2+\"\\n\"; \r\n }\r\n JOptionPane.showMessageDialog(null,output,\"Event\",JOptionPane.INFORMATION_MESSAGE);\r\n \r\n allMenuClass.userMenu();\r\n }", "@FXML\n private void handleAttendeesOnlyCheckbox(ActionEvent event) {\n if (attendeesOnlyCheckbox.isSelected()) {\n // Attendees only\n //searchRowItemList = eventCustomerRowItemList;\n //searchResultsTable.setItems(eventCustomerRowItemList);\n attendeesFilter = new CustomerListFilter();\n attendeesFilter.addFilter(a -> {\n if (eventCustomerRowItemList.contains(a)) {\n return true;\n }\n return false;\n }\n );\n filterList.add(attendeesFilter);\n } else {\n // Show all\n //searchRowItemList = fullCustomerRowItemList;\n //searchResultsTable.setItems(fullCustomerRowItemList);\n filterList.remove(attendeesFilter);\n attendeesFilter = null;\n }\n\n applyFilters();\n }", "public void displayStats() {\n VisitorDAO visitorDAO = new VisitorDAO();\n Object countAllVisitors = visitorDAO.getCountAllVisitors();\n Object countNewSubscribers = visitorDAO.getCountNewSubscribersForMonth(this.simpleDateFormat.format(new Date()));\n\n this.totalSubscribersText.setText(this.totalSubscribersText.getText() + countAllVisitors.toString());\n this.newSubscribersText.setText(this.newSubscribersText.getText() + countNewSubscribers.toString());\n }", "public final void loadEvents() {\n\n if (selectedUser == null || selectedUser.equals(\"All\")) {\n for (Absence a : AbsenceService.getAllUnacknowledged()) {\n\n AbsenceEvent e = new AbsenceEvent(a.getUser().getUsername() + \" \" + a.getAbsenceType(), TimeConverterService.convertLocalDateTimeToDate(a.getStartTime()), TimeConverterService.convertLocalDateTimeToDate(a.getEndTime()), a);\n\n switch (e.getAbsence().getAbsenceType()) {\n\n case MEDICAL_LEAVE:\n e.setStyleClass(\"medical_leave\");\n break;\n case HOLIDAY:\n e.setStyleClass(\"holiday\");\n e.setAllDay(true);\n break;\n case TIME_COMPENSATION:\n e.setStyleClass(\"time_compensation\");\n break;\n case BUSINESSRELATED_ABSENCE:\n e.setStyleClass(\"business-related_absence\");\n break;\n default:\n }\n\n this.addEvent(e);\n }\n } else {\n for (Absence a : AbsenceService.getAbsenceByUserAndUnacknowledged(BenutzerverwaltungService.getUser(selectedUser))) {\n\n AbsenceEvent e = new AbsenceEvent(a.getUser().getUsername() + \" \" + a.getAbsenceType() + \" \" + a.getReason(), TimeConverterService.convertLocalDateTimeToDate(a.getStartTime()), TimeConverterService.convertLocalDateTimeToDate(a.getEndTime()), a);\n\n switch (e.getAbsence().getAbsenceType()) {\n\n case MEDICAL_LEAVE:\n e.setStyleClass(\"medical_leave\");\n break;\n case HOLIDAY:\n e.setStyleClass(\"holiday\");\n e.setAllDay(true);\n break;\n case TIME_COMPENSATION:\n e.setStyleClass(\"time_compensation\");\n break;\n case BUSINESSRELATED_ABSENCE:\n e.setStyleClass(\"business-related_absence\");\n break;\n default:\n }\n\n this.addEvent(e);\n }\n }\n\n DefaultScheduleEvent holidayevent;\n\n for (Holiday h : HolidayService.getList()) {\n holidayevent = new DefaultScheduleEvent(h.getHolidayComment(), TimeConverterService.convertLocalDateToDate(h.getHolidayDate()), TimeConverterService.convertLocalDateToDate(h.getHolidayDate()));\n holidayevent.setAllDay(true);\n holidayevent.setStyleClass(\"feiertag\");\n\n this.addEvent(holidayevent);\n }\n }", "public String getTypesSummary() throws Exception {\n\t\treturn this.xqueryUtil.getTypesSummary();\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "@Override\r\n\tpublic UserModel getUserWithEventsById(String account) {\n\t\treturn null;\r\n\t}", "private void querySumMenu()\n\t{\n\t\tclearPanel(getPanel1());\n\t\t\n\t\tJLabel label1=new JLabel(\"This is the total numbers\\nFor:\"+getValue1()+\"and\"+getValue2());\n\t\t\n\t\t//get table from sumQuery and put it in table\n\t\tJTable table=getQuery1().sumQuery(); \n\t\t\n\t\tJScrollPane scrolltable = new JScrollPane(table);\n\t\tlabel1.setBounds(100,10,400,40);\n\t\tscrolltable.setBounds(500,10,500,500);\n\t\tgetPanel1().add(scrolltable);\n\t\tgetPanel1().add(getButton3());\n\t\tgetPanel1().add(getButton4());\n\t\tgetButton3().setBounds(260,10,180,60);\n\t\tgetButton4().setBounds(80,10,180,60);\n\t}", "@Override\n public void done(List<ParseObject> parseObjects, ParseException e) {\n for (ParseObject object : parseObjects) {\n ParseUser from = object.getParseUser(\"from\");\n\n ParseUser friend;\n /* Check if friend is the 'from' or 'to' user in the friendship */\n if (from.hasSameId(user)) {\n friend = object.getParseUser(\"to\");\n } else {\n friend = from;\n }\n\n friends.add(friend);\n }\n\n /* Set up factory for events by friends */\n factory = new ParseQueryAdapter.QueryFactory<Event>() {\n public ParseQuery<Event> create() {\n\n int year = mCalendar.get(Calendar.YEAR);\n int month = mCalendar.get(Calendar.MONTH);\n int day = mCalendar.get(Calendar.DAY_OF_MONTH);\n\n Calendar midnight = Calendar.getInstance();\n midnight.set(Calendar.YEAR, year);\n midnight.set(Calendar.MONTH, month);\n midnight.set(Calendar.DAY_OF_MONTH, day);\n midnight.set(Calendar.HOUR_OF_DAY, 0);\n midnight.set(Calendar.MINUTE, 0);\n midnight.set(Calendar.SECOND, 0);\n\n Calendar elevenFiftyNine = Calendar.getInstance();\n elevenFiftyNine.set(Calendar.YEAR, year);\n elevenFiftyNine.set(Calendar.MONTH, month);\n elevenFiftyNine.set(Calendar.DAY_OF_MONTH, day);\n elevenFiftyNine.set(Calendar.HOUR_OF_DAY, 23);\n elevenFiftyNine.set(Calendar.MINUTE, 59);\n elevenFiftyNine.set(Calendar.SECOND, 59);\n\n Date dayStart = new Date(midnight.getTimeInMillis());\n Date dayEnd = new Date(elevenFiftyNine.getTimeInMillis());\n\n /* Create a query for events */\n ParseQuery<Event> query = Event.getQuery();\n // Events must be created by someone in the list of friends\n query.whereContainedIn(\"user\", friends);\n query.whereGreaterThan(\"dateTime\", dayStart);\n query.whereLessThan(\"dateTime\", dayEnd);\n query.include(\"user\");\n query.orderByAscending(\"title\");\n query.setLimit(MAX_EVENT_SEARCH_RESULTS);\n\n return query;\n }\n };\n\n /* Set up list adapter using the factory of friends */\n mEvents = new ParseQueryAdapter<Event>(getActivity(), factory) {\n @Override\n public View getItemView(final Event event, View view, ViewGroup parent) {\n\n if (view == null) {\n view = view.inflate(getActivity(), R.layout.plan_event_list_item, null);\n }\n\n TextView title = (TextView) view.findViewById(R.id.title);\n TextView time = (TextView) view.findViewById(R.id.time);\n TextView creator = (TextView) view.findViewById(R.id.creator);\n\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"K:mm aa\", Locale.US);\n\n title.setText(event.getTitle());\n time.setText(timeFormat.format(event.getDateTime()));\n creator.setText(event.getUser().getString(\"name\"));\n\n view.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (user.getBoolean(\"athlete\")) {\n event.pinInBackground(Statics.PIN_EVENT_DETAILS, new SaveCallback() {\n @Override\n public void done(ParseException e) {\n Intent intent = new Intent(getActivity(), EventDetails.class);\n startActivityForResult(intent, Statics.INTENT_REQUEST_EVENT_DETAILS);\n }\n });\n } else {\n Toast.makeText(getActivity(), \"Upgrade to 'Athlete' to view event details\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n view.setOnLongClickListener(new View.OnLongClickListener() {\n @Override\n public boolean onLongClick(View v) {\n if (event.getUser().getObjectId().equals(user.getObjectId())) {\n\n HashMap<String, String> params = new HashMap<String, String>();\n params.put(Statics.PUSH_ACTION_UNSUBSCRIBE, Statics.PUSH_CHANNEL_ID + event.getObjectId());\n\n String json = getJSONString(params);\n JSONObject j = null;\n try {\n j = new JSONObject(json);\n } catch (JSONException e1) {\n e1.printStackTrace();\n }\n\n ParseQuery query = ParseInstallation.getQuery();\n query.whereEqualTo(\"channels\", event.getObjectId());\n\n ParsePush push = new ParsePush();\n push.setData(j);\n push.setQuery(query);\n push.sendInBackground();\n\n Toast.makeText(getActivity(), \"Deleting Event\", Toast.LENGTH_SHORT).show();\n event.deleteInBackground(new DeleteCallback() {\n @Override\n public void done(ParseException e) {\n mEvents.loadObjects();\n }\n });\n return true;\n } else {\n return false;\n }\n }\n });\n\n return view;\n }\n };\n\n mListView.setAdapter(mEvents);\n }", "public\n void\n displayTransactions(Transaction trans)\n {\n getRegisterPanel().updateView(getFilter(), trans);\n }", "public void doBriefing() {\n // Get all class sessions\n List<Models.Session> sessions = em.createNativeQuery(\"select s.* from session s, classparticipant cpa, participant p where s.classid = cpa.classid and cpa.participantid = p.participantid and p.userid = ? and current_date = date(s.starttime) order by s.starttime asc\", Models.Session.class).setParameter(1, user.getUserid()).getResultList();\n\n // If no data\n if (sessions.isEmpty()) {\n replyChat(\"It seems that you're free today!\");\n }\n\n // To format dates\n DateTimeFormatter timeFmt = DateTimeFormat.forPattern(\"h:mm a'\");\n DateTimeFormatter dateFmt = DateTimeFormat.forPattern(\"MMM d', ' YYYY\");\n \n String output = addStats(new DateTime().toString(dateFmt), \"Currently \" + new DateTime().toString(timeFmt));\n\n output += addChat(\"Hey there! You have \" + sessions.size() + \" classes today\");\n\n // For each session\n for (Models.Session session : sessions) {\n\n Models.Class classroom = session.getClassid();\n\n String startTime = new DateTime(session.getStarttime()).toString(timeFmt);\n String endTime = new DateTime(session.getEndtime()).toString(timeFmt);\n\n String status = \"\";\n // If already started\n if (new DateTime().isAfter(new DateTime(session.getStarttime()))) {\n\n // If already ended\n if (new DateTime().isAfter(new DateTime(session.getEndtime()))) {\n status = \"PAST\";\n } // Havent ended\n else {\n status = \"ONGOING\";\n }\n } // Havent started\n else {\n status = \"UPCOMING\";\n }\n\n output += \"<div class='result display' onclick=\\\"window.location.href='SessionDetails?id=\" + classroom.getClassid() + \"&code=\" + session.getSessionid() + \"'\\\">\\n\"\n + \" <div class='top'>\\n\"\n + \" <img class='icon' src='https://www.flaticon.com/svg/static/icons/svg/717/717874.svg'>\\n\"\n + \" <div class='text'>\\n\"\n + \" <a class='type'>\" + status + \"</a>\\n\"\n + \" <a class='name'>\" + classroom.getClasstitle() + \"</a>\\n\"\n + \" <a class='subname'>\" + startTime + \" - \" + endTime + \"</a>\\n\"\n + \" </div>\\n\"\n + \" </div>\\n\"\n + \" </div>\";\n }\n\n servlet.putInJsp(\"result\", output);\n }", "public Page<Event> findAllProcessEventByUser(int processNumber , Long userId , Pageable pageable);", "@Transactional\n public static Result events(String accessToken) {\n AccessToken access = AccessTokens.access(accessToken);\n Result error = Access.checkAuthentication(access, Access.AuthenticationType.CONNECTED_USER);\n if (error != null) {\n \treturn error;\n }\n\n error = Access.hasPermissionOnUser(access, access.user, Access.UserAccessType.READ);\n if (error != null) {\n \treturn error;\n }\n \n List<EventUserRelation> eventUserRelations = EventUserRelation.find.where().eq(\"email\", access.user.email).findList();\n \n return ok(getEventsListNode(eventUserRelations, access));\n }", "private static void showsExtendAndQueryParameters() {\n\n\t\tQuery<BugReport> queryNoneAssigned = Ebean.createQuery(BugReport.class,\n\t\t\t\"assignedStatusCount\");\n\t\tqueryNoneAssigned.setParameter(\"status\", \"NEW\");\n\t\tqueryNoneAssigned.setParameter(\"count\", 0);\n\t\tqueryNoneAssigned.where().isNotNull(\"assigned.id\");\n\n\t\tList<BugReport> newBugsAssigned = queryNoneAssigned.findList();\n\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"\");\n\n\t\tfor (BugReport bugReport : newBugsAssigned) {\n\t\t\tInteger userId = bugReport.getAssigned().getId();\n\t\t\tint count = bugReport.getCount();\n\t\t\tString status = bugReport.getStatus().getCode();\n\n\t\t\tSystem.out.println(\" new bugs assigned: \" + count + \" to \" + userId + \" as \" + status);\n\t\t}\n\t}", "public List<TipoEvento> list(){\n\t\treturn this.tipoEventoRepository.findAll();\t\t\n\t}", "private void semiEagerLoad(final Event event) {\n event.getAuthor();\n event.getCustomer(); event.getCustomer().getUnit();\n event.getProcedure(); event.getProcedure().getUnit();\n if (null == event.getCustomer().getUnit()) {\n LOG.warning(\"BF#42, customer without unit, id=\" + event.getCustomer().getId());\n customerDao.reload(event.getCustomer());\n }\n if (null == event.getProcedure().getUnit()) {\n LOG.warning(\"BF#42, procedure without unit, id=\" + event.getProcedure().getId());\n procedureDao.reload(event.getProcedure());\n }\n final Object customerUnitId = event.getCustomer().getUnit().getId();\n final Object procUnitId = event.getProcedure().getUnit().getId();\n if (LOG.isLoggable(Level.FINE)) {\n LOG.fine(\"semiEagerLoad of event: customer.unit.id=\" + customerUnitId\n + \", procedure.unit.id=\" + procUnitId);\n }\n }", "public static Result showStats() {\n\t\tUser currentUser = SessionHelper.getCurrentUser(ctx());\n\t\tList<Blogger> bloggerList = Blogger.find.all();\n\t\tif(currentUser != null && currentUser.username.equals(\"blogger\")){\n\t\t\treturn ok(blog.render(bloggerList,currentUser));\n\t\t}\n\n\t\t// Null Catching\n\t\tif (currentUser == null) {\n\t\t\treturn redirect(routes.Application.index());\n\t\t}\n\t\t\n\t\tallProducts = ProductController.findProduct.where().eq(\"owner.username\", currentUser.username).findList();\n\t\t\n\t\tapplyTheStringViewForStats(currentUser);\n\t\n\t\treturn ok(statsproducts.render(currentUser, allProducts));\n\n\t}", "public void populateActivityfeed()\n {\n\n activityFeedArray.clear();\n\n /**\n //check how many events in the list\n DatabaseReference currentUserEventsRef = FirebaseDatabase.getInstance().getReference(\"Events\").child(currentFirebaseUser.getUid());\n currentUserEventsRef.addListenerForSingleValueEvent(new ValueEventListener()\n {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot)\n {\n Long countEvents = dataSnapshot.getChildrenCount();\n Toast.makeText(getActivity(), countEvents + \" events\", Toast.LENGTH_SHORT).show();\n\n if(countEvents<2)\n {\n Event header = new Event();\n header.isHeader = true;\n activityFeedArray.addFirst(header);\n activityFeedAdapter.notifyDataSetChanged();\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n **/\n\n DatabaseReference currentUserEventsRef = FirebaseDatabase.getInstance().getReference(\"Events\").child(currentFirebaseUser.getUid());\n Query limitToLast = currentUserEventsRef.limitToLast(Constants.getInstance().ACTIVITY_FEED_LIMIT);\n limitToLast.addChildEventListener(new ChildEventListener()\n {\n @Override\n public void onChildAdded(@NonNull DataSnapshot dataSnapshot, @Nullable String s)\n {\n Event event = dataSnapshot.getValue(Event.class);\n\n if(!activityFeedArray.contains(event) && !blockedEventsArray.contains(event.getnodeID()))\n {\n //if the Event doesnt already exist in the array - by comapring nodeID values\n activityFeedArray.addFirst(event);\n\n\n\n //load data for event\n loadEventComments(event.nodeID);\n loadEventLikes(event.nodeID);\n loadEventFightData(event.nodeID, event.createdById);\n\n //if the event has a photo, load the photo to memory\n if(!event.getPhotoPath().equals(\"\"))\n {\n loadActivityFeedImage(event.getPhotoPath(), event.getnodeID());\n }\n\n //load the event creators avatar to memory\n loadActivityFeedAvatars(event.nodeID, event.getCreatedById());\n activityFeedAdapter.notifyDataSetChanged();\n }\n else if(activityFeedArray.contains(event))\n {\n activityFeedAdapter.notifyDataSetChanged();\n }\n }\n\n @Override\n public void onChildChanged(@NonNull DataSnapshot dataSnapshot, @Nullable String s)\n {\n }\n\n @Override\n public void onChildRemoved(@NonNull DataSnapshot dataSnapshot)\n {\n }\n\n @Override\n public void onChildMoved(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n });\n\n //########### GET LIST OF USERS THE CURRENT USER IS FOLLOWS #############\n DatabaseReference followsRef = FirebaseDatabase.getInstance().getReference(\"Follows\").child(currentFirebaseUser.getUid()).child(\"Following\");\n followsRef.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(@NonNull DataSnapshot dataSnapshot, @Nullable String s)\n {\n Follow followedUser = dataSnapshot.getValue(Follow.class);\n addFollowedUserToActivityFeed(followedUser.getUserID());\n }\n\n @Override\n public void onChildChanged(@NonNull DataSnapshot dataSnapshot, @Nullable String s)\n {\n }\n\n @Override\n public void onChildRemoved(@NonNull DataSnapshot dataSnapshot)\n {\n }\n\n @Override\n public void onChildMoved(@NonNull DataSnapshot dataSnapshot, @Nullable String s)\n {\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n });\n\n }", "@Override\n protected void printAggregates() {\n printRetrieveStudyAggregates(queryInstancesAggregates, firstResponseAggregates,\n firstFrameAggregates, totalAggregates, transferRateAggregates, frameRateAggregates);\n }", "private String searchAllUserAccountSQL(){\n\t\tString sql = (\"SELECT username, type From user\");\n\t\tString addsql;\n\t\tif(!accountNameViewTextField.getText().equals(\"\")){\n\t\t\taddsql = \" WHERE username = \\'\" + accountNameViewTextField.getText() + \"\\'\";\n\t\t\tsql = sql + addsql;\n\t\t}\n\t\tSystem.out.println(sql);\n\t\treturn sql;\n\t}", "@Override\n public List<Object[]> getStatistics(String owner, StatisticsGroup group) {\n String groupHQL = this.groupToHQL(group);\n List<Object[]> list = (List<Object[]>) getHibernateTemplate().findByNamedParam(\"select count(*), \"\n + \"count(distinct ipAddress), \" + groupHQL + \" \"\n + \"from SearchEvent \"\n + \"where owner like :owner \"\n + \"group by col_2_0_\", \"owner\", owner);\n return list;\n }", "@Override\n public JSONObject viewFnInvoiceByManager(String username) {\n\n return in_invoicedao.viewInvoiceByManagerID(username);\n }", "private void printRecommendation(){\n\t\t\n\t\tSystem.out.println( \"\\n\\nRecommendations for you to save money......\");\n\t\t\n\t\tSystem.out.println( \"\\n\\n\\tBest restaurants ......\");\n\t\tfor(int i = 0 ; i < 3 ; i++){\n\t\t\tif(restaurantTransactions.size() > 0){\n\t\t\t\tSystem.out.println( \"\\t\\t\"+(i+1) +\".\"+ restaurantTransactions.pollFirst().getName());\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println( \"\\n\\tBest markets ......\");\n\t\tfor(int i = 0 ; i < 3 ; i++){\n\t\t\tif(marketTransactions.size() > 0){\n\t\t\t\tSystem.out.println( \"\\t\\t\"+(i+1) +\".\"+ marketTransactions.pollFirst().getName());\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println( \"\\n\\tBest housing options ......\");\n\t\tfor(int i = 0 ; i < 3 ; i++){\n\t\t\tif(stayTransactions.size() > 0){\n\t\t\t\tSystem.out.println( \"\\t\\t\"+(i+1) +\".\"+ stayTransactions.pollFirst().getName().substring(0,42));\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println( \"\\n\\tBest gas pump stations ......\");\n\t\tfor(int i = 0 ; i < 3 ; i++){\n\t\t\tif(gaspumpTransactions.size() > 0){\n\t\t\t\tSystem.out.println( \"\\t\\t\"+(i+1) +\".\"+ gaspumpTransactions.pollFirst().getName());\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\\nTIPS and Strategies for you to save more money........\");\n\t\t\n\t\tint counter = 1;\n\t\t\n\t\tfloat totalAmountTaxi = 0;\n\t\tint numTimesToMarket = 0;\n\t\tint numTimesToRestaurant = 0;\n\t\t\n\t\t\n\t\tfor(String transactionKey: userData.keySet()){\n\t\t\t\n\t\t\tif(userData.get(transactionKey).getCategory() == 'T'){\n\t\t\t\ttotalAmountTaxi += userData.get(transactionKey).getTotalAmountSpend();\n\t\t\t}\n\t\t\telse if(userData.get(transactionKey).getCategory() == 'M'){\n\t\t\t\tnumTimesToMarket += userData.get(transactionKey).getFrequency();\n\t\t\t}\n\t\t\telse if(userData.get(transactionKey).getCategory() == 'R'){\n\t\t\t\tnumTimesToRestaurant += userData.get(transactionKey).getFrequency();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(totalAmountTaxi > 1500){\n\t\t\tSystem.out.println( \"\\n\\t\" + counter++ +\".Plan to buy a vehicle.\"\n\t\t\t\t\t+ \"\\n\\n\\t It would be better if you buy a car for the time being\"\n\t\t\t\t\t+ \"\\n\\t as the average expense for taxis are more.\"\n\t\t\t\t\t+ \"Also once you are done with the trip you\\n\\t can sell it off.\");\n\t\t}\n\t\t\n\t\tif(totalAmountTaxi < 1500)\n\t\t{\t\tSystem.out.println( \"\\n\\t\" + counter++ +\".Prefer taxi over buying a car.\"\n\t\t\t\t\t+ \"\\n\\n\\t It would be better if you prefer taxi instead of buying a car\"\n\t\t\t\t\t+ \"\\n\\t as the average expense for travel are comparitively less.\");\n\t\t}\n\t\t\n\t\tif(numTimesToMarket > 48){\n\t\t\tSystem.out.println( \"\\n\\t\" + counter++ +\".Switch to online shopping.\"\n\t\t\t\t\t+ \"\\n\\n\\t It would be better if you prefer online shopping \"\n\t\t\t\t\t+ \"instead of going market\\n\\t which saves time also for you\");\n\t\t}\n\t\t\n\t if(numTimesToRestaurant > 300){\n\t\t System.out.println( \"\\n\\t\" + counter++ +\".Prefer cooking instead going restaurants.\"\n\t\t\t\t\t+ \"\\n\\n\\t It would be better if you prefer cooking \"\n\t\t\t\t\t+ \"instead of going resturants / pubs\\n\\t which saves more money for you\");\n\t\t\n\t }\n\t \n\t System.out.println(\"\\n\\n\\nGenerating file \\\"Report_Unknown_Transactions.txt\\\" \"\n\t \t\t+ \"for unknown transactions .... Please check....\");\n\t \n\t try{\n\t \tPrintWriter writer = new PrintWriter(\"Report_Unknown_Transactions.txt\", \"UTF-8\");\n\n\t \t writer.println(\"\\n\\nList of the unknown transactions .. \\n\\n\");\n\t\t for(TransactionData unknownData :unknownTransactions ){\n\t\t\t\twriter.println(unknownData.getName());\n\t\t\t}\n\t\t writer.println(\"\\n\\nPlease check README/TransactionDataInfokey.txt to know how can you\"+\n\t\t \t\t\t\" help me to identify the unknown transactions .. \");\n\t\t writer.close();\n\t }\n\t catch(Exception e){\n\t \tSystem.out.println(\"Unable to create the report . Please check permission \"\n\t \t\t\t+ \"or ensure disk space..\");\n\t }\n\t\t\n\t\t\n\t}", "public static Task<QuerySnapshot> getTripSummaries(String userId) {\n return FirebaseFirestore.getInstance()\n .collection(Const.USERS_COLLECTION)\n .document(userId)\n .collection(Const.USER_TRIPS_COLLECTION)\n .get();\n }", "private String searchAllViewerAccountSQL(){\n\t\tString sql = (\"SELECT username, type From viewer\");\n\t\tString addsql;\n\t\tif(!accountNameViewTextField.getText().equals(\"\")){\n\t\t\taddsql = \" WHERE username = \\'\" + accountNameViewTextField.getText() + \"\\'\";\n\t\t\tsql = sql + addsql;\n\t\t}\n\t\tSystem.out.println(sql);\n\t\treturn sql;\n\t}", "int maxReturnEventsForQuery();", "@Override\n\tpublic List<UserGoodsView> getUserGoodsView(String username) throws Exception {\n\t\tString hql = \"from UserGoodsView us where us.userAct=\"+username;\n\t\t//hql = hql + \" order by s.id desc\";\n\t\tQuery query = getHibernateTemplate().getSessionFactory()\n\t\t\t\t.getCurrentSession().createQuery(hql);\n\t\tList<UserGoodsView> list = query.list();\n\t\treturn list;\n\t}", "private boolean isUserVisibleEvent(int eventType) {\n return eventType != UsageEvents.Event.SYSTEM_INTERACTION\n && eventType != UsageEvents.Event.STANDBY_BUCKET_CHANGED;\n }", "@Override\n\tpublic ArrayList<EventSignUp> showAllEventsUsersDAO()\n\t\t\tthrows ClassNotFoundException, SQLException, IOException {\n\t\treturn null;\n\t}", "ArrayList<Transaction> getFilteredTransactions(long startTimestamp,\n long endTimestamp, long accountNumber, boolean showExpense, boolean showIncome) {\n ArrayList<Transaction> filteredTransactionList = new ArrayList<>();\n int low = 0;\n int high = transactionList.size() - 1;\n if (startTimestamp != -1 && endTimestamp != -1) {\n /*\n If start and end time are set, then get the range of\n transaction corresponding to the time range.\n */\n Points p = getTransactions(startTimestamp, endTimestamp);\n if (p.x == -1 && p.y == -1)\n return filteredTransactionList;\n low = p.x;\n high = p.y;\n }\n for (int i = low; i <= high; i++) {\n if (accountNumber != -1 && transactionList.get(i).transactionAccountNumber != accountNumber)\n continue;\n if (!showExpense && (transactionList.get(i).transactionType == 0 || transactionList.get(i).transactionType == 2))\n continue;\n if (!showIncome && (transactionList.get(i).transactionType == 1 || transactionList.get(i).transactionType == 3))\n continue;\n filteredTransactionList.add(transactionList.get(i));\n }\n return filteredTransactionList;\n }", "public List<Events> getAllEventsAndHistoryForUser(long userId);", "@Override\n public List<Object[]> getStatistics(String owner, StatisticsGroup group, String from, String to) {\n String date = parseDateLimit(from, to);\n String groupHQL = this.groupToHQL(group);\n List<Object[]> list = (List<Object[]>) getHibernateTemplate().findByNamedParam(\"select count(*), \"\n + \"count(distinct ipAddress), \" + groupHQL + \" \"\n + \"from SearchEvent \"\n + \"where owner like :owner \"\n + date + \" \"\n + \"group by col_2_0_\", \"owner\", owner);\n return list;\n }", "public void displayEvents() {\n List<EventModel> day1List=new ArrayList<>();\n List<EventModel> day2List=new ArrayList<>();\n List<EventModel> day3List=new ArrayList<>();\n List<EventModel> day4List=new ArrayList<>();\n\n// noEventsPreRevels = findViewById(R.id.cat_pre_revels_no_events);\n noEventsDay1 = findViewById(R.id.cat_day_1_no_events);\n noEventsDay2 = findViewById(R.id.cat_day_2_no_events);\n noEventsDay3 = findViewById(R.id.cat_day_3_no_events);\n noEventsDay4 = findViewById(R.id.cat_day_4_no_events);\n\n if (mDatabase == null)\n return;\n\n RealmResults<ScheduleModel> scheduleResultsRealm = mDatabase.where(ScheduleModel.class).equalTo(\"catId\", cat_id).findAll().sort(\"startTime\");\n scheduleResults = mDatabase.copyFromRealm(scheduleResultsRealm);\n for (ScheduleModel schedule : scheduleResults) {\n// if (schedule.getIsRevels().contains(\"0\")) {\n// Log.d(TAG, \"displayEvents: PreRevels\");\n// EventDetailsModel eventDetails = mDatabase.where(EventDetailsModel.class).equalTo(\"eventID\", schedule.getEventID()).findFirst();\n// EventModel event = new EventModel(eventDetails, schedule);\n// preRevelsList.add(event);\n// } else {\n\n Log.d(TAG, schedule.toString());\n EventDetailsModel eventDetails = mDatabase.where(EventDetailsModel.class).equalTo(\"eventId\", schedule.getEventId()).findFirst();\n EventModel event = new EventModel(eventDetails, schedule);\n switch (event.getDay()) {\n case \"1\":\n day1List.add(event);\n break;\n case \"2\":\n day2List.add(event);\n break;\n case \"3\":\n day3List.add(event);\n break;\n case \"4\":\n day4List.add(event);\n break;\n }\n// }\n }\n// preRevelsEventSort(preRevelsList);\n eventSort(day1List);\n eventSort(day2List);\n eventSort(day3List);\n eventSort(day4List);\n\n// RecyclerView recyclerViewDayPreRevels = findViewById(R.id.category_pre_revels_recycler_view);\n// if (preRevelsList.isEmpty()) {\n// noEventsPreRevels.setVisibility(View.VISIBLE);\n// recyclerViewDayPreRevels.setVisibility(View.GONE);\n// } else {\n// recyclerViewDayPreRevels.setAdapter(new CategoryEventsAdapter(preRevelsList, this, getBaseContext(), false));\n// recyclerViewDayPreRevels.setNestedScrollingEnabled(false);\n// recyclerViewDayPreRevels.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));\n// }\n\n RecyclerView recyclerViewDay1 = findViewById(R.id.category_day_1_recycler_view);\n if(day1List.isEmpty()){\n noEventsDay1.setVisibility(View.VISIBLE);\n recyclerViewDay1.setVisibility(View.GONE);\n }\n else{\n recyclerViewDay1.setAdapter(new CategoryEventsAdapter(day1List, this, getBaseContext(), true, this));\n recyclerViewDay1.setNestedScrollingEnabled(false);\n recyclerViewDay1.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));\n }\n\n RecyclerView recyclerViewDay2 = findViewById(R.id.category_day_2_recycler_view);\n if(day2List.isEmpty()){\n noEventsDay2.setVisibility(View.VISIBLE);\n recyclerViewDay2.setVisibility(View.GONE);\n }\n else{\n recyclerViewDay2.setAdapter(new CategoryEventsAdapter(day2List, this, getBaseContext(), true, this));\n recyclerViewDay2.setNestedScrollingEnabled(false);\n recyclerViewDay2.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));\n }\n\n RecyclerView recyclerViewDay3 = findViewById(R.id.category_day_3_recycler_view);\n if(day3List.isEmpty()){\n noEventsDay3.setVisibility(View.VISIBLE);\n recyclerViewDay3.setVisibility(View.GONE);\n }\n else {\n recyclerViewDay3.setAdapter(new CategoryEventsAdapter(day3List, this, getBaseContext(), true, this));\n recyclerViewDay3.setNestedScrollingEnabled(false);\n recyclerViewDay3.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));\n }\n\n RecyclerView recyclerViewDay4 = findViewById(R.id.category_day_4_recycler_view);\n if(day4List.isEmpty()){\n noEventsDay4.setVisibility(View.VISIBLE);\n recyclerViewDay4.setVisibility(View.GONE);\n }\n else {\n recyclerViewDay4.setAdapter(new CategoryEventsAdapter(day4List, this, getBaseContext(), true, this));\n recyclerViewDay4.setNestedScrollingEnabled(false);\n recyclerViewDay4.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));\n }\n }", "public static int showFoods(String cuisin, String type){\r\n int check=0;\r\n for(int i=0;i<foods.size();i++){\r\n if(foods.get(i).getCousin().toLowerCase().equals(cuisin.toLowerCase())\r\n && foods.get(i).getType().toLowerCase().equals(type)){\r\n System.out.println(i+\".-\"+foods.get(i).getName()+\" --> \"+foods.get(i).getDescription()+\" --> \"+foods.get(i).getPrice());\r\n check=1;\r\n }\r\n }\r\n if(check==0)\r\n System.out.println(\"There are not food in this category\");\r\n return check;\r\n }", "public int findTotalEvents() throws DAOException;", "int getUserTypesCount();", "public long countLotsByEntityType(String type) throws MiddlewareQueryException;", "@Path(\"/showAll\")\n\t@GET\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic List<EventData> getAllEvent() throws JSONException {\n\t\tString today_frm = DateUtil.getNow(DateUtil.SHORT_FORMAT_TYPE);\n\t\tList<Event> list = eventService.getEventsByType(today_frm,\n\t\t\t\tEventType.EVENTTODAY);\n\t\tList<EventData> d = null;\n\t\tif (null != list && list.size() > 0) {\n\t\t\td = getEventsByDateList(list);\n\t\t} else {\n\t\t\td = new ArrayList<EventData>();\n\t\t}\n\t\treturn d;\n\t}", "public static void showAllHouseNotDuplicate(){\n showAllNameNotDuplicate(FuncGeneric.EntityType.HOUSE);\n }", "@Repository\npublic interface EventHistoryRepository extends JpaRepository<EventHistory, Long>, JpaSpecificationExecutor<EventHistory> {\n\n @Query(\"select eventHistory from EventHistory eventHistory where eventHistory.user.login = ?#{principal.username}\")\n List<EventHistory> findByUserIsCurrentUser();\n\n @Query(value = \"select distinct eventHistory from EventHistory eventHistory left join fetch eventHistory.openedUsers\",\n countQuery = \"select count(distinct eventHistory) from EventHistory eventHistory\")\n Page<EventHistory> findAllWithEagerRelationships(Pageable pageable);\n\n @Query(\"select distinct eventHistory from EventHistory eventHistory left join fetch eventHistory.openedUsers\")\n List<EventHistory> findAllWithEagerRelationships();\n\n @Query(\"select eventHistory from EventHistory eventHistory left join fetch eventHistory.openedUsers where eventHistory.id =:id\")\n Optional<EventHistory> findOneWithEagerRelationships(@Param(\"id\") Long id);\n}", "@RequestMapping(method = RequestMethod.GET)\n public ModelAndView start(\n @RequestParam final Map<String, String> queryParameters,\n\t\tfinal HttpServletRequest request\n ) {\n \n final Optional<ActiveUserEntity> activeUserEntity = this.getCurrentUser(request);\n if(!activeUserEntity.isPresent()){\n return this.buildInvalidSessionResponse();\n }\n \n\n final ModelAndView modelAndView =\n this.setErrorMessageFromQueryString(\n new ModelAndView(ViewNames.TRANSACTION_DETAIL.getViewName()),\n queryParameters);\n modelAndView.addObject( //TODO: Do we need the user to be elevated?\n ViewModelNames.IS_ELEVATED_USER.getValue(),\n this.isElevatedUser(activeUserEntity.get()));\n \n try {\n modelAndView.addObject(\n ViewModelNames.PRODUCTS.getValue(),\n this.productsQuery.execute());\n } catch (final Exception e) {\n modelAndView.addObject(\n ViewModelNames.ERROR_MESSAGE.getValue(),\n e.getMessage());\n modelAndView.addObject(\n ViewModelNames.PRODUCTS.getValue(),\n (new Product[0]));\n }\n final List<TransactionEntry> transactionEntries;\n long totalPrice = 0L;\n double totalQuantity = 0.0;\n try {\n transactionEntries = this.transactionEntriesQuery.execute();\n final List<TransactionEntry> actualTransactionEntries = new LinkedList<>();\n //all transactionentris with all 0 transactionIds are current transaction, this removes all others\n for (int i = 0; i < transactionEntries.size(); i++)\n {\n UUID defaultUUID = UUID.fromString(\"00000000-0000-0000-0000-000000000000\");\n //System.out.println(\"in the \" + i + \" loop\");\n if(defaultUUID.equals(transactionEntries.get(i).getTransactionId()))\n {\n //System.out.println(\"the \" + i + \" has the \" + transactionEntries.get(i).getTransactionId().toString() + \"yeet\");\n //System.out.println(\"removing \" + i + \" from the list\");\n actualTransactionEntries.add(transactionEntries.get(i));\n totalPrice += (transactionEntries.get(i).getPrice() * transactionEntries.get(i).getQuantity());\n totalQuantity += transactionEntries.get(i).getQuantity();\n }\n\n }\n modelAndView.addObject(\"totalPrice\", totalPrice);\n modelAndView.addObject(\"totalQuantity\", totalQuantity);\n modelAndView.addObject(\n ViewModelNames.TRANSACTION_ENTRIES.getValue(),\n actualTransactionEntries);\n } catch (final Exception e) {\n modelAndView.addObject(\n ViewModelNames.ERROR_MESSAGE.getValue(),\n e.getMessage());\n modelAndView.addObject(\n ViewModelNames.TRANSACTION_ENTRIES.getValue(),\n (new TransactionEntry[0]));\n }\n\n\n\n modelAndView.addObject(\n ViewModelNames.TRANSACTION.getValue(),\n (new Transaction()));\n \n return modelAndView;\n }", "public void onRowSelect(SelectEvent event) {\n StocTotal st = (StocTotal)event.getObject();\n debugMessage(\"Selectie: \"+ st.getNume());\n outputNume = st.getNume();\n outputCantFlacon = st.getCantFlacon();\n outputCod = st.getCod();\n outputProducator = st.getProducator();\n }", "@Override\r\n\t@Transactional\r\n\tpublic List<eventuales> findBytipoEventuales(int tipo) {\n\t\treturn dao.findBytipoEventuales(tipo);\r\n\t}", "List<DenialReasonDto> showAll();", "long getJoinedEventsCount();", "void parseEventList() {\n\t\tfor (int eventsId : events.keySet()) {\n\t\t\tfinal Event event = events.get(eventsId);\n\t\t\tif (users.get(event.getUser().getName()).isActiveStatus()\n\t\t\t\t\t&& !event.isViewed()\n\t\t\t\t\t&& event.getInnerSisdate().compareTo(\n\t\t\t\t\t\t\tnew GregorianCalendar()) >= 0) {\n\t\t\t\tevent.setViewed(true);\n\t\t\t\tfinal SimpleDateFormat fm = new SimpleDateFormat(\n\t\t\t\t\t\t\"dd.MM.yyyy-HH:mm:ss\");\n\t\t\t\tt.schedule(new TimerTask() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tif (event.isActive()) {\n\t\t\t\t\t\t\tgenerateEventMessage(\"User \"\n\t\t\t\t\t\t\t\t\t+ event.getUser().getName()\n\t\t\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t\t\t+ fm.format(event.getInnerSisdate()\n\t\t\t\t\t\t\t\t\t\t\t.getTime()) + \" \" + event.getText());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, event.getInnerSisdate().getTime());\n\n\t\t\t}\n\t\t}\n\n\t}" ]
[ "0.5094317", "0.5069046", "0.5019887", "0.49420005", "0.48263052", "0.4746721", "0.47335175", "0.47171542", "0.46969768", "0.4692665", "0.46880808", "0.4638181", "0.4608274", "0.45968094", "0.45750904", "0.45503977", "0.45492795", "0.45409834", "0.45383558", "0.44947818", "0.4454832", "0.44498387", "0.44426426", "0.44289503", "0.44286153", "0.44285634", "0.4415509", "0.43979004", "0.43948337", "0.43938357", "0.43907788", "0.43877286", "0.43841922", "0.43790153", "0.4377657", "0.43767864", "0.43716756", "0.4371083", "0.43640608", "0.4361325", "0.43537745", "0.43494684", "0.43445563", "0.4342899", "0.43245602", "0.43107352", "0.43094262", "0.43025243", "0.42980936", "0.4289648", "0.42806688", "0.42728746", "0.4260942", "0.42607728", "0.42600256", "0.42576903", "0.42567456", "0.42549327", "0.42525086", "0.42489824", "0.4247553", "0.42413", "0.42398164", "0.42388433", "0.42367396", "0.4236392", "0.42273468", "0.4226775", "0.4223339", "0.4219526", "0.42105654", "0.42020705", "0.4201363", "0.41995788", "0.4198265", "0.41949713", "0.4192853", "0.4183242", "0.41830873", "0.4179229", "0.41789952", "0.41786438", "0.4172813", "0.41713396", "0.4170878", "0.4169734", "0.41668293", "0.4164922", "0.4164525", "0.41625604", "0.41598713", "0.41587788", "0.41581646", "0.41537777", "0.4152695", "0.41517308", "0.41492304", "0.41461927", "0.41461745", "0.4144673" ]
0.57660776
0
/ Shows the rules which have been triggered throughout the execution of the system...
public static void analyzeRuleComponentsQueries() throws SQLException { Statement stat = conn.createStatement(); ResultSet result = stat.executeQuery("SELECT * FROM fraud.afm_fraudscorerecord_afm_rulecomponentrecord"); while (result.next()) { String queryId = result.getString("afm_fraudscorerecord_recordId"); String ruleId = result.getString("ruleComponentRecords_componentId"); Statement stat2 = conn.createStatement(); ResultSet s = stat2.executeQuery("SELECT * FROM fraud.afm_fraudscorerecord where recordId='"+queryId+"';"); while (s.next()) { System.out.print(new Date(s.getInt("timestamp"))); System.out.print(" UserID: " +s.getString("userId")); System.out.print(" Query Type: " + s.getString("queryType")); //System.out.print(" Amount: " + s.getDouble("transactionAmount")); } ResultSet t = stat2.executeQuery("SELECT * FROM fraud.afm_rulecomponentrecord where componentId='"+ruleId+"';"); while (t.next()) { System.out.print(" >>>>> Rule Name: " + t.getString("ruleLongName")); //System.out.print(" Amount: " + s.getDouble("transactionAmount")); } System.out.println(); } stat.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getRules();", "public void showRules() {\r\n data.rulesFlag = true;\r\n setChanged();\r\n notifyObservers(data);\r\n data.rulesFlag = false;\r\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 }", "String rulesAsText();", "public String getRules() { \n\t\treturn getRulesElement().getValue();\n\t}", "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 }", "@Override\n public List getRules() {\n return rules;\n }", "public static void printRules(Rule[] rules) {\n System.out.println(\"\\nRulebase generated\\n------------------\");\n int i =1;\n for (Rule rule : rules) {\n String cond = \"\";\n for (int j = 0; j < rule.cond.length; j++) {\n cond = cond + rule.cond[j];\n }\n String output = rule.output;\n System.out.println(\"Rule\" + i + \" : \" + cond + \" = \" + output);\n i++;\n }\n System.out.println(\"\\n\");\n }", "List<RuleInfo> listRulesInfo() throws IOException;", "public ArrayList<String> getRules() {\n return rules;\n }", "public Rules getRules()\r\n {\r\n return rules;\r\n }", "public abstract List<NARule> getRules(Context context);", "int getRulesCount();", "public abstract List<EventRule> getEventRulesOfSentence();", "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 boolean has_unprocessed_rules();", "public void displayRules(TextArea textArea) {\r\n textArea.appendText(\"\\n\" + name + \" Rule Base: \" + \"\\n\");\r\n Enumeration enum2 = ruleList.elements() ;\r\n while(enum2.hasMoreElements()) {\r\n Rule temp = (Rule)enum2.nextElement() ;\r\n temp.display(textArea) ;\r\n }\r\n }", "public static int getRulesPassed(){\r\n\t\treturn rulesPassed;\r\n\t}", "public List<Rule> getRules() {\r\n\t\treturn rules;\r\n\t}", "private void actOnRules() {\r\n\r\n\t\tfor(String key: myRuleBook.keySet())\r\n\t\t{\r\n\r\n\t\t\tRule rule = myRuleBook.get(key);\r\n\t\t\tSpriteGroup[] obedients = myRuleMap.get(rule);\r\n\r\n\t\t\tif(rule.isSatisfied(obedients))\r\n\t\t\t{\r\n\t\t\t\trule.enforce(obedients);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "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_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 }", "public void processAlertsForActiveRules() throws Exception;", "public HashMap<String,Rule> get_rules_to_action() throws Exception;", "java.lang.String getRule();", "@RequestMapping(\"/showRules\")\n\tpublic ModelAndView showRules() {\n\t\treturn new ModelAndView(\"displayRules\");\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn this.ruleController.toString();\n\t}", "public String toString(){\r\n\t\treturn \"This email passes \"+rulesPassed+\" rules\";\r\n\t}", "List<? extends Rule> getRules();", "public int getNumberOfRules() {\n\t\treturn this.patternActionRules.size();\n\t}", "public String toString() {\n return this.grammarRules.keySet() + \"\";\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 }", "public void showRuleDescription() {\n PopUpAlerts.ruleDescription(gOL.getRuleName(), gOL.getRuleString(), gOL.getRuleDescription());\n }", "@Override\n public List<Rule> getTotalRules() {\n return List.of(getTotalGreaterThan60Rule());\n }", "public java.lang.String GetRules() throws IOException {\r\n java.lang.String RulesString = new java.lang.String();\r\n Scanner scanner = new Scanner(new FileInputStream(RulesFile), \"UTF-8\");\r\n while (scanner.hasNextLine()) {\r\n RulesString = RulesString + scanner.nextLine() + \"\\n\";\r\n }\r\n return RulesString;\r\n }", "int getDetectionRulesCount();", "public static void main(String[] args)\n {\n /*\n * Create a new loader with default factory.\n * \n * A factory will create all rule components when loader requires them\n * Default engine is used that creates all the default constructs in:\n * org.achacha.rules.compare\n * org.achacha.rules.condition\n * org.achacha.rules.action\n * \n * RulesEngineFactoryExtension can be used to extend a default factory while keeping existing constructs\n * for basic rules the default factory provides a wide variety of comparators and action elements\n * \n * The loader uses the factory to resolve where the rule parts are loaded from\n * There are several load types (file system, in-memory string, in-memory XML)\n * Here we will configure a simple in-memory string based loader and add the\n * conditions and actions from constants\n */\n RulesEngineLoaderImplMappedString loader = new RulesEngineLoaderImplMappedString(new RulesEngineFactory());\n \n // Add a simple rule and call it 'alwaysTrue', we will execute this rule using this name\n loader.addRule(\"alwaysTrue\", SIMPLE_RULE);\n \n /*\n * Create a rules engine that uses the loader and factory we just created\n * Normally these 3 objects would be someone retained so we don't have to re-parse the rules every execution\n * However this is a tutorial example\n */\n RulesEngine engine = new RulesEngine(loader);\n \n /////////////////////////// Everything above is initialization ///////////////////////////////////////\n \n /////////////////////////// Everything below is rule execution ///////////////////////////////////////\n /*\n * Now we need to have some input for the rule to process but since were are using constants in comparison we can just pass\n * an empty input model\n * \n * We use dom4j XML Element for input\n * \n * <request>\n * <input />\n * </request>\n */\n Element request = DocumentHelper.createElement(\"request\");\n request.addElement(\"input\");\n \n /*\n * RuleContext is an object that holds the input, output, event log, etc for a given rule execution\n * The engine can create a new context for us if we specify the input for the rule\n */\n RuleContext ruleContext = engine.createContext(request);\n \n /*\n * Now that we have set up our context we can execute the rule\n * Since we used addRule above and called this rule 'alwaysTrue', this is how we invoke this rule\n * \n * NOTE:\n * you can run multiple rules sequentially against the same context\n * some actions can modify input context and some conditions can check output context\n * so rules can depend on other rules\n */\n engine.execute(ruleContext, \"alwaysTrue\");\n \n /*\n * Display the output model\n * \n * Since the action we used is:\n * \n * <Action Operator='OutputValueSet'>\"\n * <Path>/result</Path>\"\n * <Value Source='Constant'><Data>yes</Data></Value>\"\n * </Action>\"\n * \n * We get the following output model:\n * <output><result>yes</result></output>\n * \n * NOTE: The path on the output action is always relative to the output element\n */\n System.out.println(\"Output Model\\n------------\");\n System.out.println(ruleContext.getOutputModel().asXML());\n }", "@Override\r\n\tpublic void rule1() {\n\t\tSystem.out.println(\"인터페이스 ISports1메소드 --> rule()\");\r\n\t}", "@Override\r\npublic void initRules(){\r\n\t\r\n}", "private void getTimeConditions(List<RuleInstance> rules,Set<Condition> conds)\n{\n for (RuleInstance ri : rules) {\n getTimeConditions(ri,rules,conds);\n }\n}", "public void readRules( String filename ) {\r\n\t\ttry {\r\n\t\t\ts.readRules(filename);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public List<String> getRulesName(){\r\n\t\tList<String> names = new ArrayList<String>();\r\n\r\n\t\tfor(Column c: columns)\r\n\t\t\tnames.add(c.getRuleName());\r\n\r\n\t\treturn names;\r\n\t}", "public String getRule() {\r\n return rule;\r\n }", "public final RuleBaseFacility getRules()\n{\n\treturn _rules;\n}", "public List<RulesEngineRule> rules() {\n return this.innerProperties() == null ? null : this.innerProperties().rules();\n }", "List<T> getRuleTargets();", "public int parseRulesFile() {\n\t BufferedReader reader = null;\n\t List<String> allLines = new ArrayList<String>();\n\t List<String> allLinesWithLintChecks = new ArrayList<String>();\n\t listOfRules = new ArrayList<String>();\n\t boolean eof = false;\n\t try {\n\t reader = new BufferedReader(new FileReader(pathTextFile));\n\t while (!eof) {\n\t String line = reader.readLine();\n\n\t if (line != null) {\n\t allLines.add(line);\n\t } else {\n\t eof = true;\n\t }\n\t }\n\n\t for (String line : allLines) {\n\t if (line.contains(\":\") && line.contains(\"\\\"\")) {\n\t allLinesWithLintChecks.add(line);\n\t }\n\t }\n\n\t for (String rule : allLinesWithLintChecks) {\n\t int position = rule.indexOf(\":\");\n\t listOfRules.add(rule.substring(1, position - 1));\n\t }\n\t } catch (FileNotFoundException ex) {\n\t System.err.println(\"File not found!\");\n\t ex.printStackTrace();\n\t } catch (IOException ex) {\n\t System.err.println(\"Error!!\");\n\t ex.printStackTrace();\n\t } finally {\n\t try {\n\t reader.close();\n\t } catch (IOException ex1) {\n\t System.out.println(\"Error when closing file !!\");\n\t }\n\t }\n\t return listOfRules.size();\n\t }", "private void applyTheRule() throws Exception {\n System.out.println();\n System.out.println();\n System.out.println();\n System.out.println(\"IM APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n System.out.println();\n if (parameter.rule.equals(\"1\")) {\n Rule1.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"2\")) {\n Rule2.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3\")) {\n Rule3.all(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3a\")) {\n Rule3.a(resultingModel);\n\n }\n\n if (parameter.rule.equals(\"3b\")) {\n Rule3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"3c\")) {\n Rule3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"4\")) {\n Rule4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"4a\")) {\n Rule4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"4b\")) {\n Rule4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"4c\")) {\n Rule4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r1\")) {\n Reverse1.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r2\")) {\n Reverse2.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3\")) {\n Reverse3.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3a\")) {\n Reverse3.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3b\")) {\n Reverse3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3c\")) {\n Reverse3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4\")) {\n Reverse4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4a\")) {\n Reverse4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4b\")) {\n Reverse4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4c\")) {\n Reverse4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"5\")){\n Rule5.apply(resultingModel);\n }\n\n System.out.println(\"IM DONE APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n\n this.resultingModel.addRule(parameter);\n //System.out.println(this.resultingModel.name);\n this.resultingModel.addOutputInPath();\n }", "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 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 setRules(ArrayList<Rule> rules) {\n\t\tthis.rules = rules;\n\t}", "public void actionPerformed( ActionEvent e){\n\t\treadFile();\n\t\t//displaying all possible conditions lists.\n\t\tdisplayConditions();\n\t\t//loading unique rules along with there all possible inputs in an array (only for string rules)\n\t\tfillDistinctRules();\n\t}", "public java.lang.String getRule() {\n return rule;\n }", "private void explore(RuleContext ctx) {\n if (ctx.getChildCount() != 1) {\n String ruleName = Python3Parser.ruleNames[ctx.getRuleIndex()];\n astRepresenation.append(ruleName);\n astRepresenation.append(\": \");\n astRepresenation.append(ctx.getText());\n astRepresenation.append(\"\\n\");\n }\n for (int i = 0; i < ctx.getChildCount(); i++) {\n ParseTree element = ctx.getChild(i);\n if (element instanceof RuleContext) {\n explore((RuleContext) element);\n }\n }\n }", "public List<DecisionCoverage> getRuleCoverages() {\r\n\t\tif ((executionTrace != null) && (ruleCoverages == null)) {\r\n\t\t\tcomputeRuleCountTuples();\r\n\t\t}\r\n\t\treturn ruleCoverages;\r\n\t}", "public String getRulesRep(){\r\n return RulesRep;\r\n }", "public void deduceRules()\n{\n List<RuleInstance> allrules = loadRules();\n\n List<UpodRule> rules = new ArrayList<UpodRule>();\n for (UpodRule ur : for_program.getRules()) {\n if (ur.isExplicit()) {\n\t rules.add(ur);\n\t RuleInstance ri = new RuleInstance(ur,from_world.getUniverse());\n\t allrules.add(ri);\n }\n }\n\n Set<Condition> allconds = getConditions(allrules);\n\n tree_root = new TreeNode(allrules,null);\n\n expandTree(tree_root,allconds);\n\n generateRules(tree_root);\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 }", "private static String numberOfViolatedRulesIn(GitHubProject project) {\n Optional<RatingValue> ratingValue = project.ratingValue();\n if (!ratingValue.isPresent()) {\n return \"UNKNOWN\";\n }\n\n int n = findViolatedRulesIn(ratingValue.get().scoreValue().usedValues()).size();\n\n if (n == 0) {\n return \"No violated rules\";\n }\n\n return String.format(\"%d violated rule%s\", n, n > 1 ? \"s\" : \"\");\n }", "public Result index() {\n \t\n \treturn ok(\"rules are running... check the console\");\n \t//views.html.index.render()\n }", "private void test() throws DroolsParserException, IOException {\n\t\tRuleBase ruleBase = initialiseDrools();\n\t\tWorkingMemory workingMemory = initializeMessageObjects(ruleBase);\n\t\tint expectedNumberOfRulesFired = 1;\n\n\t\tint actualNumberOfRulesFired = workingMemory.fireAllRules();\n\t}", "private static void ExplainRules() {\n System.out.printf(\"\\n %sWELCOME TO BOMB BLAST%s!!!!!!!!!!!!\\n\\n \", Styling.ANSI_BLUE, Styling.ANSI_RESET);\r\n System.out.printf(\"- Your object is to survive as long as possible, and accumlate the most points.\\n- You accumulate points by not triggering the bomb and therefore surviving the round.\\nWhere is the bomb? Within a random box\\n- All boxes are empty apart from ONE\\n- If you select the bomb ridden box you will receive NO POINTS!\\nAnd the survivors will receive points based on how long it took the group to find the bomb\\n- After a selected amount of rounds whoever has survived the most amount of attempts wins!!\\n\\n\");\r\n AnyKey.pressAnyKeyToContinue();\r\n }", "@Override\r\n public String toString() {\r\n return this.bnfRuleMap.keySet().toString();\r\n }", "public String[] getRuleSetDisplayNames()\n/* */ {\n/* 1015 */ return getRuleSetDisplayNames(ULocale.getDefault(ULocale.Category.DISPLAY));\n/* */ }", "@Override\n public void enterEveryRule(ParserRuleContext ctx) {\n\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(Rule4(\"realize\"));\r\n\t\t\r\n\t\tSystem.out.println(ConsonantFrequency(\"re\"));\r\n\t \r\n\r\n\t\t \r\n\r\n\t}", "public void analize() {\n\t\t//clearing dropping rules\n\t\tthis.droppingRules.clear();\n\t\t//analysing new rules\n\t\tanalizeParts();\n\t}", "public static boolean logRuleExecution(String ruleName){\n MDC.put(\"EVENTTYPE\",\"RULEEXECUTION\");\n logger.info(ruleName);\n return true;\n }", "@Override\n\t\t\tpublic void fireAllRules() {\n\t\t\t\tthrow new IllegalStateException(\"Not implemented yet\");\n\t\t\t}", "public Set<ExecutedRuleInfo> getExecutedFilteringRuleInfo() {\n return executedFilteringRuleInfoList;\n }", "public String getRule() {\n\t\treturn this.rule;\n\t}", "public void start() {\r\n\t\tDatabaseHandler db = new DatabaseHandler(context);\r\n\t\trules = db.getAllRulesByType(type);\r\n\t\tdb.close();\r\n\t\tString sequence = \"\";\r\n\t\tfor (Rule r : rules) {\r\n\t\t\tif (r.getActive() == true) {\r\n\t\t\t\tsequence = r.getTreeData();\r\n\t\t\t\tCauseChecker c = new CauseChecker();\r\n\t\t\t\tc.execute(sequence, \"\" + r.getID());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public int getReferentialActionUpdateRule();", "private String toRules(){\n\n if (numInstances() == 0)\n\treturn \"No Rules (Empty Exemplar)\";\n\n String s = \"\", sep = \"\";\n\t\n for(int i = 0; i < numAttributes(); i++){\n\t \n\tif(i == classIndex())\n\t continue;\n\t \n\tif(attribute(i).isNumeric()){\n\t if(m_MaxBorder[i] != m_MinBorder[i]){\n\t s += sep + m_MinBorder[i] + \"<=\" + attribute(i).name() + \"<=\" + m_MaxBorder[i];\n\t } else {\n\t s += sep + attribute(i).name() + \"=\" + m_MaxBorder[i];\n\t }\n\t sep = \" ^ \";\n\t \n\t} else {\n\t s += sep + attribute(i).name() + \" in {\";\n\t String virg = \"\";\n\t for(int j = 0; j < attribute(i).numValues() + 1; j++){\n\t if(m_Range[i][j]){\n\t s+= virg;\n\t if(j == attribute(i).numValues())\n\t\ts += \"?\";\n\t else\n\t\ts += attribute(i).value(j);\n\t virg = \",\";\n\t }\n\t }\n\t s+=\"}\";\n\t sep = \" ^ \";\n\t}\t \n }\n s += \" (\"+numInstances() +\")\";\n return s;\n }", "public boolean checkRules() {\n for (Rule rule: rules) {\n if (! rule.checkRegel(board)) { //problem with a rule\n return false;\n }\n }\n return true;\n }", "java.util.List<com.appscode.api.kubernetes.v1beta2.Rule> \n getRulesList();", "private Rule honorRules(InstanceWaypoint context){\n \t\t\n \t\tStyle style = getStyle(context);\n \t\tRule[] rules = SLD.rules(style);\n \t\t\n \t\t//do rules exist?\n \t\t\n \t\tif(rules == null || rules.length == 0){\n \t\t\treturn null;\n \t\t}\n \t\t\n \t\t\n \t\t//sort the elserules at the end\n \t\tif(rules.length > 1){\n \t\t\trules = sortRules(rules);\n \t\t}\n \t\t\n \t\t//if rule exists\n \t\tInstanceReference ir = context.getValue();\n \t\tInstanceService is = (InstanceService) PlatformUI.getWorkbench().getService(InstanceService.class);\n \t\tInstance inst = is.getInstance(ir);\n \t\t\t\n \t\tfor (int i = 0; i < rules.length; i++){\n \t\t\t\n \t\t\tif(rules[i].getFilter() != null){\t\t\t\t\t\t\n \t\t\t\t\n \t\t\t\tif(rules[i].getFilter().evaluate(inst)){\n \t\t\t\t\treturn rules[i];\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t//if a rule exist without a filter and without being an else-filter,\n \t\t\t//the found rule applies to all types\n \t\t\telse{\n \t\t\t\tif(!rules[i].isElseFilter()){\n \t\t\t\t\treturn rules[i];\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t\t//if there is no appropriate rule, check if there is an else-rule\n \t\tfor (int i = 0; i < rules.length; i++){\n \t\t\tif(rules[i].isElseFilter()){\n \t\t\t\treturn rules[i];\n \t\t\t}\n \t\t}\n \t\t\n \t \n \t\t//return null if no rule was found\n \t\treturn null;\n \t\n \t}", "public int resultRules(Instance inst) {\n\n if (resultRule(inst) != -1) {\n\treturn m_classification;\n } else if (m_next != null) {\n\treturn m_next.resultRules(inst);\n } else {\n\treturn -1;\n }\n }", "private void displayConditions(){\n\n\t\tString[] possibleConditions = new String[countPossibleRoutes()];\n\t\tQuestionlistModel = new DefaultListModel();\n\t\t\n\t\tString currentRule = \"\";\n\t\tint currentRuleIndex;\n\t\tint possCondInd = 0;\n\t\t\n\t\tfor(int i=0;i<ConditionTree.length;i++){\n\t\t\tcurrentRule = ConditionTree[i][0];\n\t\t\tcurrentRuleIndex = i;\n\t\t\t \n\t\t\t// if current Rule is final rule\n\t\t\tif(ConditionTree[i][5].equals(\"Y\")){\n\t\t\t\t\n\t\t\t\tpossibleConditions[possCondInd] = String.valueOf(currentRuleIndex) + \",\";\n\t\t\t\t//loop until not founds the top rule\n\t\t\t\t//System.out.println(\"value of i: \" + possCondInd + \" \" + currentRule + \" index is:\" + currentRuleIndex);\n\t\t\t\twhile(!ConditionTree[currentRuleIndex][1].equals(\"-\")){\n\t\t\t\t\t//setting current rule to current parent rule\n\t\t\t\t\tcurrentRuleIndex = getRuleIndex(ConditionTree[currentRuleIndex][1]);\n\t\t\t\t\tcurrentRule = ConditionTree[currentRuleIndex][0];\n\t\t\t\t\tpossibleConditions[possCondInd] += String.valueOf(currentRuleIndex) + \",\";\n\t\t\t\t\t//System.out.println(\"value of i: \" + possCondInd + \" \" + currentRule + \" index is:\" + currentRuleIndex);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tpossibleConditions[possCondInd] = possibleConditions[possCondInd].substring(0, possibleConditions[possCondInd].length()-1);\n\t\t\t\t//System.out.println(possibleConditions[possCondInd]);\n\t\t\t\tpossCondInd++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//Displaying in human language\n\t\tfor(int k=0;k<possibleConditions.length;k++){\n\t\t\tString currRoute[] = possibleConditions[k].split(\",\");\n\n\t\t\tint curRutInd;\n\t\t\tint nxtRutInd;\n\t\t\tString str = \"if \";\n\t\t\tfor(int i=currRoute.length-1;i>0;i--){\n\t\t\t\tcurRutInd = Integer.parseInt(currRoute[i-1]);\n\t\t\t\tnxtRutInd = Integer.parseInt(currRoute[i]);\n\t\t\t\t\n\t\t\t\tfor(int a=0;a<ConditionTree.length;a++){\n\n\t\t\t\t\tif(ConditionTree[a][0].equals(ConditionTree[curRutInd][1]) && \n\t\t\t\t\t\t\tConditionTree[a][1].equals(ConditionTree[nxtRutInd][1])){\n\t\t\t\t\t\t//System.out.println(ConditionTree[curRutInd][1] + \" is \" + ConditionTree[curRutInd][2] + \" \" + ConditionTree[curRutInd][3]);\n\t\t\t\t\t\tQuestionlistModel.addElement(ConditionTree[curRutInd][1] + \" is \" + ConditionTree[curRutInd][2] + \" \" + ConditionTree[curRutInd][3]);\n\t\t\t\t\t\tif(ConditionTree[curRutInd][5].equals(\"Y\")){\n\t\t\t\t\t\t\t//System.out.println(ConditionTree[curRutInd][0]);\n\t\t\t\t\t\t\tQuestionlistModel.addElement(ConditionTree[curRutInd][0]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tQuestionlistModel.addElement(\"\\n\");\n\t\t}\n\t\tQuestionList.setModel(QuestionlistModel);\n\t}", "private void getSensorConditions(List<RuleInstance> rules,Set<Condition> conds)\n{\n for (int i = 0; i < rules.size(); ++i) {\n RuleInstance ri1 = rules.get(i);\n for (int j = i+1; j < rules.size(); ++j) {\n\t RuleInstance ri2 = rules.get(j);\n\t if (ri1.getStateId() == ri2.getStateId()) continue;\n\t addSensorConditions(ri1,ri2,conds);\n }\n }\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}", "@Override\n\tpublic void reportRuleInstantiation(Rule rule) {\n\t\t\n\t}", "Collection<RuleViolation> findViolations(\n File projectRoot,\n List<File> files,\n List<Rule> rule,\n CLIConfigForStaticAnalyzer cliOptions);", "private void installRulesOnFlow()\n\t{\t\t\t\n\t\tVertex sourceVertex = m_graph.getSourceVertex();\n\t\tshort vlanNum = 1;\n\t\tfor(Edge sourceOutEdge :sourceVertex.getOutgoingEdges())\n\t\t{\n\t\t\tif(sourceOutEdge.getFlow()>0)\n\t\t\t{\n\t\t\t\tattachIpAddressToVlan(vlanNum);\n\t\t\t\tinstallRule(sourceVertex.getName(), sourceOutEdge.getSourcePort(), vlanNum,RULE_TYPE.SOURCE_ADD_VLAN);\n\t\t\t\tinstallRule(sourceOutEdge.getTo().getName(), sourceOutEdge.getDestPort(), vlanNum,RULE_TYPE.DEST_IPV4);\n\t\t\t\tinstallRule(sourceVertex.getName(), sourceOutEdge.getSourcePort(), vlanNum,RULE_TYPE.SOURCE_ARP_ADD_VLAN);\n\t\t\t\tinstallRule(sourceOutEdge.getTo().getName(), sourceOutEdge.getDestPort(), vlanNum,RULE_TYPE.DEST_ARP);\n\t\t\t\tinstallRuleToHostSrc(sourceVertex.getName(),vlanNum, sourceOutEdge.getSourcePort());\n\t\t\t\tsourceOutEdge.setIsRuleInstalled();\n\t\t\t\tinstallRulesOnFlowDFS(sourceOutEdge.getTo(),vlanNum);\n\t\t\t\tvlanNum++;\n\t\t\t}\n\t\t}\t\n\t}", "public void chooseRulesClick(){\n String rules = (String)chooseRulesBox.getValue();\n try{\n gOL.setRuleString(rules);\n }catch (RulesFormatException rfee) {\n PopUpAlerts.ruleAlert2();\n }\n ruleLabel.setText(gOL.getRuleString().toUpperCase());\n }", "public RETEReasoner(List rules) {\n if (rules == null) throw new NullPointerException( \"null rules\" );\n this.rules = rules;\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 }", "public void setRules(List<T> rules) {\n\t\tthis.rules = rules;\n\t}", "private Set<Condition> getConditions(List<RuleInstance> rules)\n{\n Set<Condition> conds = new HashSet<Condition>();\n\n getTimeConditions(rules,conds);\n getSensorConditions(rules,conds);\n getCalendarConditions(rules,conds);\n\n return null;\n}", "public void rulesOnEnter() {\n try {\n String ruleString = ruleInputField.getText().toUpperCase();\n gOL.setRuleString(ruleString);\n ruleLabel.setText(gOL.getRuleString().toUpperCase());\n ruleInputField.setText(\"\");\n\n //Checks if the input matches any predefined rules. Clears the selection if not.\n if(!chooseRulesList.contains(gOL.getRuleName())){\n chooseRulesBox.getSelectionModel().clearSelection();\n }else{\n chooseRulesBox.getSelectionModel().select(gOL.getRuleName());\n }\n\n //Produces a warning if a RulesFormatException is thrown\n } catch (RulesFormatException rfe) {\n PopUpAlerts.ruleAlert2();\n }\n }", "public void displayConflictSet(Vector ruleSet) {\r\n textArea1.appendText(\"\\n\\n\" + \" -- Rules in conflict set:\\n\\n\");\r\n Enumeration enum2 = ruleSet.elements() ;\r\n while(enum2.hasMoreElements()) {\r\n Rule temp = (Rule)enum2.nextElement() ;\r\n textArea1.appendText(temp.name + \"(\" + temp.numAntecedents()+ \"), \" ) ;\r\n }\r\n }", "protected List<DumpRule> ruleList(){\n\t\tList<DumpRule> drList = new ArrayList<DumpRule>();\n\t\tString lineStrs = ruleText.getText();\n\t\ttry{\n\t\t\tString[] lines = lineStrs.split(\"\\n\");\n\t\t\tDumpRule currentDr = null;\n\t\t\tfor(int index=0,size=lines.length; index<size; index++){\n\t\t\t\tString line=lines[index];\n\t\t\t\tif(line.indexOf(TB_COL_SPlit)!=-1){\n\t\t\t\t\tcurrentDr = addTbColRule(line);\n\t\t\t\t\tdrList.add(currentDr);\n\t\t\t\t}else if(line.indexOf(RULE_COL_SPlit)!=-1){\n\t\t\t\t\tString[] kvs = line.split(RULE_COL_SPlit);\n\t\t\t\t\tif(kvs!=null && kvs.length==2){\n\t\t\t\t\t\tcurrentDr.addRule(kvs[0].trim(), kvs[1].trim());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(Exception e){\n\t\t\tapp.log(\"规则输入错误..\");\n\t\t}\n\t\treturn drList;\n\t}", "public interface FwRules {\r\n \r\n\tboolean generateQuery();\r\n\t\r\n IntrospectedTable getIntrospectedTable();\r\n}", "@Override\n\tprotected boolean rulesGeneration() {\n\t\tGlobal.logger.finer(\"--------------------- S101 rulesGeneration() ----------------- \");\n\t\t//Global.logger.finer(this.toString());\t\t\n\t\tif(activationGuards()){\n\t\t\ttry {\n\t\t\t\tthis.categories.beforeFirst();\n\t\t\t\t\n\t\t\t\twhile (!this.categories.isClosed() && this.categories.next()) {\n\t\t\t\t\tgroupName = this.categories.getString(\"name\");\n\t\t\t\t\tGlobal.logger.fine(\"Creating new S102 [\" + groupName + \", \" + 1 +\"] \");\n\t\t\t\t\tcreateRule(new S102(course_ID, groupName, 1));\n\t\t\t\t\t\n\t\t\t\t\tGlobal.logger.fine(\"Creating new S103 [\" + groupName + \", study ]\");\n\t\t\t\t\tcreateRule(new S103(course_ID, groupName, \"study\"));\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse \n\t\t\treturn false;\n\t\treturn true;\n\t}", "public List<RoutingRuleEmailVO> processActiveRulesForEmail() throws Exception;", "private void enterRules()\n {\n String ruleString = ruleTextField.getText();\n transition.buildRulesFromString(ruleString);\n ruleString = transition.buildStringFromRules();\n ruleTextField.setText(ruleString);\n optionsPanel.getWorkspacePanel().requestFocusInWindow();\n optionsPanel.getWorkspacePanel().repaint();\n // Daniel didn't like this automatic switching any more.\n // optionsPanel.getWorkspacePanel().setTool(LMWorkspacePanel.SELECT_TOOL);\n }", "String diagnosticsOutput();", "@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 }", "@Test\n public void testRuleDescription() throws Exception {\n\n HepProgramBuilder programBuilder = HepProgram.builder();\n programBuilder.addRuleByDescription( \"FilterToCalcRule\" );\n\n HepPlanner planner = new HepPlanner( programBuilder.build() );\n\n planner.addRule( FilterToCalcRule.INSTANCE );\n\n checkPlanning( planner, \"select name from sales.dept where deptno=12\" );\n }", "@Override\n public String toString() {\n return String.format(\"MyCustomRule[shouldIfail=%b]\", shouldIfail);\n }" ]
[ "0.69137365", "0.6854226", "0.68103844", "0.6386362", "0.62990683", "0.6234735", "0.62246704", "0.622462", "0.6114625", "0.6060409", "0.6040571", "0.60001534", "0.5946244", "0.59404534", "0.5919034", "0.59171116", "0.5882487", "0.58676034", "0.58373183", "0.57999796", "0.57796764", "0.56968135", "0.56899905", "0.5669767", "0.5663362", "0.5658611", "0.5657494", "0.56542253", "0.5649823", "0.564415", "0.56141967", "0.5595731", "0.554474", "0.5540881", "0.55275154", "0.55198294", "0.55154026", "0.5508594", "0.5499979", "0.548169", "0.54756373", "0.5465227", "0.54521567", "0.54218084", "0.5400391", "0.53675014", "0.5365605", "0.53548515", "0.5352766", "0.5350347", "0.5330527", "0.5312015", "0.53099304", "0.53008735", "0.529255", "0.5287406", "0.52825916", "0.52564585", "0.5256048", "0.5251919", "0.5238307", "0.52370465", "0.52252233", "0.522292", "0.5202849", "0.519938", "0.51962966", "0.5189211", "0.51637197", "0.51559114", "0.5149043", "0.51468647", "0.5134055", "0.5112148", "0.510483", "0.509794", "0.5097926", "0.50898176", "0.5080853", "0.50726223", "0.5063847", "0.5063373", "0.50488013", "0.50289714", "0.50228614", "0.502269", "0.50198346", "0.501689", "0.50148815", "0.5014495", "0.50044733", "0.4995499", "0.4992049", "0.49865857", "0.49758175", "0.49641865", "0.49535933", "0.49450284", "0.49365962", "0.49352857" ]
0.5177994
68
/ Shows the actions which have been recommended throughout the execution of the system... the recommended action is the outcome of the whole chain rule...not of a single rule...
public static void analyzeRecommendedActionsQueries() throws SQLException { Statement stat = conn.createStatement(); ResultSet result = stat.executeQuery("SELECT * FROM fraud.afm_fraudscorerecord_afm_recommendedactionrecord"); while (result.next()) { String queryId = result.getString("afm_fraudscorerecord_recordId"); String ruleId = result.getString("recommendedActionRecords_actionId"); Statement stat2 = conn.createStatement(); ResultSet s = stat2.executeQuery("SELECT * FROM fraud.afm_fraudscorerecord where recordId='"+queryId+"';"); while (s.next()) { System.out.print(new Date(s.getInt("timestamp"))); System.out.print(" UserID: " +s.getString("userId")); System.out.print(" Query Type: " + s.getString("queryType")); //System.out.print(" Amount: " + s.getDouble("transactionAmount")); } ResultSet t = stat2.executeQuery("SELECT * FROM fraud.afm_recommendedactionrecord where actionId='"+ruleId+"';"); while (t.next()) { System.out.print(" >>>>> Action Name: " + t.getString("recommendedAction")); //System.out.print(" Amount: " + s.getDouble("transactionAmount")); } System.out.println(); } stat.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doAction(\r\n\t\t\tAction_To_Choose action,\r\n\t\t\tGuideline_Action_Choices currentDecision,\r\n\t\t\tGuidelineInterpreter interpreter ){\r\n\n\t\tif (getrule_in_conditionValue() != null) {\n\t\t\tCriteria_Evaluation evaluation = HelperFunctions.dummyCriteriaEvaluation();\n\t\t\ttry {\n\t\t\t\tevaluation = (Criteria_Evaluation) ((Criterion)getrule_in_conditionValue()).evaluate(interpreter, false);\n\t\t\t\tif (!(PCAInterfaceUtil.mapTruthValue(evaluation.truth_value))) { // rule-in condition does not hold\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t} catch (PCA_Session_Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn ;\n\t\t\t}\n\t\t}\n\r\n\t\t// each item in alternatives is a Drug Usage.\r\n\t\t// each item in addEvaluation is an Add_Evaluation structure\n\t\tCollection<Slot> recommendationBais = getrecommendation_basisValue();\r\n\t\tCollection alternatives = getalternativesValue();\r\n\t\tList addEvaluations = new ArrayList();\r\n\t\t// addEvaluations is a collection of Choice_Evaluation instances\r\n\t\tfor (Iterator i = alternatives.iterator();i.hasNext();) {\r\n\t\t\tDrug_Usage activity = (Drug_Usage) i.next();\r\n\t\t\tChoice_Evaluation choiceEvaluation = new Choice_Evaluation();\r\n\t\t\ttry {\r\n\t\t\t\tAdd_Evaluation addEval = activity.evaluateAdd(interpreter, \n\t\t\t\t\t\tthis.getfine_grain_priorityValue(), null, recommendationBais);\r\n\t\t\t\tif (addEval != null) {\r\n\t\t\t\t\tchoiceEvaluation.add_eval(addEval);\r\n\t\t\t\t\taddEvaluations.add(choiceEvaluation);\r\n\t\t\t\t}\r\n\t\t\t\tlogger.debug(activity.getlabelValue()+\" got evaluated\");\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tlogger.error(activity.getlabelValue()+\" cannot be evaluated; \"+e.getClass());\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tCollections.sort(addEvaluations, new CompareEvals());\r\n\r\n\t\tinterpreter.addEvaluatedChoice(\r\n\t\t\t\tnew Guideline_Activity_Evaluations(\r\n\t\t\t\t\t\tthis.makeGuideline_Entity(interpreter.getCurrentGuidelineID()),\r\n\t\t\t\t\t\tEvaluation_Type.add,\r\n\t\t\t\t\t\t(Choice_Evaluation[])addEvaluations.toArray(new Choice_Evaluation[0]),\r\n\t\t\t\t\t\tinterpreter.getCurrentGuidelineID())\r\n\t\t\t\t);\r\n\r\n\t}", "public void testAct() {\n\t\tSystem.out.println(\"RothErevAgentTest.testAct()\");\n\t\tSystem.out.print(\"\tInitial: \");\n\t\tRELearner learner = agent.getLearner();\n\t\tREPolicy policy = learner.getPolicy();\n\t\tdouble[] probs = policy.getProbabilities();\n\t\tfor (int j = 0; j < probs.length; j++)\n\t\t\tSystem.out.print(probs[j] + \", \");\n\t\tSystem.out.println();\n\n\t\tSimpleAction<Integer> nextAction;\n\t\tint index;\n\n\t\tSimpleAction<Integer> benchmark_nextAction;\n\t\tint benchmark_index;\n\n\t\tfor (int i = 0; i < 100; i++) {\n\t\t\tnextAction = agent.chooseAction();\n\t\t\tindex = nextAction.getAct();\n\t\t\tagent.receiveFeedback(rewards[index]);\n\n\t\t\tbenchmark_nextAction = benchmark_learner.chooseAction();\n\t\t\tbenchmark_index = benchmark_nextAction.getAct();\n\t\t\tbenchmark_learner.update(rewards[benchmark_index]);\n\n\t\t\tassertEquals(index, benchmark_index);\n\t\t\tassertEquals(agent.getLearner().getUpdateCount(), i + 1);\n\n\t\t\tprobs = agent.getLearner().getPolicy().getProbabilities();\n\t\t\tSystem.out.print(\"\t\" + index + \"\t\");\n\t\t\tfor (int j = 0; j < probs.length; j++)\n\t\t\t\tSystem.out.print(probs[j] + \", \");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void selectAction(){\r\n\t\t\r\n\t\t//Switch on the action to be taken i.e referral made by health care professional\r\n\t\tswitch(this.referredTo){\r\n\t\tcase DECEASED:\r\n\t\t\tisDeceased();\r\n\t\t\tbreak;\r\n\t\tcase GP:\r\n\t\t\treferToGP();\r\n\t\t\tbreak;\r\n\t\tcase OUTPATIENT:\r\n\t\t\tsendToOutpatients();\r\n\t\t\tbreak;\r\n\t\tcase SOCIALSERVICES:\r\n\t\t\treferToSocialServices();\r\n\t\t\tbreak;\r\n\t\tcase SPECIALIST:\r\n\t\t\treferToSpecialist();\r\n\t\t\tbreak;\r\n\t\tcase WARD:\r\n\t\t\tsendToWard();\r\n\t\t\tbreak;\r\n\t\tcase DISCHARGED:\r\n\t\t\tdischarge();\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t\r\n\t\t}//end switch\r\n\t}", "void determineNextAction();", "UAction nextAction() { What should we do next? Override this for custom AI.\n //\n updateSeenEntities();\n UAction bestAction = null;\n float bestUrgency = 0f;\n int bc=0;\n for (UBehavior behavior : behaviors) {\n bc++;\n UAction action = behavior.getAction(this);\n if (action != null) {\n if (bestAction == null) {\n bestAction = action;\n bestUrgency = behavior.getCurrentUrgency();\n } else if (behavior.getCurrentUrgency() > bestUrgency) {\n bestAction = action;\n bestUrgency = behavior.getCurrentUrgency();\n }\n }\n }\n return bestAction;\n }", "@Override\n\tpublic int getAction() {\n\t\tint bstar = -1;\n\t\tdouble bstarval = Double.NEGATIVE_INFINITY;\n\t\tfor (int b : actions) {\n\t\t\t// now we need to look at each possible state transition\n\t\t\tdouble newStateSum = 0;\n\t\t\t// which means for every possible next state\n\t\t\tfor (int newX = 0; newX < beliefs.length; newX++) {\n\t\t\t\tfor (int newY = 0; newY < beliefs[0].length; newY++) {\n\t\t\t\t\tint[] newState = new int[]{newX,newY};\n\t\t\t\t\t// we need to look at every possible previous state\n\t\t\t\t\tdouble stateSum = 0;\n\t\t\t\t\tfor (int x = 0; x < beliefs.length; x++) {\n\t\t\t\t\t\tfor (int y = 0; y < beliefs[0].length; y++) {\n\t\t\t\t\t\t\tstateSum += beliefs[x][y] * // belief in CURRENT state if we were to make the observation, times\n\t\t\t\t\t\t\t\t\t\tworld.transitionProbability(newX, newY, x, y, b) * // probability of getting into the new state\n\t\t\t\t\t\t\t\t\t\tworld.getReward(newState);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tnewStateSum += stateSum;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (newStateSum > bstarval) {\n\t\t\t\tbstar = b;\n\t\t\t\tbstarval = newStateSum;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"(EntropicExplorer) Choosing action: \" + world.actionToString(bstar) + \" (value = \" + bstarval + \")\");\n\t\tlastAction = bstar;\n\t\tadvanceBeliefs(bstar);\n\t\treturn bstar;\n\t}", "void printActionsRemaining(boolean primary, boolean secondary);", "public void toolAccepted()\n {\n printOut(cliToolsManager.simpleQuestionsMaker(\"Strumento accettato\", 40, true));\n }", "public abstract List<Instruction> getPossibleActions();", "private static void checkActions()\n\t{\n\t\tSystem.out.println();\n\t\t\n\t\tif (fighterAction.equals(\"Kick\") && opponentAction.equals(\"Kick\"))\n\t\t{\n\t\t\tannounce(playerOneName,\" smashes shins with \", opponentName);\n\t\t\topponentHurt = true;\n\t\t\tplayerOneHurt = true;\n\t\t}\n\t\n\t\telse if (fighterAction.equals(\"Kick\") && opponentAction.equals(\"Punch\"))\n\t\t{\n\t\t\tannounce(opponentName,\" gives a big uppercut to \", playerOneName);\n\t\t\tplayerOneHurt = true;\n\t\t\tcounterAttack = true;\n\t\t}\n\t\n\t\telse if (fighterAction.equals(\"Kick\") && opponentAction.equals(\"Block\"))\n\t\t{\n\t\t\tannounce(opponentName,\" takes a big kick to the ribs from \", playerOneName);\n\t\t\topponentHurt = true;\n\t\t\tcounterAttack = true;\n\t\t}\n\t\n\t\telse if (fighterAction.equals(\"Punch\") && opponentAction.equals(\"Kick\"))\n\t\t{\n\t\t\tannounce(playerOneName,\" gives a big uppercut to \", opponentName);\n\t\t\topponentHurt = true;\n\t\t\tcounterAttack = true;\n\t\t}\n\t\n\t\telse if (fighterAction.equals(\"Punch\") && opponentAction.equals(\"Punch\"))\n\t\t{\n\t\t\tannounce(playerOneName,\" exchanges quick jabs with \", opponentName);\n\t\t\topponentHurt = true;\n\t\t\tplayerOneHurt = true;\n\t\t}\n\t\n\t\telse if (fighterAction.equals(\"Punch\") && opponentAction.equals(\"Block\"))\n\t\t{\n\t\t\tannounce(opponentName,\" parries the punch and deals big damage to \", playerOneName);\n\t\t\tplayerOneHurt = true;\n\t\t\tcounterAttack = true;\n\t\t}\n\t\n\t\telse if (fighterAction.equals(\"Block\") && opponentAction.equals(\"Kick\"))\n\t\t{\n\t\t\tannounce(playerOneName,\" takes a big kick to the ribs from \", opponentName);\n\t\t\tplayerOneHurt = true;\n\t\t\tcounterAttack = true;\n\t\t}\n\t\n\t\telse if (fighterAction.equals(\"Block\") && opponentAction.equals(\"Punch\"))\n\t\t{\n\t\t\tannounce(playerOneName,\" parries the punch and deals big damage to \", opponentName);\n\t\t\topponentHurt = true;\n\t\t\tcounterAttack = true;\n\t\t}\n\t\n\t\t// Both block\n\t\telse\n\t\t{\n\t\t\tannounce(\"\",\"Both fighters stand still, waiting for the other to make a move!\",\"\");\n\t\t}\n\n\t\tSystem.out.println();\n\t}", "@Override\n\tpublic String displayActions() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint i = 0;\n\t\tfor(Action action: this.getTakeableActions()) {\n\t\t\tif(action.isDisplay())\n\t\t\t\tsb.append(\"\\n\"+i++ +\". \"+ action.getDescription());\n\t\t}\n\t\treturn sb.toString();\n\t}", "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 int showPossibleActions(String[] string);", "private static void ExplainRules() {\n System.out.printf(\"\\n %sWELCOME TO BOMB BLAST%s!!!!!!!!!!!!\\n\\n \", Styling.ANSI_BLUE, Styling.ANSI_RESET);\r\n System.out.printf(\"- Your object is to survive as long as possible, and accumlate the most points.\\n- You accumulate points by not triggering the bomb and therefore surviving the round.\\nWhere is the bomb? Within a random box\\n- All boxes are empty apart from ONE\\n- If you select the bomb ridden box you will receive NO POINTS!\\nAnd the survivors will receive points based on how long it took the group to find the bomb\\n- After a selected amount of rounds whoever has survived the most amount of attempts wins!!\\n\\n\");\r\n AnyKey.pressAnyKeyToContinue();\r\n }", "private void doPrintAdvice(){\n\t\tcurrentStep = OPERATION_NAME+\": printing advice\";\n\t\tString[] toDisplay = {\n\t\t\t\t\"Operation succeeded!\",\n\t\t\t\t\"You have changed your password\",\n\t\t\t\t\"Press 1 -> Print the advice\",\n\t\t\t\t\"Press 2 -> Quit without printing\"\n\t\t};\n\t\tif (!_atmssHandler.doDisDisplayUpper(toDisplay)) {\n\t\t\trecord(\"Dis\");\n\t\t\treturn;\n\t\t}\n\t\twhile (true) {\n\t\t\tString userInput = _atmssHandler.doKPGetSingleInput(TIME_LIMIT);\n\t\t\tif (userInput == null) return;\n\t\t\tif (userInput.equals(\"1\")) {\n\t\t\t\tString[] toPrint = {\n\t\t\t\t\t\t\"Operation name: \" + OPERATION_NAME,\n\t\t\t\t\t\t\"Card Number: \" + _session.getCardNo(),\n\t\t\t\t\t\t\"Result: succeeded\"\n\t\t\t\t};\n\t\t\t\tif (!_atmssHandler.doAPPrintStrArray(toPrint)) record(\"AP\");\n\t\t\t\treturn;\n\t\t\t} else if (userInput.equals(\"2\")) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public void computeActions(List<Action> result, DiagramContext context);", "public HashMap<String,Rule> get_rules_to_action() throws Exception;", "public interface ActionFeedbackSuggester {\n\n\t/**\n\t * Is automatic feedback suggestion enabled\n\t *\n\t * @param action action\n\t * @return <code>true</code> Active\n\t */\n\tboolean isAutoFeedbackColors(Action action);\n\n\tvoid suggestFeedback(Action action);\n\n\tbyte suggestFeedbackChannel(FeedbackType type);\n\n\tPad getPad(Action action);\n}", "public int getReferentialActionUpdateRule();", "public void actions() {\n\t\t\tProvider p = array_provider[theTask.int_list_providers_that_tried_task.get(0)];\n\t\t\t\n\t\t\t//there is a percentage of probability that the user will fail to complete the task\n\t\t\tif(random.draw((double)PERCENTAGE_TASK_FAILURE/100)){ // SUCCESS\n\n\t\t\t\ttot_success_tasks++;\n\t \tthrough_time += time() - theTask.entryTime;\n\t\t\t\ttheTask.out();\n\t\t\t\t\n\t\t\t\tif(FIXED_EARNING_FOR_TASK) earning_McSense = earning_McSense + FIXED_EARNING_VALUE;\n\t\t\t\telse {\n\n\t\t\t\t\t//Provider p = (Provider) theTask.providers_that_tried_task.first();\n\t\t\t\t\tearning_McSense = earning_McSense + (p.min_price*PERCENTAGE_EARNING)/100;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\telse { // FAILURE\n\t\t\t\t//we should check again and if the check fails insert the task in rescheduled_waiting\n\t\t\t\ttheTask.into(taskrescheduled);\n\t\t\t\ttot_failed_tasks++;\n\t\t\t\t//new StartTaskExecution(theTask).schedule(time());\n\n\t\t\t}\n\t\t\t// the provider frees one slot\n\t\t\tp.number_of_task_executing--;\n\t\t\ttot_scheduled_completed_in_good_or_bad_tasks++;\n\n \t}", "private void printRecommendation(){\n\t\t\n\t\tSystem.out.println( \"\\n\\nRecommendations for you to save money......\");\n\t\t\n\t\tSystem.out.println( \"\\n\\n\\tBest restaurants ......\");\n\t\tfor(int i = 0 ; i < 3 ; i++){\n\t\t\tif(restaurantTransactions.size() > 0){\n\t\t\t\tSystem.out.println( \"\\t\\t\"+(i+1) +\".\"+ restaurantTransactions.pollFirst().getName());\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println( \"\\n\\tBest markets ......\");\n\t\tfor(int i = 0 ; i < 3 ; i++){\n\t\t\tif(marketTransactions.size() > 0){\n\t\t\t\tSystem.out.println( \"\\t\\t\"+(i+1) +\".\"+ marketTransactions.pollFirst().getName());\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println( \"\\n\\tBest housing options ......\");\n\t\tfor(int i = 0 ; i < 3 ; i++){\n\t\t\tif(stayTransactions.size() > 0){\n\t\t\t\tSystem.out.println( \"\\t\\t\"+(i+1) +\".\"+ stayTransactions.pollFirst().getName().substring(0,42));\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println( \"\\n\\tBest gas pump stations ......\");\n\t\tfor(int i = 0 ; i < 3 ; i++){\n\t\t\tif(gaspumpTransactions.size() > 0){\n\t\t\t\tSystem.out.println( \"\\t\\t\"+(i+1) +\".\"+ gaspumpTransactions.pollFirst().getName());\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\\nTIPS and Strategies for you to save more money........\");\n\t\t\n\t\tint counter = 1;\n\t\t\n\t\tfloat totalAmountTaxi = 0;\n\t\tint numTimesToMarket = 0;\n\t\tint numTimesToRestaurant = 0;\n\t\t\n\t\t\n\t\tfor(String transactionKey: userData.keySet()){\n\t\t\t\n\t\t\tif(userData.get(transactionKey).getCategory() == 'T'){\n\t\t\t\ttotalAmountTaxi += userData.get(transactionKey).getTotalAmountSpend();\n\t\t\t}\n\t\t\telse if(userData.get(transactionKey).getCategory() == 'M'){\n\t\t\t\tnumTimesToMarket += userData.get(transactionKey).getFrequency();\n\t\t\t}\n\t\t\telse if(userData.get(transactionKey).getCategory() == 'R'){\n\t\t\t\tnumTimesToRestaurant += userData.get(transactionKey).getFrequency();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(totalAmountTaxi > 1500){\n\t\t\tSystem.out.println( \"\\n\\t\" + counter++ +\".Plan to buy a vehicle.\"\n\t\t\t\t\t+ \"\\n\\n\\t It would be better if you buy a car for the time being\"\n\t\t\t\t\t+ \"\\n\\t as the average expense for taxis are more.\"\n\t\t\t\t\t+ \"Also once you are done with the trip you\\n\\t can sell it off.\");\n\t\t}\n\t\t\n\t\tif(totalAmountTaxi < 1500)\n\t\t{\t\tSystem.out.println( \"\\n\\t\" + counter++ +\".Prefer taxi over buying a car.\"\n\t\t\t\t\t+ \"\\n\\n\\t It would be better if you prefer taxi instead of buying a car\"\n\t\t\t\t\t+ \"\\n\\t as the average expense for travel are comparitively less.\");\n\t\t}\n\t\t\n\t\tif(numTimesToMarket > 48){\n\t\t\tSystem.out.println( \"\\n\\t\" + counter++ +\".Switch to online shopping.\"\n\t\t\t\t\t+ \"\\n\\n\\t It would be better if you prefer online shopping \"\n\t\t\t\t\t+ \"instead of going market\\n\\t which saves time also for you\");\n\t\t}\n\t\t\n\t if(numTimesToRestaurant > 300){\n\t\t System.out.println( \"\\n\\t\" + counter++ +\".Prefer cooking instead going restaurants.\"\n\t\t\t\t\t+ \"\\n\\n\\t It would be better if you prefer cooking \"\n\t\t\t\t\t+ \"instead of going resturants / pubs\\n\\t which saves more money for you\");\n\t\t\n\t }\n\t \n\t System.out.println(\"\\n\\n\\nGenerating file \\\"Report_Unknown_Transactions.txt\\\" \"\n\t \t\t+ \"for unknown transactions .... Please check....\");\n\t \n\t try{\n\t \tPrintWriter writer = new PrintWriter(\"Report_Unknown_Transactions.txt\", \"UTF-8\");\n\n\t \t writer.println(\"\\n\\nList of the unknown transactions .. \\n\\n\");\n\t\t for(TransactionData unknownData :unknownTransactions ){\n\t\t\t\twriter.println(unknownData.getName());\n\t\t\t}\n\t\t writer.println(\"\\n\\nPlease check README/TransactionDataInfokey.txt to know how can you\"+\n\t\t \t\t\t\" help me to identify the unknown transactions .. \");\n\t\t writer.close();\n\t }\n\t catch(Exception e){\n\t \tSystem.out.println(\"Unable to create the report . Please check permission \"\n\t \t\t\t+ \"or ensure disk space..\");\n\t }\n\t\t\n\t\t\n\t}", "private ArrayList<String> getPossibleActions() {\n\t\t\n\t\tRandom r = new Random();\n\t\tArrayList<String> possibleActions = new ArrayList<String>();\n\t\tfor (String actionTitle : getAllActions()) {\n\t\t\tif (r.nextDouble() < 0.3) {\n\t\t\t\tpossibleActions.add(actionTitle);\n\t\t\t}\n\t\t}\n\t\treturn possibleActions;\n\t}", "@Override\n public List<String> doAction(){\n destination.setCloakTurns(destination.getCloakTurns() + 3);\n destination.getOwner().getResources().getTechResource().useTech(Constants.CLOAK_COST);\n //Message \"(Player) cloaked (destination) for three more turns.\"\n return Arrays.asList((destination.getOwner().getName() + \" cloaked \" + destination.getName() + \" for three more turns.\"));\n }", "public boolean helpForAll()\n {\n boolean action = false;\n //boolean value2048 = false;\n \n int i = 0;\n \n // Faire {...} tant qu'on a pu effectuer une action le coup précédent //et tant qu'on a pas rencontré la valeur 2048 \n do\n {\n action = helpForOne();\n //System.out.println(i++);\n //System.out.println(\"Action : \"+action);\n this.displayGrid();\n } while (action);\n //} while (action && !value2048);\n \n return action;\n }", "@Override\n\tpublic void coreTraining() {\n\t\tSystem.out.println(\"加强进攻意识练习\");\n\t}", "public void actionOffered();", "void checkPrerequisite() throws ActionNotPossibleException;", "void showOthersActions(String message);", "private String championRecommendation(LeagueOfLegendsAccount account, String difficultyLevel) {\r\n if (difficultyLevel.equals(\"Beginner\")) {\r\n account.myRecommended.addChampionName(\"Darius\");\r\n return \"For Beginner difficulty we recommend Darius\";\r\n } else if (difficultyLevel.equals(\"Novice\")) {\r\n account.myRecommended.addChampionName(\"Blitzcrank\");\r\n account.myRecommended.addChampionName(\"Lucian\");\r\n account.myRecommended.addChampionName(\"Sejuani\");\r\n return \"For Novice difficulty we recommend Blitzcrank, Lucian, and Sejuani\";\r\n } else if (difficultyLevel.equals(\"Advanced\")) {\r\n account.myRecommended.addChampionName(\"Syndra\");\r\n account.myRecommended.addChampionName(\"Akali\");\r\n account.myRecommended.addChampionName(\"Fiddlesticks\");\r\n return \"For Advanced difficulty we recommend Syndra, Akali, and Fiddlesticks\";\r\n } else {\r\n return \"Not an existing classification of difficulty (Beginner, Novice, Advanced)\";\r\n }\r\n }", "private WeightedSampler<String> getPossibleActions(int team) {\n if (this.b.getCurrentPlayerTurn() != team || this.b.getWinner() != 0) {\n return null;\n }\n Player p = this.b.getPlayer(team);\n WeightedSampler<String> poss = new WeightedRandomSampler<>();\n // playing cards & selecting targets\n List<Card> hand = p.getHand();\n for (Card c : hand) {\n if (p.canPlayCard(c)) {\n double totalWeight = PLAY_CARD_TOTAL_WEIGHT + PLAY_CARD_COST_WEIGHT_MULTIPLIER * c.finalStats.get(Stat.COST);\n List<List<List<TargetList<?>>>> targetSearchSpace = new LinkedList<>();\n this.getPossibleListTargets(c.getBattlecryTargetingSchemes(), new LinkedList<>(), targetSearchSpace);\n if (targetSearchSpace.isEmpty()) {\n targetSearchSpace.add(List.of());\n }\n if (c instanceof BoardObject) {\n double weightPerPos = totalWeight / (p.getPlayArea().size() + 1);\n // rip my branching factor lol\n for (int playPos = 0; playPos <= p.getPlayArea().size(); playPos++) {\n for (List<List<TargetList<?>>> targets : targetSearchSpace) {\n poss.add(new PlayCardAction(p, c, playPos, targets).toString().intern(), weightPerPos / targetSearchSpace.size());\n }\n }\n } else {\n // spells don't require positioning\n for (List<List<TargetList<?>>> targets : targetSearchSpace) {\n poss.add(new PlayCardAction(p, c, 0, targets).toString().intern(), totalWeight / targetSearchSpace.size());\n }\n }\n }\n }\n this.b.getMinions(team, false, true).forEachOrdered(m -> {\n // unleashing cards & selecting targets\n if (p.canUnleashCard(m)) {\n List<List<List<TargetList<?>>>> targetSearchSpace = new LinkedList<>();\n this.getPossibleListTargets(m.getUnleashTargetingSchemes(), new LinkedList<>(), targetSearchSpace);\n if (targetSearchSpace.isEmpty()) {\n targetSearchSpace.add(List.of());\n }\n for (List<List<TargetList<?>>> targets : targetSearchSpace) {\n poss.add(new UnleashMinionAction(p, m, targets).toString().intern(), UNLEASH_TOTAL_WEIGHT / targetSearchSpace.size());\n }\n }\n // minion attack\n if (m.canAttack()) {\n double totalWeight = ATTACK_TOTAL_WEIGHT + ATTACK_WEIGHT_MULTIPLIER * m.finalStats.get(Stat.ATTACK);\n double weight = totalWeight / m.getAttackableTargets().count();\n m.getAttackableTargets().forEachOrdered(target -> {\n double bonus = target instanceof Leader ? ATTACK_TARGET_LEADER_MULTIPLIER : 1;\n double overkillMultiplier = Math.pow(ATTACK_WEIGHT_OVERKILL_PENALTY, Math.max(0, m.finalStats.get(Stat.ATTACK) - target.health));\n poss.add(new OrderAttackAction(m, target).toString().intern(), overkillMultiplier * bonus * weight);\n });\n }\n });\n // ending turn\n poss.add(new EndTurnAction(team).toString().intern(), END_TURN_WEIGHT);\n return poss;\n }", "@Override \r\npublic String toString() { \r\n\treturn String.format(\"Action programmer: %s%n%s: $%,.2f; %s: %,.2f\",\r\n\t\t\tsuper.toString(), \"hourly wage\", getWage(), \r\n\t\t\t\"pieces worked\", getPieces()); }", "@Override\n public void onExplanationNeeded(List<String> permissionsToExplain) {\n }", "public String actionsToString() {\n String res = \"\";\n for (UserCheck userCheck: checks) {\n res += userCheck.toString() + \" \\n\";\n }\n return res;\n }", "private void showHint() {\r\n\t\tUtil.println(\"A special hint will be calculated for you, please wait.\");\r\n\r\n\t\tStrategyInterface s = new SmartStrategy();\r\n\r\n\t\tTurn turn = s.requestTurn(client.getTurn());\r\n\r\n\t\tclient.setTurn(turn);\r\n\r\n\t\tUtil.println(\"The following moves will be suggested: \");\r\n\t\tUtil.println(client.getTurn().getMoves().toString());\r\n\t\tUtil.println(\"Type applyhint to apply these moves.\");\r\n\t}", "public QFeedback<S> takedAction();", "private SocialPractice chooseOnIntentions(\n\t\t\tArrayList<SocialPractice> candidateSocialPractices) {\n\t\tSocialPractice chosenAction = null; //temp\n\t\tHashMap<SocialPractice, Double> needs=new HashMap<SocialPractice, Double>();\n\t\tfor(SocialPractice sp: candidateSocialPractices){\n\t\t\tneeds.put(sp, myValues.get(sp.getPurpose()).getNeed(myContext)); \n\t\t}\n\t\tdouble totalNeed = Helper.sumDouble(needs.values()); //satisfaction can get <0, so need as well, so maybe not getting in while loop\n\t\tdouble randomDeterminer = RandomHelper.nextDoubleFromTo(0, totalNeed);\n\t\t//System.out.println(myContext);\n\t\t//System.out.println(\"Needs:\" + needs);\n\t\t\n\t\tIterator it = needs.entrySet().iterator();\n\t\twhile(randomDeterminer > 0) {\n\t\t\tHashMap.Entry pair = (HashMap.Entry) it.next();\n\t\t\tchosenAction = (SocialPractice) pair.getKey();\n\t\t\trandomDeterminer = randomDeterminer - (double) pair.getValue();\n\t\t}\n\t\treturn chosenAction;\n\t}", "@Override\n\tpublic void assistTraining() {\n\t\tSystem.out.println(\"加强射门练习\");\n\t}", "@Override\n public String getActions() {\n\treturn \"\";\n }", "protected void actionConfirmed()\r\n\t\t{\n\r\n\t\t\tif ( actionSelect.getSelectedItem() == null )\r\n\t\t\t\tDEFAULT_SHELL.executeLine( \"set battleAction=attack\" );\r\n\r\n\t\t\tRunnable request = (Runnable) locationSelect.getSelectedItem();\r\n\t\t\tif ( request == null )\r\n\t\t\t\treturn;\r\n\r\n\t\t\tsetProperty( \"lastAdventure\", request.toString() );\r\n\r\n\t\t\t// If there are conditions in the condition field, be\r\n\t\t\t// sure to process them.\r\n\r\n\t\t\tString conditionList = conditionField.getText().trim();\r\n\t\t\tif ( conditionList.equalsIgnoreCase( \"none\" ) )\r\n\t\t\t\tconditionList = \"\";\r\n\r\n\t\t\tif ( conditionList.length() > 0 )\r\n\t\t\t{\r\n\t\t\t\tDEFAULT_SHELL.executeLine( \"conditions clear\" );\r\n\r\n\t\t\t\tboolean verifyConditions = false;\r\n\t\t\t\tboolean useDisjunction = false;\r\n\t\t\t\tString [] conditions = conditionList.split( \"\\\\s*,\\\\s*\" );\r\n\r\n\t\t\t\tfor ( int i = 0; i < conditions.length; ++i )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( conditions[i].equals( \"check\" ) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Postpone verification of conditions\r\n\t\t\t\t\t\t// until all other conditions added.\r\n\r\n\t\t\t\t\t\tverifyConditions = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( conditions[i].equals( \"outfit\" ) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Determine where you're adventuring and use\r\n\t\t\t\t\t\t// that to determine which components make up\r\n\t\t\t\t\t\t// the outfit pulled from that area.\r\n\r\n\t\t\t\t\t\tif ( !(request instanceof KoLAdventure) || !EquipmentDatabase.addOutfitConditions( (KoLAdventure) request ) )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tsetStatusMessage( \"No outfit corresponds to this zone.\" );\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tverifyConditions = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( conditions[i].equals( \"or\" ) || conditions[i].equals( \"and\" ) || conditions[i].startsWith( \"conjunction\" ) || conditions[i].startsWith( \"disjunction\" ) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tuseDisjunction = conditions[i].equals( \"or\" ) || conditions[i].startsWith( \"disjunction\" );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ( !DEFAULT_SHELL.executeConditionsCommand( \"add \" + conditions[i] ) )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tKoLmafia.enableDisplay();\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( verifyConditions )\r\n\t\t\t\t{\r\n\t\t\t\t\tDEFAULT_SHELL.executeConditionsCommand( \"check\" );\r\n\t\t\t\t\tif ( StaticEntity.getClient().conditions.isEmpty() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tKoLmafia.updateDisplay( \"All conditions already satisfied.\" );\r\n\t\t\t\t\t\tKoLmafia.enableDisplay();\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( StaticEntity.getClient().conditions.size() > 1 )\r\n\t\t\t\t\tDEFAULT_SHELL.executeConditionsCommand( useDisjunction ? \"mode disjunction\" : \"mode conjunction\" );\r\n\r\n\t\t\t\tconditionField.setText( \"\" );\r\n\t\t\t\tif ( countField.getText().equals( \"\" ) )\r\n\t\t\t\t\tcountField.setText( String.valueOf( KoLCharacter.getAdventuresLeft() ) );\r\n\t\t\t}\r\n\r\n\t\t\t(new RequestThread( request, getValue( countField ) )).start();\r\n\t\t\tcountField.setText( \"\" );\r\n\t\t}", "public boolean[] eGreedyAction()\n\t{\n\t\t// initialize variables\n\t\tRandom generator = new Random();\n\t\t\n\t\t// find best action\n\t\tList<boolean[]> validActions = getValidActions();\n\t\t\n\t\t// initiate values for comparison\n\t\tStateActionPair sap = new StateActionPair(state, validActions.get(0));\n\t\tboolean[] bestAction = sap.action;\n\t\t\n\t\tdouble bestValue= getStateActionValue(sap);\n\t\t\n\t\tfor(int i=1; i<validActions.size(); i++)\n\t\t{\n\t\t\tsap = new StateActionPair(state, validActions.get(i));\n\t\t\tdouble qValue = getStateActionValue(sap);\n\t\t\tif( qValue > bestValue )\n\t\t\t{\n\t\t\t\tbestAction = sap.action;\n\t\t\t\tbestValue = qValue;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// choose random action\n\t\tif( generator.nextDouble() < epsilon )\t\n\t\t{\n\t\t\tList<boolean[]> randomActions = new ArrayList<boolean[]>(validActions);\n\t\t\trandomActions.remove(bestAction);\t// don't choose the best action\n\t\t\tboolean[] randomAction = randomActions.get(generator.nextInt(randomActions.size()));\n\t\t\treturn randomAction;\n\t\t}\n\t\t\n\n\t\treturn bestAction;\t// choose best action\n\t}", "public static int actions(String str)\n {\n if (str.equalsIgnoreCase(\"Shop\") || str.equalsIgnoreCase(\"S\"))\n {\n return 0;\n }\n else if (str.equalsIgnoreCase(\"Fight\") || str.equalsIgnoreCase(\"F\"))\n {\n return 1;\n }\n else if (str.equalsIgnoreCase(\"Rest\") || str.equalsIgnoreCase(\"R\"))\n {\n return 2;\n }\n else if (str.equalsIgnoreCase(\"Gamble\") || str.equalsIgnoreCase(\"G\"))\n {\n return 3;\n }\n else if (str.equalsIgnoreCase(\"Account\") || str.equalsIgnoreCase(\"A\"))\n {\n return 4;\n }\n else if (str.equalsIgnoreCase(\"Museum\") || str.equalsIgnoreCase(\"M\"))\n {\n return 5;\n }\n else if (str.equalsIgnoreCase(\"Quest\") || str.equalsIgnoreCase(\"Q\"))\n {\n return 6;\n }\n else if (str.equalsIgnoreCase(\"SumbitScore\") || str.equalsIgnoreCase(\"submit\") || str.equalsIgnoreCase(\"submit score\") || str.equalsIgnoreCase(\"SS\")) \n {\n return 7;\n }\n else \n {\n return 8;\n }\n }", "@Override\n public void noteNewTurn()\n {\n if ( traceStats && stateMachine.getInstanceId() == 1 )\n {\n ForwardDeadReckonLegalMoveInfo[] masterList = stateMachine.getFullPropNet().getMasterMoveList();\n for(int i = 0; i < bestResponseScores.length; i++)\n {\n float best = -Float.MAX_VALUE;\n float bestFollow = -Float.MAX_VALUE;\n int bestIndex = -1;\n int bestFollowIndex = -1;\n for(int j = 0; j < bestResponseScores.length; j++)\n {\n if ( responseSampleSize[i][j] > 0 )\n {\n float score = bestResponseScores[i][j]/responseSampleSize[i][j];\n if ( masterList[i].mRoleIndex != masterList[j].mRoleIndex)\n {\n if ( score > best )\n {\n best = score;\n bestIndex = j;\n }\n }\n else\n {\n if ( score > bestFollow )\n {\n bestFollow = score;\n bestFollowIndex = j;\n }\n }\n }\n }\n\n LOGGER.info(\"Best response to \" + masterList[i].mInputProposition + \": \" + (bestIndex == -1 ? \"NONE\" : masterList[bestIndex].mInputProposition + \" (\" + (100*best) + \"% [\" + responseSampleSize[i][bestIndex] + \"] )\"));\n LOGGER.info(\"Best follow-on to \" + masterList[i].mInputProposition + \": \" + (bestFollowIndex == -1 ? \"NONE\" : masterList[bestFollowIndex].mInputProposition + \" (\" + (100*bestFollow) + \"% [\" + responseSampleSize[i][bestFollowIndex] + \"] )\"));\n if ( bestIndex != -1 && opponentEquivalent[bestIndex] != bestFollowIndex )\n {\n int bestDeny = opponentEquivalent[bestIndex];\n LOGGER.info(\"Best denial to \" + masterList[i].mInputProposition + \": \" + (bestDeny == -1 ? \"NONE\" : masterList[bestDeny].mInputProposition + \" (\" + (100*(bestResponseScores[i][bestDeny]/responseSampleSize[i][bestDeny])) + \"% [\" + responseSampleSize[i][bestDeny] + \"] )\"));\n }\n }\n }\n\n // Reset the stats\n for(int i = 0; i < bestResponseScores.length; i++)\n {\n for(int j = 0; j < bestResponseScores.length; j++)\n {\n bestResponseScores[i][j] /= 2;\n responseSampleSize[i][j] /= 2;\n }\n }\n }", "public void recommended() {\n MainActivity activity = (MainActivity) getActivity();\n ArrayList<Integer> results = new ArrayList<>();\n int highest = 0;\n for (int i = 0; i < activity.getUserLocations().size(); i++) {\n int lid = activity.database.getLocID(1, activity.userLocations.get(i).getProvider());\n ArrayList<LocationMoodObject> locmood = activity.database.getLocMood(lid);\n int result = 0;\n\n for (int j = 0; j < locmood.size(); j++) {\n switch (locmood.get(j).mood) {\n case (1):\n result = result + 1;\n break;\n case (2):\n result = result + 2;\n break;\n case (3):\n result = result + 3;\n break;\n case (4):\n result = result + 4;\n break;\n case (5):\n result = result + 5;\n break;\n }\n }\n if (locmood.size()>0){\n result = result / locmood.size();\n results.add(result);}\n\n }\n\n for (int i = 0; i < results.size(); i++) {\n if (results.get(i) > highest) {\n highest = results.get(i);\n }\n }\n\n recommended = activity.userLocations.get(highest).getProvider();\n }", "public int userInteractionTree() {\n System.out.println(\"\\t 1) Add new course to Active Course List\");\n System.out.println(\"\\t 2) Add saved course to Active Course List\");\n System.out.println(\"\\t 3) View Active Course List\");\n System.out.println(\"\\t 4) View Saved Course List\");\n System.out.println(\"\\t 5) Remove from Active Course List\");\n System.out.println(\"\\t 6) Remove from Saved Courses\");\n System.out.println(\"\\t 7) Save Active Course List to saved courses\");\n\n System.out.println(\"\\t 8) Generate schedules from Active Course List\");\n System.out.println(\"\\t 9) Save generated schedules to saved schedules\");\n System.out.println(\"\\t 10) View saved schedules\");\n System.out.println(\"\\t 11) Delete saved schedule\");\n\n System.out.println(\"\\t 12) Save and Exit (Schedules must be saved separately with 9)\");\n System.out.println(\"\\t 13) Exit without Saving\");\n\n return obtainIntSafely(1,13, \"That is not one of the options, try again\");\n }", "private static final void displayAttractionSummary()\r\n {\r\n System.out.println(\"Display Attraction Summary Feature Selected!\");\r\n System.out.println(\"--------------------------------------\");\r\n \r\n // step through array of attractions with for loop\r\n for(int i = 0; i < attractionCount; i++)\r\n {\r\n attractionList[i].printDetails();\r\n System.out.println();\r\n }\r\n }", "private WeightedSampler<String> getPossibleLethalActions(int team) {\n if (this.b.getCurrentPlayerTurn() != team || this.b.getWinner() != 0) {\n return null;\n }\n Player p = this.b.getPlayer(team);\n WeightedSampler<String> poss = new WeightedOrderedSampler<>();\n List<Minion> minions = this.b.getMinions(team, false, true).collect(Collectors.toList());\n for (Minion m : minions) {\n if (p.canUnleashCard(m)) {\n double totalWeight = UNLEASH_TOTAL_WEIGHT + UNLEASH_WEIGHT_PER_PRESENCE * m.getTotalEffectValueOf(e -> e.getPresenceValue(5));\n List<List<List<TargetList<?>>>> targetSearchSpace = new LinkedList<>();\n this.getPossibleListTargets(m.getUnleashTargetingSchemes(), new LinkedList<>(), targetSearchSpace);\n if (targetSearchSpace.isEmpty()) {\n targetSearchSpace.add(List.of());\n }\n for (List<List<TargetList<?>>> targets : targetSearchSpace) {\n poss.add(new UnleashMinionAction(p, m, targets).toString().intern(), totalWeight / targetSearchSpace.size());\n }\n }\n }\n if (this.b.getMinions(team * -1, false, true).anyMatch(m -> m.finalStats.get(Stat.WARD) > 0)) {\n // find ways to break through the wards\n for (Minion m : minions) {\n if (m.canAttack()) {\n double totalWeight = ATTACK_TOTAL_WEIGHT + ATTACK_WEIGHT_MULTIPLIER * m.finalStats.get(Stat.ATTACK);\n List<Minion> searchSpace = m.getAttackableTargets().collect(Collectors.toList());\n double weight = totalWeight / searchSpace.size();\n for (Minion target : searchSpace) {\n double overkillMultiplier = Math.pow(ATTACK_WEIGHT_OVERKILL_PENALTY, Math.max(0, m.finalStats.get(Stat.ATTACK) - target.health));\n poss.add(new OrderAttackAction(m, target).toString().intern(), overkillMultiplier * weight);\n }\n }\n }\n } else {\n // just go face\n this.b.getPlayer(team * -1).getLeader().ifPresent(l -> {\n for (Minion m : minions) {\n if (m.canAttack(l)) {\n double totalWeight = ATTACK_TOTAL_WEIGHT + ATTACK_WEIGHT_MULTIPLIER * m.finalStats.get(Stat.ATTACK);\n poss.add(new OrderAttackAction(m, l).toString().intern(), totalWeight);\n }\n }\n });\n }\n poss.add(new EndTurnAction(team).toString().intern(), END_TURN_WEIGHT);\n return poss;\n }", "@Override\n\t\t\t\tpublic void action() {\n\t\t\t\t\t\tRandom r = new Random();\n\t\t\t\t\t\tint Low = 1;\n\t\t\t\t\t\tint High = 999;\n\t\t\t\t\t\tint Result = r.nextInt(High-Low) + Low;\n\t\t\t\t\t\tACLMessage msg = new ACLMessage(ACLMessage.REQUEST);\n\t\t\t\t\t\tmsg.setOntology(\"AirConditioner\");\n\t\t\t\t\t\tmsg.addReceiver(new AID(\"da\", AID.ISLOCALNAME));\n//\t\t\t\t\t\tif (Result % 2 == 0){\n//\t\t\t\t\t\t\t//humid mode\n//\t\t\t\t\t\t\tmsg.setContent(\"humid\");\n//\t\t\t\t\t\t\tSystem.out.println(\"Agent \"+ myAgent.getLocalName() + \": operating mode: humid\" );\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse if((Result % 3 == 0)) {\n//\t\t\t\t\t\t\t//mid\n//\t\t\t\t\t\t\tmsg.setContent(\"mid\");\n//\t\t\t\t\t\t\tSystem.out.println(\"Agent \"+ myAgent.getLocalName() + \": operating mode: mid\" );\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse if((Result % 5 == 0)) {\n//\t\t\t\t\t\t\t//high\n//\t\t\t\t\t\t\tmsg.setContent(\"mid\");\n//\t\t\t\t\t\t\tSystem.out.println(\"Agent \"+ myAgent.getLocalName() + \": operating mode: high\" );\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse {\n//\t\t\t\t\t\t\t//low\n//\t\t\t\t\t\t\tmsg.setContent(\"mid\");\n//\t\t\t\t\t\t\tSystem.out.println(\"Agent \"+ myAgent.getLocalName() + \": operating mode: low\" );\n//\t\t\t\t\t\t}\n\t\t\t\t\t\tmsg.setContent(Airconditioner_Agent.mode);\n\t\t\t\t\t\tSystem.out.println(\"Agent \"+ myAgent.getLocalName() + \": operating mode: \"+Airconditioner_Agent.mode );\n\t\t\t\t\t\tmyAgent.send(msg);\n\t\t\t\t\t}", "public int doMostFavourAction() {\n if (this.eatable > this.playable && this.eatable > this.ignorable) {\n this.raiseEatable(1.1, 0.9);\n return 0;\n } else if (this.playable > this.eatable && this.playable > this.ignorable) {\n this.raisePlayable(1.1, 0.9);\n return 1;\n } else if (this.ignorable > this.eatable && this.ignorable > this.playable) {\n this.raiseIgnorable(1.1, 0.9);\n return 2;\n } else {\n int random = (int) (Math.random()*3);\n if (random == 0) {\n this.raiseEatable(1.1, 0.9);\n } else if (random == 1) {\n this.raisePlayable(1.1, 0.9);\n } else {\n this.raiseIgnorable(1.1, 0.9);\n }\n return random;\n }\n }", "private RouteAction Best(RouteState state) {\r\n\t\treturn V.get(state).action;\r\n\t}", "@Override\n\tpublic String getDescription() {\n\t\treturn \"Advance the turn after you've done everything you need to do - this action will fail if something else needs to be done to finish the turn.\";\n\t}", "public Integer aiAction() {\r\n\t\t//if the first dice is less then six, throw the second dice \r\n\t\t//if the both throws > 10 the ai has lost, and will return 0\r\n\t\t//if the first dice == 7, return first dice\r\n\t\tInteger totalSum = 0;\r\n\t\tRandom aiRandom = new Random();\r\n\t\tInteger firstDice = aiRandom.nextInt(7) + 1;\r\n\t\tSystem.out.println(\"First dice: \" + (totalSum += firstDice));\r\n\t\tif (firstDice < 6) {\r\n\t\t\tInteger secondDice = aiRandom.nextInt(7) + 1;\r\n\t\t\tSystem.out.println(\"Second dice value is: \" + secondDice);\r\n\t\t\tSystem.out.println(\"Sum of both throws: \" + (totalSum += secondDice));\r\n\t\t\tif(totalSum > 10){\r\n\t\t\t\treturn 0;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\treturn totalSum;\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Ai scored :\" + (firstDice));\r\n\t\t\treturn firstDice;\r\n\t\t}\r\n\r\n\t}", "private void printGoalOptions() {\n System.out.println(ANSI_PURPLE + \"CHOOSE YOUR GOALS: \" + ANSI_RESET);\n System.out.println(\"----------------------------------------------------------------------------------------------------------------\");\n System.out.println(\"1. I can be poor - I don't care about the money but I want to be as\" + ANSI_BLUE + \" happy and\" + ANSI_RESET + \" as\" + ANSI_BLUE + \" educated\" + ANSI_RESET + \" as possible.\");\n System.out.println(\"2. I want to be \" + ANSI_BLUE + \"rich and happy!\" + ANSI_RESET + \" I don't have to be educated at all.\");\n System.out.println(\"3. I want to be well \" + ANSI_BLUE + \"educated and \" + ANSI_RESET + \"I don't want be hungry ever again. Always \" + ANSI_BLUE + \"full!\" + ANSI_RESET + \" ;) \");\n System.out.println(\"4. I want to have the \" + ANSI_BLUE + \"best job\" + ANSI_RESET + \" possible and make\" + ANSI_BLUE + \" lots of money\" + ANSI_RESET + \" even if it will make me unhappy.\");\n System.out.println(\"----------------------------------------------------------------------------------------------------------------\");\n }", "public void displayActionAndResponses() {\n System.out.print(trackAction);\n if (trackAction.equals(\"move\")) {\n System.out.println(\",\" + trackMoveDistance + \",\" + trackNewDirection);\n } else {\n System.out.println();\n }\n\n // display the simulation checks and/or responses\n if (trackAction.equals(\"move\") | trackAction.equals(\"turn_off\")) {\n System.out.println(trackMoveCheck);\n } else if (trackAction.equals(\"scan\")) {\n System.out.println(trackScanResults);\n } else {\n System.out.println(\"action not recognized\");\n }\n }", "private void doResearch() {\n\t\tSystem.out.println(\"Students must do research\");\n\t}", "private void applyTheRule() throws Exception {\n System.out.println();\n System.out.println();\n System.out.println();\n System.out.println(\"IM APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n System.out.println();\n if (parameter.rule.equals(\"1\")) {\n Rule1.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"2\")) {\n Rule2.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3\")) {\n Rule3.all(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3a\")) {\n Rule3.a(resultingModel);\n\n }\n\n if (parameter.rule.equals(\"3b\")) {\n Rule3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"3c\")) {\n Rule3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"4\")) {\n Rule4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"4a\")) {\n Rule4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"4b\")) {\n Rule4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"4c\")) {\n Rule4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r1\")) {\n Reverse1.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r2\")) {\n Reverse2.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3\")) {\n Reverse3.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3a\")) {\n Reverse3.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3b\")) {\n Reverse3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3c\")) {\n Reverse3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4\")) {\n Reverse4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4a\")) {\n Reverse4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4b\")) {\n Reverse4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4c\")) {\n Reverse4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"5\")){\n Rule5.apply(resultingModel);\n }\n\n System.out.println(\"IM DONE APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n\n this.resultingModel.addRule(parameter);\n //System.out.println(this.resultingModel.name);\n this.resultingModel.addOutputInPath();\n }", "private void learn() {\n\t\tupdateValues();\n\t\tif(CFG.isUpdatedPerformanceHistory()){\n\t\t\tupdateHistory();\n\t\t}\n\t\tif(CFG.isEvaluated()) evaluate();\n\t}", "private TraversalResult traverseAction(DeterministicBoardStateNode current, String currentState, String action, int depth, double sampleRate, double maxSamples,\n boolean filterLethal, RNGBoardStateNode nextRNG) {\n ResolutionResult result = this.b.executePlayerAction(new StringTokenizer(action));\n BoardStateNode node;\n double nextMaxSamples = maxSamples;\n double nextSampleRate = sampleRate;\n if (depth + 1 >= SAMPLING_MIN_DEPTH) {\n if (depth + 1 == SAMPLING_MIN_DEPTH) {\n nextMaxSamples = this.config.maxSamples;\n } else {\n nextMaxSamples = maxSamples * this.config.maxSamplesMultiplier;\n }\n nextSampleRate = sampleRate * current.getWeightedProportionOfAction(action) * this.config.sampleRateMultiplier;\n }\n if (result.rng) {\n // the number of trials we've already done to get to this node\n int cumTrials = 0;\n if (nextRNG != null) {\n String state = this.b.stateToString();\n UUID stateHash = UUID.nameUUIDFromBytes(state.getBytes());\n cumTrials += nextRNG.getCount(this.nodeMap.get(stateHash));\n }\n nextSampleRate *= 1 - (this.config.rngPenalty * Math.pow(this.config.rngPenaltyReduction, cumTrials));\n }\n if (this.b.getWinner() != 0 || depth == SAMPLING_MAX_DEPTH) {\n // no more actions can be taken\n node = new TerminalBoardStateNode(current.team, evaluateAdvantage(this.b, current.team));\n if (!result.rng && this.b.getWinner() == current.team) {\n current.lethal = true; // the current node has an action that results in a lethal 100% of the time\n }\n } else if (Integer.parseInt(action.substring(0, 1)) == EndTurnAction.ID || this.b.getCurrentPlayerTurn() != current.team) {\n // assess what's the worst the opponent can do\n if (filterLethal) {\n // not part of my pay grade\n node = new TerminalBoardStateNode(current.team * -1, evaluateAdvantage(this.b, current.team * -1));\n } else {\n node = this.getBestTurn(current.team * -1, depth + 1,\n Math.max(nextSampleRate, this.config.enemySampleRate),\n Math.max(nextMaxSamples, this.config.maxSamplesEnemy),\n true);\n }\n } else {\n DeterministicBoardStateNode dbsn = this.getBestTurn(current.team, depth + 1, nextSampleRate, nextMaxSamples, filterLethal);\n if (dbsn == null) {\n // something went wrong, here's a bandaid\n node = new TerminalBoardStateNode(current.team, evaluateAdvantage(this.b, current.team));\n } else {\n if (dbsn.lethal) {\n current.lethal = true; // the current node has an action that leads to a node that eventually results in lethal\n }\n node = dbsn;\n }\n }\n List<Event> undoStack = new LinkedList<>(result.events);\n while (!undoStack.isEmpty()) {\n undoStack.get(undoStack.size() - 1).undo(this.b);\n undoStack.remove(undoStack.size() - 1);\n }\n // aura difference checking isn't updated by undoing, we have to update it ourselves\n this.b.updateAuraLastCheck();\n this.b.updateDependentStatsLastCheck();\n String stateAfterUndo = this.b.stateToString();\n if (!currentState.equals(stateAfterUndo)) {\n System.out.println(\n \"Discrepancy after executing \" + action + \", rng = \" + result.rng + \", depth = \" + depth);\n for (Event e : result.events) {\n System.out.print(e.toString());\n }\n System.out.println(\"Before:\");\n System.out.println(currentState);\n System.out.println(\"After:\");\n System.out.println(stateAfterUndo);\n throw new RuntimeException();\n }\n return new TraversalResult(node, result.rng);\n }", "private Action bestActionFromFinishedTree() {\n return Collections.max(validActionsDiscretized, Comparator.comparing(\n c -> root.getActionReward(c) / (double) root.getActionVisits(c)));\n }", "public static void studentText(){\n\t\tSystem.out.println(\"Enter: 1.'EXIT' 2.'ADD' 3.'REMOVE' 4.'FIND 5.'ENROLL' 6.'WITHDRAW' 7.'SCHEDULE' 8.'MORE' -for more detail about options\");\n\t}", "public java.lang.Integer getActionFrequency() {\r\n return actionFrequency;\r\n }", "private void makeValidActionsDiscretized() {\n validActionsDiscretized = new ArrayList<>();\n\n List<ActionType> actionTypes = problemSpec.getLevel().getAvailableActions();\n\n // Valid tire pressures\n List<TirePressure> tirePressures = Arrays.asList(\n TirePressure.FIFTY_PERCENT,\n TirePressure.SEVENTY_FIVE_PERCENT,\n TirePressure.ONE_HUNDRED_PERCENT\n );\n\n // Valid fuel levels (note that this is an arbitrary discretization)\n List<Integer> fuelLevels = new ArrayList<>();\n int fuelInterval = ProblemSpec.FUEL_MAX / FUEL_DISCRETE_INTERVALS;\n\n for (int i = 0; i < FUEL_DISCRETE_INTERVALS; i++) {\n fuelLevels.add(fuelInterval * i);\n }\n\n // Go through A1-A8 and add all possible combinations of the parameters\n for (ActionType actionType : actionTypes) {\n switch (actionType.getActionNo()) {\n case 1:\n validActionsDiscretized.add(new Action(actionType));\n break;\n\n case 2:\n for (String car : problemSpec.getCarOrder()) {\n validActionsDiscretized.add(new Action(actionType, car));\n }\n\n break;\n\n case 3:\n for (String driver : problemSpec.getDriverOrder()) {\n validActionsDiscretized.add(new Action(actionType, driver));\n }\n\n break;\n\n case 4:\n for (Tire tire : problemSpec.getTireOrder()) {\n validActionsDiscretized.add(new Action(actionType, tire));\n }\n\n break;\n\n case 5:\n for (int fuel : fuelLevels) {\n validActionsDiscretized.add(new Action(actionType, fuel));\n }\n\n break;\n\n case 6:\n for (TirePressure pressure : tirePressures) {\n validActionsDiscretized.add(new Action(actionType, pressure));\n }\n\n break;\n case 7:\n for (String car : problemSpec.getCarOrder()) {\n for (String driver : problemSpec.getDriverOrder()) {\n validActionsDiscretized.add(new Action(actionType, car, driver));\n }\n }\n\n break;\n\n case 8:\n for (TirePressure pressure : tirePressures) {\n for (int fuel : fuelLevels) {\n for (Tire tire : problemSpec.getTireOrder()) {\n validActionsDiscretized.add(new Action(actionType, tire, fuel,\n pressure));\n }\n }\n }\n\n break;\n }\n }\n }", "private void showFacts() {\n\t\tSystem.out.println(\"=============================\");\n\t\tSystem.out.println(\"Your lose! Try harder and better luck next time.\");\n\t}", "private boolean checkForAction(){\n IndividualAction thisAction = checkTriggers();\n if(thisAction.getTriggers() == null){\n return false;\n }\n if(!checkSubjects(thisAction.getSubjects())){\n return false;\n }\n doConsumed(thisAction.getConsumed());\n doProduce(thisAction.getProduced());\n results.add(thisAction.getNarration());\n\n return true;\n }", "private void setupActions(MediatorListener mediator) {\n\n\t\tProperties hotKeysProperties = null;\n\t\tString fileName = \"hotkeys.properties\";\n\t\ttry {\n\t\t\thotKeysProperties = readPropertiesFromClassPath(fileName);\n\t\t} catch (Exception e) {\n\t\t\thotKeysProperties = new Properties();\n\t\t\thotKeysProperties.put(\"Hotkey.Gui.BaselineMode\", \"B\");\n\t\t\thotKeysProperties.put(\"Hotkey.Gui.Attending\", \"A\");\n\t\t\thotKeysProperties.put(\"Hotkey.Gui.Independent\", \"1\");\n\t\t\thotKeysProperties.put(\"Hotkey.Gui.Verbal\", \"2\");\n\t\t\thotKeysProperties.put(\"Hotkey.Gui.Modeling\", \"3\");\n\t\t\thotKeysProperties.put(\"Hotkey.Gui.NoAnswer\", \"4\");\n\t\t\thotKeysProperties.put(\"Hotkey.Gui.WrongAnswer\", \"5\");\n\t\t\tlog.warn(String.format(\n\t\t\t\t\t\"Problem reading %s. Defaulting hotkeysPropteries=%s\",\n\t\t\t\t\tfileName, hotKeysProperties), e);\n\t\t}\n\n\t\tString hk = (String) hotKeysProperties.get(\"Hotkey.Gui.BaselineMode\");\n\n\t\tbaselineModeAction = new ActionRecorder(Messages\n\t\t\t\t.getString(\"Gui.BaselineMode\"), null, //$NON-NLS-1$\n\t\t\t\tMessages.getString(\"Gui.BaselineModeDescription\"), new Integer( //$NON-NLS-1$\n\t\t\t\t\t\tKeyEvent.VK_F1), KeyStroke.getKeyStroke(hk),\n\t\t\t\tAction.BASELINE_MODE, mediator);\n\n\t\thk = (String) hotKeysProperties.get(\"Hotkey.Gui.Attending\");\n\n\t\tattendingAction = new ActionRecorder(Messages\n\t\t\t\t.getString(\"Gui.Attending\"), null, //$NON-NLS-1$\n\t\t\t\tMessages.getString(\"Gui.AttendingDescription\"), new Integer( //$NON-NLS-1$\n\t\t\t\t\t\tKeyEvent.VK_F1), KeyStroke.getKeyStroke(hk),\n\t\t\t\tAction.ATTENDING, mediator);\n\n\t\thk = (String) hotKeysProperties.get(\"Hotkey.Gui.Independent\");\n\n\t\tindependentAction = new ActionRecorder(Messages\n\t\t\t\t.getString(\"Gui.Independent\"), null, //$NON-NLS-1$\n\t\t\t\tMessages.getString(\"Gui.IndependentDescription\"), new Integer( //$NON-NLS-1$\n\t\t\t\t\t\tKeyEvent.VK_F2), KeyStroke.getKeyStroke(hk),\n\t\t\t\tAction.INDEPENDENT, mediator);\n\n\t\thk = (String) hotKeysProperties.get(\"Hotkey.Gui.Verbal\");\n\n\t\tverbalAction = new ActionRecorder(\n\t\t\t\tMessages.getString(\"Gui.Verbal\"), null, //$NON-NLS-1$\n\t\t\t\tMessages.getString(\"Gui.VerbalDescription\"), //$NON-NLS-1$\n\t\t\t\tnew Integer(KeyEvent.VK_F3), KeyStroke.getKeyStroke(hk),\n\t\t\t\tAction.VERBAL, mediator);\n\n\t\thk = (String) hotKeysProperties.get(\"Hotkey.Gui.Modeling\");\n\n\t\tmodelingAction = new ActionRecorder(\n\t\t\t\tMessages.getString(\"Gui.Modeling\"), null, //$NON-NLS-1$\n\t\t\t\tMessages.getString(\"Gui.ModelingDescriptin\"), new Integer( //$NON-NLS-1$\n\t\t\t\t\t\tKeyEvent.VK_F4), KeyStroke.getKeyStroke(hk),\n\t\t\t\tAction.MODELING, mediator);\n\n\t\thk = (String) hotKeysProperties.get(\"Hotkey.Gui.NoAnswer\");\n\n\t\tnoAnswerAction = new ActionRecorder(\n\t\t\t\tMessages.getString(\"Gui.NoAnswer\"), null, //$NON-NLS-1$\n\t\t\t\tMessages.getString(\"Gui.NoAnswerDescription\"), new Integer(KeyEvent.VK_F5), //$NON-NLS-1$\n\t\t\t\tKeyStroke.getKeyStroke(hk), Action.NO_ANSWER, mediator);\n\n\t\thk = (String) hotKeysProperties.get(\"Hotkey.Gui.WrongAnswer\");\n\t\twrongAnswerAction = new ActionRecorder(\n\t\t\t\tMessages.getString(\"Gui.WrongAnswer\"), null, //$NON-NLS-1$\n\t\t\t\tMessages.getString(\"Gui.WrongAnswerDescription\"), new Integer(KeyEvent.VK_F5), //$NON-NLS-1$\n\t\t\t\tKeyStroke.getKeyStroke(hk), Action.WRONG_ANSWER, mediator);\n\n\t\ttoggleButtonsAction = new ActionRecorder(\n\t\t\t\tMessages.getString(\"Gui.ToggleButtons\"), null, //$NON-NLS-1$\n\t\t\t\tMessages.getString(\"Gui.ToggleButtons.Description\"), new Integer(KeyEvent.VK_L), //$NON-NLS-1$\n\t\t\t\tKeyStroke.getKeyStroke(\"T\"), Action.TOGGLE_BUTTONS, mediator);\n\n\t\tquitAction = new ActionRecorder(\n\t\t\t\tMessages.getString(\"Gui.Quit\"), null, //$NON-NLS-1$\n\t\t\t\tMessages.getString(\"Gui.QuitDescriptino\"), new Integer(KeyEvent.VK_L), //$NON-NLS-1$\n\t\t\t\tKeyStroke.getKeyStroke(\"control Q\"), Action.QUIT, mediator);\n\n\t\ttimerAction = new ActionRecorder(\n\t\t\t\tMessages.getString(\"Gui.TimerSwing\"), null, //$NON-NLS-1$\n\t\t\t\t\"Quit (Exit) the program\", new Integer(KeyEvent.VK_L), //$NON-NLS-1$\n\t\t\t\tKeyStroke.getKeyStroke(\"control F2\"), Action.TIMER, mediator);\n\n\t\ttimerBetweenAction = new ActionRecorder(Messages\n\t\t\t\t.getString(\"Gui.TimerBetweenSwing\"), null, //$NON-NLS-1$\n\t\t\t\t\"Quit (Exit) the program\", new Integer(KeyEvent.VK_L), //$NON-NLS-1$\n\t\t\t\tKeyStroke.getKeyStroke(\"control F2\"), Action.BETWEEN_TIMER,\n\t\t\t\tmediator);\n\n\t\ttimerTimeDelayAutoAdvance = new ActionRecorder(Messages\n\t\t\t\t.getString(\"Gui.TimeDelayAutoAdvance\"), null, //$NON-NLS-1$\n\t\t\t\t\"xxxxxxxxxxxxxx\", new Integer(KeyEvent.VK_L), //$NON-NLS-1$\n\t\t\t\tKeyStroke.getKeyStroke(\"control F2\"),\n\t\t\t\tAction.CHANGE_DELAY_TIMER, mediator);\n\n\t\topenAction = new ActionRecorder(Messages.getString(\"Gui.Open\"), null, //$NON-NLS-1$\n\t\t\t\tMessages.getString(\"Gui.OpenDescription\"), //$NON-NLS-1$\n\t\t\t\tnew Integer(KeyEvent.VK_L),\n\t\t\t\tKeyStroke.getKeyStroke(\"control O\"), Action.OPEN, mediator);\n\n\t\tshowLoggingFrameAction = new ActionRecorder(\n\t\t\t\tMessages.getString(\"Gui.Open.ShowLoggingFrame\"), null, //$NON-NLS-1$\n\t\t\t\tMessages.getString(\"Gui.ShowLoggingFrameDescription\"), //$NON-NLS-1$\n\t\t\t\tnew Integer(KeyEvent.VK_L),\n\t\t\t\tKeyStroke.getKeyStroke(\"control D\"), Action.SHOW_LOGGING_FRAME,\n\t\t\t\tmediator);\n\n\t}", "public String getActionInfo() {\n\n String\taction\t= getAction();\n\n if (ACTION_AppsProcess.equals(action)) {\n return \"Process:AD_Process_ID=\" + getAD_Process_ID();\n } else if (ACTION_DocumentAction.equals(action)) {\n return \"DocumentAction=\" + getDocAction();\n } else if (ACTION_AppsReport.equals(action)) {\n return \"Report:AD_Process_ID=\" + getAD_Process_ID();\n } else if (ACTION_AppsTask.equals(action)) {\n return \"Task:AD_Task_ID=\" + getAD_Task_ID();\n } else if (ACTION_SetVariable.equals(action)) {\n return \"SetVariable:AD_Column_ID=\" + getAD_Column_ID();\n } else if (ACTION_SubWorkflow.equals(action)) {\n return \"Workflow:MPC_Order_Workflow_ID=\" + getMPC_Order_Workflow_ID();\n } else if (ACTION_UserChoice.equals(action)) {\n return \"UserChoice:AD_Column_ID=\" + getAD_Column_ID();\n } else if (ACTION_UserWorkbench.equals(action)) {\n return \"Workbench:?\";\n } else if (ACTION_UserForm.equals(action)) {\n return \"Form:AD_Form_ID=\" + getAD_Form_ID();\n } else if (ACTION_UserWindow.equals(action)) {\n return \"Window:AD_Window_ID=\" + getAD_Window_ID();\n }\n\n /*\n * else if (ACTION_WaitSleep.equals(action))\n * return \"Sleep:WaitTime=\" + getWaitTime();\n */\n return \"??\";\n\n }", "public interface IIQActions {\n void think();\n Knowledge learn(Knowledge source, Knowledge dest);\n}", "@Test\n public void testRun_DecisionOtherwise_IN_A1_D_A3_FN() {\n // Final node creation\n final Node fn = NodeFactory.createNode(\"#6\", NodeType.FINAL);\n\n // Action node 3 (id #5) creation and flow to final node\n final String A3_ID = \"#5\";\n final Node an3 = NodeFactory.createNode(A3_ID, NodeType.ACTION);\n final ExecutableActionMock objAn3 = ExecutableActionMock.create(KEY, A3_ID);\n ((ContextExecutable) an3).setObject(objAn3);\n ((ContextExecutable) an3).setMethod(objAn3.getPutIdInContextMethod());\n ((SingleControlFlowNode) an3).setFlow(fn);\n\n // Action node 2 (id #4) creation and flow to final node\n final String A2_ID = \"#4\";\n final Node an2 = NodeFactory.createNode(A2_ID, NodeType.ACTION);\n final ExecutableActionMock objAn2 = ExecutableActionMock.create(KEY, A2_ID);\n ((ContextExecutable) an2).setObject(objAn2);\n ((ContextExecutable) an2).setMethod(objAn2.getPutIdInContextMethod());\n ((SingleControlFlowNode) an2).setFlow(fn);\n\n final String A1_KEY = \"a1_key\";\n final String A1_ID = \"#2\";\n\n // Decision node (id #3) creation\n final Node dNode = NodeFactory.createNode(\"#3\", NodeType.DECISION);\n // Flow control from decision to action node 2 (if KEY == #2 goto A2)\n Map<FlowCondition, Node> flows = new HashMap<>(1);\n final FlowCondition fc2a2 = new FlowCondition(A1_KEY, ConditionType.EQ, \"ANYTHING WRONG\");\n flows.put(fc2a2, an2);\n // Otherwise, goto A3\n ((ConditionalControlFlowNode) dNode).setFlows(flows, an3);\n\n // Action node 1 (id #2) creation. Sets the context to be used by the decision\n final Node an1 = NodeFactory.createNode(A1_ID, NodeType.ACTION);\n final ExecutableActionMock objAn1 = ExecutableActionMock.create(A1_KEY, A1_ID);\n ((ContextExecutable) an1).setObject(objAn1);\n ((ContextExecutable) an1).setMethod(objAn1.getPutIdInContextMethod());\n ((SingleControlFlowNode) an1).setFlow(dNode);\n\n // Initial node (id #1) creation and flow to action node 1\n final Node iNode = NodeFactory.createNode(\"#1\", NodeType.INITIAL);\n ((SingleControlFlowNode) iNode).setFlow(an1);\n\n final Jk4flowWorkflow wf = Jk4flowWorkflow.create(iNode);\n\n ENGINE.run(wf);\n\n Assert.assertEquals(A3_ID, wf.getContext().get(KEY));\n }", "public static void better() {\n System.out.println(\"I am 'efficient'\");\n }", "@Given(\"Iam offered with referal bonus\")\r\n\tpublic void iam_offered_with_referal_bonus() {\n\t\tSystem.out.println(\"code for referal bonus\");\r\n\t}", "private String runRecommendation(LeagueOfLegendsAccount account, String difficultyLevel) {\r\n if (difficultyLevel.equals(\"Beginner\")) {\r\n return championRecommendation(account, \"Beginner\");\r\n } else if (difficultyLevel.equals(\"Novice\")) {\r\n return championRecommendation(account, \"Novice\");\r\n } else if (difficultyLevel.equals(\"Advanced\")) {\r\n return championRecommendation(account, difficultyLevel);\r\n } else {\r\n return \"Not an existing classification of difficulty (Beginner, Novice, Advanced)\";\r\n }\r\n }", "@Override\n\tpublic boolean takeAction(Game game)\n\t{\n\t\tif(!this.checkAction(game))\n\t\t\tthrow new IllegalStateException(\"Not enough Quick actions\");\n\t\tif(game.getCurrentPlayer().checkCoins(3))\n\t\t{\n\t\t\tgame.getCurrentPlayer().setAssistants(game.getCurrentPlayer().getAssistants()+1);\n\t\t\tgame.decrementQuickActionCounter();\n\t\t\tsuper.takeAction(game);\n\t\t\treturn true;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tthrow new IllegalStateException(\"Not enough coins to engage an assistant. An assistant costs 3 coins\");\n\t\t}\n\t\t\n\t\t\n\t}", "protected void firstStep() {\n if (!condition.equals(\"fm\") && !condition.equals(\"cfs\")) throw new RuntimeException(\"Unknown condition: \"\r\n + condition);\r\n if (rating.condition == null || rating.condition.length() == 0) ratingUpdateString(\"condition\", condition);\r\n\r\n panel.add(new InlineHTML(\"<br/>\"));\r\n panel.add(new InlineHTML(\"Web site:\"));\r\n panel.add(textInput(\"webSite\"));\r\n panel.add(new HTML(\"If you know the web site of the \" + rating._doctor.firstName + \" \"\r\n + rating._doctor.lastName + \", please enter it here.\"));\r\n panel.add(new InlineHTML(\"<br/>\"));\r\n\r\n panel.add(new HTML(\"TYPE OF HEALTH PROFESSIONAL\"));\r\n panel.add(ratingBox(\"type\", \"Family Physician / Internist\",\r\n \"Family Physician / General Internal Medicine\"));\r\n// for (String title : Arrays.asList(\"Family Physician\", \"General Internal Medicine\")) {\r\n// panel.add(ratingBox(\"type\", title, null));\r\n// panel.add(new InlineHTML(\"<br/>\"));\r\n// }\r\n panel.add(h2(new HTML(\r\n \"<b>SPECIALISTS</b>: These doctors often require a physician's recommendation to be seen.\")));\r\n for (String title : Arrays.asList(\"Allergist\", \"Cardiologist\", \"Dentist\", \"Endocrinologist\",\r\n \"Gastroenterologist\", \"Gynecologist\", \"Immunologist\", \"Infectious Disease Specialist\", \"Neurologist\",\r\n \"Orthopedist\", \"Ear, Nose and Throat Physician\", \"Pain Management Specialist\", \"Pediatrician\",\r\n \"Physical Therapist and Rehabilitation Specialist\",\r\n \"Psychological Counselor (psychiatrist, psychologist, social worker, etc.)\", \"Rheumatologist\",\r\n \"Sleep Specialist\", \"Sports Medicine Doctor\", \"Not Sure\")) {\r\n panel.add(ratingBox(\"type\", title, null));\r\n panel.add(new InlineHTML(\"<br/>\"));\r\n }\r\n\r\n panel.add(new InlineHTML(\"Other \"));\r\n panel.add(textInput(\"typeSpecialistOther\"));\r\n\r\n panel.add(h2(new HTML(\"<b>ALTERNATIVE HEALTH PRACTITIONERS</b>\")));\r\n for (String title : Arrays.asList(\"MD with an Alternative Focus\", \"Acupressurist\", \"Acupuncturist\",\r\n \"Alexander Technique Practitioner\", \"Amygdala Retrainer\", \"Aromatherapist\", \"Aryuveda practitioner\",\r\n \"Bach Flower\", \"Chinese Medicine Specialist\", \"Chiropracter\", \"Colon/Hydrotherapist\",\r\n \"Cranio-sacral Therapist\", \"Emotional Freedom Technique (EFT) Practitioner\",\r\n \"Energy Healing Practitioner\", \"Environmental Medicine\", \"Feldenkrais Practitioner\", \"Herbalist\",\r\n \"Homeopathist\", \"Hypnotherapist\", \"Kinesiologist\", \"Lightning Process Practitioner\",\r\n \"Macrobiotic Practitioner\", \"Massage Therapist\",\r\n \"Mindfulness Based Stress Reduction (MBSR) Practitioner\", \"Naturopathist\",\r\n \"Nambudripad Allergy Technique (NAET) Practitioner\", \"Neuro-linguistic Programmer\", \"Nutritionist\",\r\n \"Orthomolecular Medicine\", \"Osteopath\", \"Qigong Practitioner\", \"Reiki Practitioner\", \"Reflexologist\",\r\n \"Spiritual Healer\", \"Rolfer\")) {\r\n panel.add(ratingBox(\"type\", title, null));\r\n panel.add(new InlineHTML(\"<br/>\"));\r\n }\r\n\r\n panel.add(new InlineHTML(\"Other \"));\r\n panel.add(textInput(\"typeAlternativeOther\"));\r\n panel.add(new InlineHTML(\"<br/>\"));\r\n\r\n panel.add(wizardNavigation(null));\r\n }", "public static int simpleAction(String str)\n {\n if (str.equalsIgnoreCase(\"Y\") || str.equalsIgnoreCase(\"Yes\")) //your actions are yes\n {\n return 1;\n }\n else if (str.equalsIgnoreCase(\"N\") || str.equalsIgnoreCase(\"No\")) // your actions are no\n {\n return 0;\n }\n else\n {\n return 2;\n }\n }", "protected HashSet<GoapAction> extractPossibleActions() {\r\n\t\tHashSet<GoapAction> possibleActions = new HashSet<GoapAction>();\r\n\r\n\t\ttry {\r\n\t\t\tfor (GoapAction goapAction : this.goapUnit.getAvailableActions()) {\r\n\t\t\t\tif (goapAction.checkProceduralPrecondition(this.goapUnit)) {\r\n\t\t\t\t\tpossibleActions.add(goapAction);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn possibleActions;\r\n\t}", "private void act() {\n\t\tmyAction.embodiment();\n\t}", "private double individualEvaluation() {\n\t\t//System.out.println(\"indE\"+ myValues.get(myAction.getPurpose()).getStrength(null));\n\t\treturn myValues.get(myAction.getPurpose()).getStrength(null);\n\t}", "@Override\n\tpublic void Examinar() {\n\t\tSystem.out.println(\"\\nEsta preguiça emite o som tec tec tec ao ser examinada\\n\");\t\n\t}", "public static void printUserGuide() {\n System.out.println(Message.USER_COMMAND_GUIDE);\n System.out.println(\"Go ahead!\");\n }", "@SkylarkModule(\n name = \"feedback.action\",\n doc = \"An action that will be executed in a feedback workflow or on_finish hook\",\n category = SkylarkModuleCategory.TOP_LEVEL_TYPE,\n documented = false)\npublic interface Action {\n\n void run(SkylarkContext<?> context) throws ValidationException, RepoException;\n\n String getName();\n\n /** Returns a key-value ist of the options the action was instantiated with. */\n ImmutableSetMultimap<String, String> describe();\n}", "void useFeedbackCheckBoxMenuItem_actionPerformed(ActionEvent e) {\n filterType = FilterAgent.USE_PREDICTED_RATING;\n filterArticles();\n this.setTitle(titleBarText + \" - using Predicted Ratings\");\n }", "public String getITStandardsAndGuidelinesFeedbackActionTaskReference() {\n return iTStandardsAndGuidelinesFeedbackActionTaskReference;\n }", "@Override\r\n\tList<SDAction> getNextActions(SRParserState s, SDAction goldAct, IndexWord nextWord)\r\n\t{\r\n\t\tList<SDAction> l = new ArrayList<SDAction>();\r\n\t\tif (isEnd(s))\r\n\t\t{\r\n\t\t\tl.add(SDAction.END_STATE);\r\n\t\t\treturn l;\r\n\t\t}\r\n\r\n\t\tDepChunkTree ws0 = s.pstck[0];\r\n\t\tDepChunkTree ws1 = s.pstck[1];\r\n\t\t\r\n\t\tUnsegmentedSentence sent = s.sent;\r\n\t\tint sent_len = sent.length();\r\n\t\tint ws0c_size = ws0.children.size();\r\n\r\n//\t\tboolean bGoldArc = conf.getConf(\"gold-arc\");\r\n//\t\tif (bGoldArc && goldAct == Action.NOT_AVAILABLE)\r\n//\t\t\tgoldAct = (s.curidx < s.sent.length()) ? !(ws1 != null && ws1.isRoot()) ? Action.APPEND : Action.getShiftTagAction(\"NN\") : Action.REDUCE_RIGHT;\r\n//\t\tassert (!bGoldArc || goldAct != null && goldAct != Action.NOT_AVAILABLE);\r\n\r\n\t\t/* to avoid redundant validation of chunk and tag pair */\r\n\t\t\r\n\t\tboolean bValidated = false;\r\n\t\tboolean bValid = false;\r\n\t\t\r\n\t\t/* the condition for the shift/chunk actions to be applied */\r\n\t\t\r\n\t\tif (s.curidx < sent_len)\r\n\t\t{\r\n\t\t\tDecision ds = s.decision != null && s.curidx > 0 ? s.decision[s.curidx - 1] : Decision.NA;\r\n\r\n\t\t\tif (ds != Decision.SEGMENT && !ws0.isRoot() && ws0c_size == 0)\r\n\t\t\t\tif (!m_bValidateTag || m_dict.validateTagForSequence(sent.substring(s.idbgn, sent_len), ws0.tag, s.idend - s.idbgn + 1))\r\n\t\t\t\t\tl.add(SDAction.APPEND);\r\n\t\t\tif (ds != Decision.IN_WORD && (!m_bGoldArc || goldAct.isShiftTagAction() || goldAct == SDAction.APPEND || goldAct == SDAction.NOT_AVAILABLE))\r\n\t\t\t{\r\n\t\t\t\tif (ws0c_size > 0 || ws0.isRoot() ||\r\n\t\t\t\t\t\t(!m_bValidateTag || (bValidated = true) && (bValid = m_dict.validateTagForChunk(ws0.form, ws0.tag))))\r\n\t\t\t\t{\r\n\t\t\t\t\tString seq = sent.substring(s.curidx, sent_len);\r\n\t\t\t\t\tfor (String spqf1: m_dict.getTagCandidatesForSequence(seq))\r\n\t\t\t\t\t\tl.add(SDAction.getShiftTagAction(spqf1));\r\n\t\t\t\t}\r\n\t\t\t}\r\n//\t\t\tif (l.size() == 0) Console.writeLine(s.toString());\r\n\t\t\tassert (ds != Decision.NA || l.size() > 0);\r\n\t\t}\r\n\r\n\t\tif (m_bParse && ws1 != null)\r\n\t\t{\r\n\t\t\t/* If the word has a child, its tag has been already validated. */\r\n\t\t\tif (ws0c_size > 0 || s.idend < s.curidx ||\r\n\t\t\t\t\t(!m_bValidateTag || (!bValidated || bValid) && (bValidated || m_dict.validateTagForChunk(ws0.form, ws0.tag)) ))\r\n\t\t\t{\r\n\t\t\t\tif (!ws1.isRoot() && (!m_bGoldArc || goldAct == SDAction.REDUCE_LEFT || goldAct == SDAction.APPEND || goldAct == SDAction.NOT_AVAILABLE))\r\n\t\t\t\t\tl.add(SDAction.REDUCE_LEFT);\r\n\t\t\t\tif ((!ws1.isRoot() || s.curidx == sent_len) && (!m_bGoldArc || goldAct == SDAction.REDUCE_RIGHT || goldAct == SDAction.APPEND || goldAct == SDAction.NOT_AVAILABLE))\r\n\t\t\t\t\tl.add(SDAction.REDUCE_RIGHT);\r\n\t\t\t}\r\n\t\t}\r\n\r\n//\t\tif (l.size() == 0) Console.writeLine(s.toString());\r\n\t\tassert (!l.contains(null));\r\n\t\tassert (l.size() > 0);\r\n\t\t\r\n\t\treturn l;\r\n\t}", "public static void termsAndConditions() {\n refreshScreen();\n System.out.println(\"\\n\\n\\t\\t\\tTERMS AND CONDITIONS:\\n\\n\");\n \n transitionBuffer();\n }", "public final void ruleAction() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:117:2: ( ( ( rule__Action__Alternatives ) ) )\n // InternalCsv.g:118:2: ( ( rule__Action__Alternatives ) )\n {\n // InternalCsv.g:118:2: ( ( rule__Action__Alternatives ) )\n // InternalCsv.g:119:3: ( rule__Action__Alternatives )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getActionAccess().getAlternatives()); \n }\n // InternalCsv.g:120:3: ( rule__Action__Alternatives )\n // InternalCsv.g:120:4: rule__Action__Alternatives\n {\n pushFollow(FOLLOW_2);\n rule__Action__Alternatives();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getActionAccess().getAlternatives()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "private void appendAction(String action) {\n \t\tif (board.isSetupPhase())\n \t\t\treturn;\n \n \t\tif (actionLog == \"\")\n \t\t\tactionLog += \"→ \" + action;\n \t\telse\n \t\t\tactionLog += \"\\n\" + \"→ \" + action;\n \n \t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_lesson_one:\n lessonOneIntent();\n return true;\n case R.id.action_lesson_two:\n lessonTwoIntent();\n return true;\n case R.id.action_lesson_three:\n lessonThreeIntent();\n return true;\n case R.id.action_lesson_four:\n lessonFourIntent();\n return true;\n case R.id.action_lesson_five:\n lessonFiveIntent();\n return true;\n case R.id.action_lesson_six:\n lessonSixIntent();\n return true;\n case R.id.action_lesson_seven:\n lessonSevenIntent();\n return true;\n case R.id.action_lesson_eight:\n lessonEightIntent();\n return true;\n case R.id.action_lesson_nine:\n lessonNineIntent();\n return true;\n case R.id.action_lesson_ten:\n lessonTenIntent();\n return true;\n case R.id.action_lesson_eleven:\n lessonElevenIntent();\n return true;\n case R.id.action_lesson_twelve:\n lessonTwelveIntent();\n return true;\n case R.id.action_lesson_thirteen:\n lessonThirteenIntent();\n return true;\n case R.id.action_lesson_fourteen:\n lessonFourteenIntent();\n return true;\n case R.id.action_lesson_fifteen:\n lessonFifteenIntent();\n return true;\n case R.id.action_lesson_sixteen:\n lessonSixteenIntent();\n return true;\n case R.id.action_lesson_seventeen:\n lessonSeventeenIntent();\n return true;\n case R.id.action_lesson_eighteen:\n lessonEighteenIntent();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "public void accomplishGoal() {\r\n isAccomplished = true;\r\n }", "public String getTotalLearnlabActions() {\n return this.totalLearnlabActions;\n }", "public void train() {\n while (!environment.inTerminalState()) {\n\n Action action = policy.chooseAction(environment);\n List<Double> stateAction = environment.getStateAction(action);\n\n double knownReward = environment.immediateReward(action);\n double totalReward = environment.performAction(action);\n double unknownReward = totalReward - knownReward;\n\n // Next state of environment is implicitly passed.\n backup(stateAction, unknownReward);\n }\n }", "public final Symbol CUP$parser$do_action(\n int CUP$parser$act_num,\n lr_parser CUP$parser$parser,\n java.util.Stack CUP$parser$stack,\n int CUP$parser$top)\n throws Exception\n {\n /* Symbol object for return from actions */\n Symbol CUP$parser$result;\n\n /* select the action based on the action number */\n switch (CUP$parser$act_num)\n {\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 45: // Condicion ::= AP Condicion CP\n {\n DosEtiquetas RESULT =null;\n\t\tint cleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;\n\t\tint cright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;\n\t\tDosEtiquetas c = (DosEtiquetas)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;\n\t\tRESULT = c;\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Condicion\",6, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 44: // Condicion ::= Condicion OR NT$10 Condicion\n {\n DosEtiquetas RESULT =null;\n // propagate RESULT from NT$10\n RESULT = (DosEtiquetas) ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;\n\t\tint c1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;\n\t\tint c1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;\n\t\tDosEtiquetas c1 = (DosEtiquetas)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;\n\t\tint c2left = ((Symbol)CUP$parser$stack.peek()).left;\n\t\tint c2right = ((Symbol)CUP$parser$stack.peek()).right;\n\t\tDosEtiquetas c2 = (DosEtiquetas)((Symbol) CUP$parser$stack.peek()).value;\n\t\tGenerator.salida(Generator.LABEL, null, null, c1.v()); Generator.salida(Generator.GOTO, null, null, c2.v()); RESULT = c2;\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Condicion\",6, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 43: // NT$10 ::=\n {\n DosEtiquetas RESULT =null;\n\t\tint c1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;\n\t\tint c1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;\n\t\tDosEtiquetas c1 = (DosEtiquetas)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;\nGenerator.salida(Generator.LABEL, null, null, c1.f());\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"NT$10\",19, ((Symbol)CUP$parser$stack.peek()), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 42: // Condicion ::= Condicion AND NT$9 Condicion\n {\n DosEtiquetas RESULT =null;\n // propagate RESULT from NT$9\n RESULT = (DosEtiquetas) ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;\n\t\tint c1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;\n\t\tint c1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;\n\t\tDosEtiquetas c1 = (DosEtiquetas)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;\n\t\tint c2left = ((Symbol)CUP$parser$stack.peek()).left;\n\t\tint c2right = ((Symbol)CUP$parser$stack.peek()).right;\n\t\tDosEtiquetas c2 = (DosEtiquetas)((Symbol) CUP$parser$stack.peek()).value;\n\t\tGenerator.salida(Generator.LABEL, null, null, c1.f()); Generator.salida(Generator.GOTO, null, null, c2.f()); RESULT = c2;\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Condicion\",6, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 41: // NT$9 ::=\n {\n DosEtiquetas RESULT =null;\n\t\tint c1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;\n\t\tint c1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;\n\t\tDosEtiquetas c1 = (DosEtiquetas)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;\nGenerator.salida(Generator.LABEL, null, null, c1.v());\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"NT$9\",18, ((Symbol)CUP$parser$stack.peek()), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 40: // Condicion ::= NOT Condicion\n {\n DosEtiquetas RESULT =null;\n\t\tint cleft = ((Symbol)CUP$parser$stack.peek()).left;\n\t\tint cright = ((Symbol)CUP$parser$stack.peek()).right;\n\t\tDosEtiquetas c = (DosEtiquetas)((Symbol) CUP$parser$stack.peek()).value;\n\t\tc.swap(); RESULT = c;\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Condicion\",6, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 39: // Condicion ::= Expresion GE Expresion\n {\n DosEtiquetas RESULT =null;\n\t\tint e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tString e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((Symbol)CUP$parser$stack.peek()).right;\n\t\tString e2 = (String)((Symbol) CUP$parser$stack.peek()).value;\n\t\tRESULT = new DosEtiquetas(); Generator.salida(Generator.IFGOTO, e1+\" < \", e2, RESULT.f()); Generator.salida(Generator.GOTO, null, null, RESULT.v());\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Condicion\",6, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 38: // Condicion ::= Expresion GT Expresion\n {\n DosEtiquetas RESULT =null;\n\t\tint e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tString e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((Symbol)CUP$parser$stack.peek()).right;\n\t\tString e2 = (String)((Symbol) CUP$parser$stack.peek()).value;\n\t\tRESULT = new DosEtiquetas(); Generator.salida(Generator.IFGOTO, e1+\" > \", e2, RESULT.v()); Generator.salida(Generator.GOTO, null, null, RESULT.f());\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Condicion\",6, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 37: // Condicion ::= Expresion LE Expresion\n {\n DosEtiquetas RESULT =null;\n\t\tint e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tString e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((Symbol)CUP$parser$stack.peek()).right;\n\t\tString e2 = (String)((Symbol) CUP$parser$stack.peek()).value;\n\t\tRESULT = new DosEtiquetas(); Generator.salida(Generator.IFGOTO, e1+\" > \", e2, RESULT.f()); Generator.salida(Generator.GOTO, null, null, RESULT.v());\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Condicion\",6, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 36: // Condicion ::= Expresion LT Expresion\n {\n DosEtiquetas RESULT =null;\n\t\tint e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tString e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((Symbol)CUP$parser$stack.peek()).right;\n\t\tString e2 = (String)((Symbol) CUP$parser$stack.peek()).value;\n\t\tRESULT = new DosEtiquetas(); Generator.salida(Generator.IFGOTO, e1+\" < \", e2, RESULT.v()); Generator.salida(Generator.GOTO, null, null, RESULT.f());\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Condicion\",6, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 35: // Condicion ::= Expresion NE Expresion\n {\n DosEtiquetas RESULT =null;\n\t\tint e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tString e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((Symbol)CUP$parser$stack.peek()).right;\n\t\tString e2 = (String)((Symbol) CUP$parser$stack.peek()).value;\n\t\tRESULT = new DosEtiquetas(); Generator.salida(Generator.IFGOTO, e1+\" == \", e2, RESULT.f()); Generator.salida(Generator.GOTO, null, null, RESULT.v());\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Condicion\",6, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 34: // Condicion ::= Expresion EQ Expresion\n {\n DosEtiquetas RESULT =null;\n\t\tint e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tString e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((Symbol)CUP$parser$stack.peek()).right;\n\t\tString e2 = (String)((Symbol) CUP$parser$stack.peek()).value;\n\t\tRESULT = new DosEtiquetas(); Generator.salida(Generator.IFGOTO, e1+\" == \", e2, RESULT.v()); Generator.salida(Generator.GOTO, null, null, RESULT.f());\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Condicion\",6, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 33: // Expresion ::= MENOS Expresion\n {\n String RESULT =null;\n\t\tint eleft = ((Symbol)CUP$parser$stack.peek()).left;\n\t\tint eright = ((Symbol)CUP$parser$stack.peek()).right;\n\t\tString e = (String)((Symbol) CUP$parser$stack.peek()).value;\n\t\tString temp = Generator.nuevaTemp(); Generator.salida(sym.MINUS, e, null, temp); RESULT = temp;\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Expresion\",2, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 32: // Expresion ::= ENTERO\n {\n String RESULT =null;\n\t\tint eleft = ((Symbol)CUP$parser$stack.peek()).left;\n\t\tint eright = ((Symbol)CUP$parser$stack.peek()).right;\n\t\tString e = (String)((Symbol) CUP$parser$stack.peek()).value;\n\t\tRESULT = e;\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Expresion\",2, ((Symbol)CUP$parser$stack.peek()), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 31: // Expresion ::= IDENT\n {\n String RESULT =null;\n\t\tint ileft = ((Symbol)CUP$parser$stack.peek()).left;\n\t\tint iright = ((Symbol)CUP$parser$stack.peek()).right;\n\t\tString i = (String)((Symbol) CUP$parser$stack.peek()).value;\n\t\tRESULT = i;\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Expresion\",2, ((Symbol)CUP$parser$stack.peek()), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 30: // Expresion ::= IDENT IGUAL Expresion\n {\n String RESULT =null;\n\t\tint ileft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint iright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tString i = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint eleft = ((Symbol)CUP$parser$stack.peek()).left;\n\t\tint eright = ((Symbol)CUP$parser$stack.peek()).right;\n\t\tString e = (String)((Symbol) CUP$parser$stack.peek()).value;\n\t\tRESULT = i; Generator.salida(sym.IDENT, e, null, i);\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Expresion\",2, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 29: // Expresion ::= AP Expresion CP\n {\n String RESULT =null;\n\t\tint eleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;\n\t\tint eright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;\n\t\tString e = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;\n\t\tRESULT = e;\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Expresion\",2, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 28: // Expresion ::= Expresion DIV Expresion\n {\n String RESULT =null;\n\t\tint e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tString e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((Symbol)CUP$parser$stack.peek()).right;\n\t\tString e2 = (String)((Symbol) CUP$parser$stack.peek()).value;\n\t\tString temp = Generator.nuevaTemp(); Generator.salida(sym.DIV, e1, e2, temp); RESULT = temp;\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Expresion\",2, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 27: // Expresion ::= Expresion POR Expresion\n {\n String RESULT =null;\n\t\tint e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tString e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((Symbol)CUP$parser$stack.peek()).right;\n\t\tString e2 = (String)((Symbol) CUP$parser$stack.peek()).value;\n\t\tString temp = Generator.nuevaTemp(); Generator.salida(sym.POR, e1, e2, temp); RESULT = temp;\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Expresion\",2, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 26: // Expresion ::= Expresion MENOS Expresion\n {\n String RESULT =null;\n\t\tint e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tString e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((Symbol)CUP$parser$stack.peek()).right;\n\t\tString e2 = (String)((Symbol) CUP$parser$stack.peek()).value;\n\t\tString temp = Generator.nuevaTemp(); Generator.salida(sym.MENOS, e1, e2, temp); RESULT = temp;\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Expresion\",2, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 25: // Expresion ::= Expresion MAS Expresion\n {\n String RESULT =null;\n\t\tint e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tString e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((Symbol)CUP$parser$stack.peek()).right;\n\t\tString e2 = (String)((Symbol) CUP$parser$stack.peek()).value;\n\t\tString temp = Generator.nuevaTemp(); Generator.salida(sym.MAS, e1, e2, temp); RESULT = temp;\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Expresion\",2, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 24: // prWHILE ::= WHILE\n {\n String RESULT =null;\n\t\tRESULT = Generator.nuevaLabel();\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"prWHILE\",5, ((Symbol)CUP$parser$stack.peek()), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 23: // prFOR ::= FOR\n {\n DosEtiquetas RESULT =null;\n\t\tRESULT = new DosEtiquetas();\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"prFOR\",7, ((Symbol)CUP$parser$stack.peek()), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 22: // prDO ::= DO\n {\n DosEtiquetas RESULT =null;\n\t\tRESULT = new DosEtiquetas();\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"prDO\",8, ((Symbol)CUP$parser$stack.peek()), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 21: // prELSE ::=\n {\n String RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"prELSE\",4, ((Symbol)CUP$parser$stack.peek()), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 20: // prELSE ::= ELSE Sentencia\n {\n String RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"prELSE\",4, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 19: // prIF ::= IF\n {\n String RESULT =null;\n\t\tRESULT = Generator.nuevaLabel();\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"prIF\",3, ((Symbol)CUP$parser$stack.peek()), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 18: // Sentencia ::= ALL Lista_de_Sent CLL\n {\n String RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Sentencia\",1, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 17: // Sentencia ::= PRINT AP Expresion CP PYC\n {\n String RESULT =null;\n\t\tint eleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint eright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tString e = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tGenerator.salida(sym.PRINT, null, null, e);\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Sentencia\",1, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 16: // Sentencia ::= prFOR AP Expresion NT$6 PYC Condicion NT$7 PYC Expresion NT$8 CP Sentencia\n {\n String RESULT =null;\n // propagate RESULT from NT$8\n RESULT = (String) ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint forrleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-11)).left;\n\t\tint forrright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-11)).right;\n\t\tDosEtiquetas forr = (DosEtiquetas)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-11)).value;\n\t\tint cleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left;\n\t\tint cright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).right;\n\t\tDosEtiquetas c = (DosEtiquetas)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-6)).value;\n\t\tGenerator.salida(Generator.GOTO, null, null, forr.f()); Generator.salida(Generator.LABEL, null, null, c.f());\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Sentencia\",1, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-11)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 15: // NT$8 ::=\n {\n String RESULT =(String) ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint forrleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-8)).left;\n\t\tint forrright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-8)).right;\n\t\tDosEtiquetas forr = (DosEtiquetas)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-8)).value;\n\t\tint cleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;\n\t\tint cright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;\n\t\tDosEtiquetas c = (DosEtiquetas)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;\nGenerator.salida(Generator.GOTO, null, null, forr.v()); Generator.salida(Generator.LABEL, null, null, c.v());\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"NT$8\",17, ((Symbol)CUP$parser$stack.peek()), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 14: // NT$7 ::=\n {\n String RESULT =(String) ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint forrleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left;\n\t\tint forrright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).right;\n\t\tDosEtiquetas forr = (DosEtiquetas)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-5)).value;\n\t\tint cleft = ((Symbol)CUP$parser$stack.peek()).left;\n\t\tint cright = ((Symbol)CUP$parser$stack.peek()).right;\n\t\tDosEtiquetas c = (DosEtiquetas)((Symbol) CUP$parser$stack.peek()).value;\nGenerator.salida(Generator.LABEL, null, null, forr.f());\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"NT$7\",16, ((Symbol)CUP$parser$stack.peek()), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 13: // NT$6 ::=\n {\n String RESULT =null;\n\t\tint forrleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint forrright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tDosEtiquetas forr = (DosEtiquetas)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\nGenerator.salida(Generator.LABEL, null, null, forr.v());\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"NT$6\",15, ((Symbol)CUP$parser$stack.peek()), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 12: // Sentencia ::= prDO NT$4 Sentencia WHILE AP Condicion CP NT$5 PYC\n {\n String RESULT =null;\n // propagate RESULT from NT$5\n RESULT = (String) ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;\n\t\tint dooleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-8)).left;\n\t\tint dooright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-8)).right;\n\t\tDosEtiquetas doo = (DosEtiquetas)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-8)).value;\n\t\tint cleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;\n\t\tint cright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;\n\t\tDosEtiquetas c = (DosEtiquetas)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Sentencia\",1, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-8)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 11: // NT$5 ::=\n {\n String RESULT =(String) ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-5)).value;\n\t\tint dooleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left;\n\t\tint dooright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).right;\n\t\tDosEtiquetas doo = (DosEtiquetas)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-6)).value;\n\t\tint cleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;\n\t\tint cright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;\n\t\tDosEtiquetas c = (DosEtiquetas)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;\nGenerator.salida(Generator.LABEL, null, null, c.v()); Generator.salida(Generator.GOTO, null, null, doo.v()); Generator.salida(Generator.LABEL, null, null, c.f());\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"NT$5\",14, ((Symbol)CUP$parser$stack.peek()), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 10: // NT$4 ::=\n {\n String RESULT =null;\n\t\tint dooleft = ((Symbol)CUP$parser$stack.peek()).left;\n\t\tint dooright = ((Symbol)CUP$parser$stack.peek()).right;\n\t\tDosEtiquetas doo = (DosEtiquetas)((Symbol) CUP$parser$stack.peek()).value;\nGenerator.salida(Generator.LABEL, null, null, doo.v());\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"NT$4\",13, ((Symbol)CUP$parser$stack.peek()), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 9: // Sentencia ::= prWHILE NT$2 AP Condicion NT$3 CP Sentencia\n {\n String RESULT =null;\n // propagate RESULT from NT$3\n RESULT = (String) ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint whileeleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left;\n\t\tint whileeright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).right;\n\t\tString whilee = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-6)).value;\n\t\tint cleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;\n\t\tint cright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;\n\t\tDosEtiquetas c = (DosEtiquetas)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;\n\t\tGenerator.salida(Generator.GOTO, null, null, whilee); Generator.salida(Generator.LABEL, null, null, c.f());\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Sentencia\",1, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 8: // NT$3 ::=\n {\n String RESULT =(String) ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint whileeleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;\n\t\tint whileeright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;\n\t\tString whilee = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;\n\t\tint cleft = ((Symbol)CUP$parser$stack.peek()).left;\n\t\tint cright = ((Symbol)CUP$parser$stack.peek()).right;\n\t\tDosEtiquetas c = (DosEtiquetas)((Symbol) CUP$parser$stack.peek()).value;\nGenerator.salida(Generator.LABEL, null, null, c.v());\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"NT$3\",12, ((Symbol)CUP$parser$stack.peek()), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 7: // NT$2 ::=\n {\n String RESULT =null;\n\t\tint whileeleft = ((Symbol)CUP$parser$stack.peek()).left;\n\t\tint whileeright = ((Symbol)CUP$parser$stack.peek()).right;\n\t\tString whilee = (String)((Symbol) CUP$parser$stack.peek()).value;\nGenerator.salida(Generator.LABEL, null, null, whilee);\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"NT$2\",11, ((Symbol)CUP$parser$stack.peek()), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 6: // Sentencia ::= prIF AP Condicion NT$0 CP Sentencia NT$1 prELSE\n {\n String RESULT =null;\n // propagate RESULT from NT$1\n RESULT = (String) ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;\n\t\tint iffleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left;\n\t\tint iffright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).right;\n\t\tString iff = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-7)).value;\n\t\tint cleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left;\n\t\tint cright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).right;\n\t\tDosEtiquetas c = (DosEtiquetas)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-5)).value;\n\t\tGenerator.salida(Generator.LABEL, null, null, iff);\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Sentencia\",1, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 5: // NT$1 ::=\n {\n String RESULT =(String) ((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint iffleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left;\n\t\tint iffright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).right;\n\t\tString iff = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-5)).value;\n\t\tint cleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;\n\t\tint cright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;\n\t\tDosEtiquetas c = (DosEtiquetas)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;\nGenerator.salida(Generator.GOTO, null, null, iff); Generator.salida(Generator.LABEL, null, null, c.f());\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"NT$1\",10, ((Symbol)CUP$parser$stack.peek()), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 4: // NT$0 ::=\n {\n String RESULT =null;\n\t\tint iffleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint iffright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tString iff = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint cleft = ((Symbol)CUP$parser$stack.peek()).left;\n\t\tint cright = ((Symbol)CUP$parser$stack.peek()).right;\n\t\tDosEtiquetas c = (DosEtiquetas)((Symbol) CUP$parser$stack.peek()).value;\nGenerator.salida(Generator.LABEL, null, null, c.v());\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"NT$0\",9, ((Symbol)CUP$parser$stack.peek()), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 3: // Sentencia ::= Expresion PYC\n {\n String RESULT =null;\n\t\tint eleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;\n\t\tint eright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;\n\t\tString e = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;\n\t\tRESULT = e;\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Sentencia\",1, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 2: // Lista_de_Sent ::= Lista_de_Sent Sentencia\n {\n String RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Lista_de_Sent\",0, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 1: // Lista_de_Sent ::= Sentencia\n {\n String RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"Lista_de_Sent\",0, ((Symbol)CUP$parser$stack.peek()), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 0: // $START ::= Lista_de_Sent EOF\n {\n Object RESULT =null;\n\t\tint start_valleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;\n\t\tint start_valright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;\n\t\tString start_val = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;\n\t\tRESULT = start_val;\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"$START\",0, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((Symbol)CUP$parser$stack.peek()), RESULT);\n }\n /* ACCEPT */\n CUP$parser$parser.done_parsing();\n return CUP$parser$result;\n\n /* . . . . . .*/\n default:\n throw new Exception(\n \"Invalid action number found in internal parse table\");\n\n }\n }", "private static boolean computeNextStep(FsmModel fsm, HashMap<Method, Double> actionsAndProbabilities) {\n double sum = 0;\n double rand = 0;\n HashMap<Method, Double> actionsReady = getActivableActions(fsm, actionsAndProbabilities);\n if (actionsReady.isEmpty()) {\n return false;\n }\n do {\n sum = 0;\n rand = Math.random();\n for (Method act : actionsReady.keySet()) {\n sum += actionsReady.get(act);\n if (rand <= sum) {\n try {\n System.out.println(\"\\nInvoking: \" + act.getName()) ;\n act.invoke(fsm);\n return true;\n } catch (IllegalAccessException e) {\n System.err.println(\"Illegal access to \" + act.getName());\n System.err.println(\"Shouldn't have happened\");\n // e.printStackTrace(System.err);\n } catch (InvocationTargetException e) {\n System.err.println(\"Exception on target invocation on \" + act.getName());\n System.err.println(\"Shouldn't have happened\");\n e.printStackTrace(System.err);\n }\n }\n }\n }\n while (rand > sum);\n\n return false;\n }", "private static void SecondUmpireReview() {\n\t\tSystem.out.println(\" Umpier Reviews the Score Board\");\n\t\t \n\t\t\n\t}", "@Override\n\tpublic int getSensorAction() {\n\t\tint astar = -1;\n\t\tdouble astarval = Double.POSITIVE_INFINITY;\n\t\tfor (int a : sensorActions) {\n\t\t\t// sum across possible observations\n\t\t\tdouble ysum = 0;\n\t\t\tfor (int y : observations) {\n\t\t\t\t// of the entropy\n\t\t\t\tdouble newEntropy = entropy(updateBeliefs(a,y));\n\t\t\t\tif (Double.isNaN(newEntropy))\n\t\t\t\t\tnewEntropy = currentEntropy;\n\t\t\t\t//double entropyReduction = currentEntropy - newEntropy;\n\t\t\t\t// weighted by the probability\n\t\t\t\t// which is the sum across all possible states of our belief in that state times the probability of getting the observation in that state\n\t\t\t\tdouble xsum = 0;\n\t\t\t\tfor (int ax = 0; ax < beliefs.length; ax++)\n\t\t\t\t\tfor (int ay = 0; ay < beliefs.length; ay++) {\n\t\t\t\t\t\txsum += beliefs[ax][ay] * world.observationProbability(y, a, ax, ay);\n\t\t\t\t\t}\n\t\t\t\tysum += xsum * newEntropy;\n\t\t\t}\n\t\t\tSystem.out.println(\"(EntropicExplorer) \" + world.actionToString(a) + \" : \" + ysum);\n\t\t\tif (ysum < astarval) {\n\t\t\t\tastarval = ysum;\n\t\t\t\tastar = a;\n\t\t\t}\n\t\t}\n\t\tlastSensorAction = astar;\n\t\tSystem.out.println(\"(EntropicExplorer) Choosing sensor action: \" + world.actionToString(astar));\n\t\treturn astar;\n\t}", "private void actOnRules() {\r\n\r\n\t\tfor(String key: myRuleBook.keySet())\r\n\t\t{\r\n\r\n\t\t\tRule rule = myRuleBook.get(key);\r\n\t\t\tSpriteGroup[] obedients = myRuleMap.get(rule);\r\n\r\n\t\t\tif(rule.isSatisfied(obedients))\r\n\t\t\t{\r\n\t\t\t\trule.enforce(obedients);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Action getBestAction(State state);", "private int debugCurrentActions(ClusterRegionStatus crs) {\n Map<ServerName, List<CompactAction>> serverCompactActions = getAllActions(crs);\n int totalActions = 0;\n for(ServerName name : serverCompactActions.keySet()) {\n log.info(\"Printing pending compaction actions for server \" + name.getHostname());\n for(CompactAction action : serverCompactActions.get(name)) {\n totalActions++;\n log.info(\"Want to perform \" + action);\n }\n }\n return totalActions;\n }", "public int nextAction() {\n double w = random.nextDouble();\n for (int i = 0; i < nMoves; i++) {\n if (w < probabilities[i]) {\n lastMove = i;\n break;\n }\n w -= probabilities[i];\n }\n nIters++;\n\n if (N_SELECTED_ACTIONS > 1) {\n lastNMoves.add(lastMove);\n if (lastNMoves.size() > N_SELECTED_ACTIONS)\n lastNMoves.poll();\n }\n\n if (LOGGING && nIters % 1000 == 0) {\n for (int i = 0; i < nMoves; i++)\n logWriter.printf(\"%.8f;\", probabilities[i]);\n logWriter.println();\n logWriter.flush();\n }\n\n return lastMove;\n }", "private static void ThridUmpireReview() {\n\t\tSystem.out.println(\" Umpier Reviews the Score Board\");\n\t\t \n\t\t\n\t}", "List<ActionDescriptor> listActionsSupported() throws IOException;", "private void goAdventure() {\n\n\t\tint experience = playern.getExp();\n\t\tint random = randomHelper.randomten();\n\n\t\t/**\n\t\t * Random part that starts with 10% occurance when user chooses goAdventuring()\n\t\t */\n\t\tif (random == 0) {\n\t\t\tSystem.out.println(\"You see nothing but unicorns running in the swaying grass..\");\n\t\t\tSystem.out.println(\"[press enter to continue]\");\n\t\t\tsc.nextLine();\n\t\t}\n\n\t\t/**\n\t\t * Chooses storyboard and battle depending on experience level\n\t\t */\n\t\tif (experience >= 40) {\n\t\t\tStoryboardTwo.leveltwo();\n\t\t\tbattleSpider();\n\t\t}else {\n\t\t\tStoryboard.intro();\n\t\t\tbattleVampire();\n\t\t}\n\t\t}" ]
[ "0.60562027", "0.5970901", "0.5904644", "0.58883816", "0.58261436", "0.57819146", "0.57774067", "0.57314324", "0.5665742", "0.56622475", "0.5659219", "0.55612046", "0.5535571", "0.5521024", "0.54636216", "0.54480934", "0.5431689", "0.5404585", "0.5393558", "0.538096", "0.53800386", "0.53774005", "0.53667307", "0.5363891", "0.5356219", "0.5336258", "0.531353", "0.5305905", "0.5286447", "0.52699935", "0.5266284", "0.5257865", "0.5246104", "0.52411366", "0.523937", "0.5234256", "0.52038664", "0.51548415", "0.5153863", "0.51465845", "0.5142053", "0.51270986", "0.51247513", "0.5117499", "0.5115874", "0.51054674", "0.5102834", "0.5100442", "0.5096044", "0.50810385", "0.50716585", "0.50681394", "0.5062586", "0.5061029", "0.5050169", "0.5043323", "0.50317454", "0.50250846", "0.5015712", "0.50137603", "0.4998012", "0.49924684", "0.49907878", "0.49851674", "0.49811804", "0.49736792", "0.4972", "0.49711588", "0.49702153", "0.49659842", "0.49630538", "0.49568975", "0.49567568", "0.49551472", "0.49537307", "0.49523935", "0.4943372", "0.49414888", "0.49348944", "0.4934791", "0.49342534", "0.49326104", "0.4931103", "0.4930253", "0.4926327", "0.49260184", "0.49252632", "0.49219367", "0.49181926", "0.49169666", "0.49166235", "0.49161282", "0.49088287", "0.49011797", "0.48967114", "0.48965886", "0.48965386", "0.4895661", "0.48910895", "0.48784697" ]
0.6615568
0
/ improved way to count paths with sum by keeping track of running sums from root for each node (O(N) time, O(N) space)
public static int countPathsWithSumWithHashMap(BinaryTreeNode<Integer> root, int sum) { HashMap<Integer, Integer> runningSumsCount = new HashMap<>(); return countPathsWithSumWithHashMapHelper(root, sum, 0, runningSumsCount); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int pathSumFrom(TreeNode node, int sum){\n if(node == null){\n return 0;\n }\n if(node.val == sum){\n // if the val in node is equal to sum we have found a path (node only)\n // and we check if we can add more nodes to the left and the right\n return 1 + pathSumFrom(node.left, sum-node.val) + pathSumFrom(node.right, sum-node.val);\n }\n else{\n return pathSumFrom(node.left, sum-node.val) + pathSumFrom(node.right, sum-node.val);\n }\n }", "int sumRootToLeafNumbers();", "static void k_paths(Node root, int k, HashMap<Integer, Integer> p, int sum) {\n\t\t// If root value and previous sum equal\n\t\t// to k then increase the count\n\t\tif (root != null) {\n\t\t\tif (root.data + sum == k) {\n\t\t\t\tres++;\n\t\t\t}\n\t\t\t// Add those values also which differs\n\t\t\t// by the current sum and root data by k\n\t\t\tres += p.get(sum + root.data - k) == null ? 0 : p.get(sum + root.data - k);\n\n\t\t\t// Insert the sum + root value in the map\n\t\t\tif (!p.containsKey(sum + root.data)) {\n\t\t\t\tp.put(sum + root.data, 0);\n\t\t\t}\n\t\t\tp.put(sum + root.data, p.get(sum + root.data) + 1);\n\n\t\t\t// Move to left and right trees\n\t\t\tk_paths(root.left, k, p, sum + root.data);\n\t\t\tk_paths(root.right, k, p, sum + root.data);\n\n\t\t\t// Remove the sum + root.data value\n\t\t\t// from the map if they are n not\n\t\t\t// required further or they do no\n\t\t\t// sum up to k in any way\n\t\t\tp.put(sum + root.data, p.get(sum + root.data) - 1);\n\t\t}\n\t}", "private static List<List<Integer>> pathSum(TreeNode root, int sum) {\n List<List<Integer>> result = new ArrayList<>();\n if (root == null) {\n return result;\n }\n List<Integer> path = new ArrayList<>();\n path.add(root.value);\n dfs(root, sum - root.value, result, path);\n return result;\n }", "public static void main(String[] args) {\n TreeNode root = new TreeNode(10);\n root.left = new TreeNode(5);\n root.right = new TreeNode(12);\n root.left.left = new TreeNode(4);\n root.left.right = new TreeNode(7);\n List<List<Integer>> result = pathSum(root, 22);\n for(List<Integer> i: result) {\n System.out.println(i);\n }\n }", "public static void main(String[] args) {\n TreeNode root = new TreeNode(-2);\n root.add(1);\n root.add(-3);\n\n List<List<Integer>> list = pathSum(root, -5);\n System.out.println(list.size());\n }", "public int sumNumbers(TreeNode root) {\n int solution = 0;\n\n String currentPath = \"\";\n\n // execute a dfs to find the leaf nodes\n findLeafNodes(root, currentPath);\n\n // loop through all the paths, convert to int, add to solution\n for(String curr:rootToLeafs){\n // save the current string as an integer\n int currentVal = Integer.parseInt(curr);\n\n // add the current value to the solution\n solution+=currentVal;\n }\n\n // return the solution\n return solution;\n }", "private int dfs_my(TreeNode root, int sum) {\n if (root == null) return 0;\n int rsum = dfs(root.right, sum);\n int oval = root.val;\n root.val += sum + rsum;\n int lsum = dfs(root.left, root.val);\n return oval + lsum + rsum;\n }", "private int dfs(TreeNode root, int sum) {\n if (root == null) return sum;\n int rsum = dfs(root.right, sum);\n root.val += rsum;\n return dfs(root.left, root.val);\n }", "public int maxPathSum(TreeNode root) {\n helper(root); \n //run the function but don't use the final return value\n //only save the \"result\" when we run the function\n return result;\n }", "public int sumNumbers(TreeNode root) {\n // track the sum that we want to add\n int solution = 0;\n\n // execute a dfs to find the leaf nodes\n solution = findLeafNodes(root, solution);\n\n // return the solution\n return solution;\n }", "public void noOfPaths(TreeNode<Integer> treeNode, List<List<Integer>> resultList, int val) {\n if (treeNode == null)\n return;\n queue.add(treeNode.getData());\n noOfPaths(treeNode.getLeftNode(), resultList, val);\n noOfPaths(treeNode.getRightNode(), resultList, val);\n\n int sum = 0;\n for (int index = queue.size()-1; index >= 0; index--) {\n sum += queue.get(index);\n if (val == sum) {\n List<Integer> oneSet = new ArrayList<>();\n for (int tempIndex = index; tempIndex < queue.size(); tempIndex++) {\n oneSet.add(queue.get(tempIndex));\n }\n resultList.add(oneSet);\n }\n }\n queue.remove(treeNode.getData());\n }", "public List<List<Integer>> pathSum(TreeNode root, int sum) {\n if(root==null)\n return res;\n dfs(root, sum, new ArrayList<Integer>());\n return res;\n }", "public int getNumberOfPaths(){ \r\n HashMap<FlowGraphNode, Integer> number = new HashMap<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n HashMap<FlowGraphNode, Integer> label = new HashMap<>();\r\n \r\n label.put(start,1);\r\n queue.add(start);\r\n do{\r\n FlowGraphNode node = queue.pop();\r\n for(FlowGraphNode child : node.to){\r\n int count = number.getOrDefault(child, child.inDeg()) -1;\r\n if(count == 0){\r\n queue.add(child);\r\n number.remove(child);\r\n //label\r\n int sum = 0;\r\n for(FlowGraphNode anc : child.from){\r\n sum += label.get(anc);\r\n }\r\n label.put(child,sum);\r\n }else{\r\n number.put(child, count);\r\n }\r\n }\r\n }while(!queue.isEmpty());\r\n \r\n if(!number.isEmpty()){\r\n //there has to be a loop in the graph\r\n return -1;\r\n }\r\n \r\n return label.get(end);\r\n }", "public static int sizeIterative(Node root) {\r\n\t\tif (root == null) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tint count = 0;\r\n\t\tQueue<Node> queue = new LinkedList<>();\r\n\t\tqueue.add(root);\r\n\t\twhile (!queue.isEmpty()) {\r\n\t\t\tNode temp = queue.poll();\r\n\t\t\tif (temp != null) {\r\n\t\t\t\tcount++;\r\n\t\t\t\tqueue.add(temp.left);\r\n\t\t\t\tqueue.add(temp.right);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "public static int dfs(TreeNode root, int sum){\n\t\tif(root.left == null && root.right == null){\r\n\t\t\treturn 10*sum + root.val;\r\n\t\t\t//result.add(sum);\r\n\t\t}\r\n\t\tif(root.left != null && root.right == null){\r\n\t\t\treturn dfs(root.left, 10*sum+root.val);\r\n\t\t}\r\n\t\tif(root.right != null && root.left == null){\r\n\t\t\treturn dfs(root.right, 10*sum+root.val);\r\n\t\t}\r\n\t\t//if(root.left != null && root.right != null){\r\n\t\t\treturn dfs(root.left, 10*sum+root.val)+dfs(root.right, 10*sum+root.val);\r\n\t\t//}\r\n\t\t//for(int i = 0; i < result.size(); i++){\r\n\t\t\t//System.out.print( result.get(i) + \"->\");\r\n\t\t//}\r\n\t}", "static int countSubtreesWithSumXUtil(Node root, int x)\n {\n int l = 0, r = 0;\n if(root == null) \n \treturn 0;\n l += countSubtreesWithSumXUtil(root.left, x);\n r += countSubtreesWithSumXUtil(root.right, x);\n if(l + r + root.data == x) \n \tcount++;\n if(ptr != root) \n \treturn l + root.data + r;\n return count;\n }", "public int sumNumbers(TreeNode root) {\n if(root == null)\n return 0;\n res = 0;\n sumnum(root,0);\n return res;\n }", "public static int countPaths(TreeNode root, int S) {\n if(root == null) return 0;\n return helper(root, S );\n }", "public List <List <Integer>> pathSum (TreeNode root, int sum) {\n List <List <Integer>> result = new ArrayList <> ();\n pathSum (root, sum, new ArrayList <Integer> (), result);\n return result;\n }", "public int minPathSum(int[][] grid) {\n if (grid==null || grid.length==0)\n return 0;\n int m = grid.length;\n int n = grid[0].length;\n for (int i=0; i<m; i++) {\n for (int j=0; j<n; j++) {\n if (i==0 && j==0)\n continue;\n int up = i > 0 ? grid[i-1][j] : Integer.MAX_VALUE;\n int left = j > 0 ? grid[i][j-1] : Integer.MAX_VALUE;\n grid[i][j] += (left > up ? up : left);\n }\n }\n return grid[m-1][n-1];\n }", "private boolean pathSum(TreeNode root, int i, int sum) {\n\t\tif(root==null)\n\t\t return false;\n\t\tif(root.left==null&&root.right==null)\n\t\t\treturn sum == (root.val + i);\n\t\treturn pathSum(root.left,root.val+i,sum)||pathSum(root.right,root.val+i,sum);\n\t}", "public int maxPathSum(TreeNode root) {\n\t\t int[] max = new int[]{Integer.MIN_VALUE};\n\t\t helper(root,max);\n\t\t return max[0];\n\t }", "public int maxPathSum(TreeNode root) {\n int maxSum[] = {Integer.MIN_VALUE};\n maxPathSum(root, maxSum);\n return maxSum[0] == Integer.MIN_VALUE ? 0 : maxSum[0];\n }", "public int sumNumbers(TreeNode root) {\n\t if(null == root) return 0;\n\t int bsum = 0;\n\t int tsum = 0;\n\t return sum (root, bsum, tsum);\n\t \n\t }", "public int maxPathSum(TreeNode root) {\n helper(root);\n return max;\n }", "public int maxPathSum(TreeNode root) {\n\t\tint[] globalMax = new int[] {Integer.MIN_VALUE};\r\n\t\thelper(root, globalMax);\r\n\t\treturn globalMax[0];\r\n\t}", "public int totalPathLength(BSTnode<K> n, int num) {\n\t\tif (n == null) {\n\t\t\treturn num;// return pathlength to that point\n\t\t}\n\t\tnum++;// increment pathlength\n\t\tif (n.getLeft() == null && n.getRight() == null) {\n\t\t\treturn num;// return pathlength to that point\n\t\t} else {\n\t\t\t// return totalPathLengths of right and left subtrees\n\t\t\treturn totalPathLength(n.getLeft(), num) + totalPathLength(n.getRight(), num);\n\t\t}\n\t}", "private static void backtrackHelper(TreeNode current, int targetSum, List<TreeNode> path, List<List<Integer>> allPaths){\n if(current.left == null && current.right == null){\n if(targetSum == current.val){\n List<Integer> tempResultList = new ArrayList<>();\n // for(TreeNode node: path){\n // tempResultList.add(node.val);\n // }\n tempResultList.addAll(path.stream().mapToInt(o -> o.val).boxed().collect(Collectors.toList()));\n tempResultList.add(current.val);\n\n allPaths.add(tempResultList); // avoid reference puzzle\n }\n return;\n }\n\n // loop-recursion (Here only 2 choices, so we donot need loop)\n if(current.left != null){\n path.add(current);\n backtrackHelper(current.left, targetSum - current.val, path, allPaths);\n path.remove(current);\n }\n\n if(current.right != null){\n path.add(current);\n backtrackHelper(current.right, targetSum - current.val, path, allPaths);\n path.remove(current);\n }\n }", "public int maxPathSum(TreeNode root) {\n\t\tint[] maxSum = new int[1];\n\t\tmaxSum[0] = Integer.MIN_VALUE;\n\t\tmaxPathSum(root, maxSum);\n\t\treturn maxSum[0];\n\t}", "int countSubtreesWithSumXUtil(Node root, int x) {\n if (root == null) return 0;\n\n // sum of nodes in the left subtree\n int ls = countSubtreesWithSumXUtil(root.left, x);\n\n // sum of nodes in the right subtree\n int rs = countSubtreesWithSumXUtil(root.right, x);\n\n\n int sum = ls + rs + root.data;\n\n // if tree's nodes sum == x\n if (sum == x) c++;\n return sum;\n }", "public AbstractTree<T> calculateSizeAndSum() {\n Queue<Node<T>> pendingNodes = new ArrayDeque<>();\n pendingNodes.add(root);\n\n T sum = (T)(Number)0;\n int size = 0;\n\n while (pendingNodes.size() != 0) {\n Node<T> currNode = pendingNodes.poll();\n\n size++;\n sum = operations.add(sum, currNode.getValue());\n\n pendingNodes.addAll(currNode.getChildren());\n }\n\n this.size = size;\n this.sum = sum;\n\n return this;\n }", "public int minPathSum(int[][] grid) {\n\t\treturn 0;\r\n }", "public int maxPathSumHelper(TreeNode root) {\n\n if(root == null) {\n return 0;\n }\n\n int leftSum = maxPathSumHelper(root.left);\n int rightSum = maxPathSumHelper(root.right);\n\n // Compare leftSum + rool.val with rightSum + root.val to select which values to send further\n int maxTillNow = Math.max(leftSum + root.val, rightSum + root.val);\n \n // Check if the root value is greater than any of the path\n maxTillNow = Math.max(maxTillNow, root.val);\n \n //if root + left + root.val is greater than any of the max till now\n int tempMax = Math.max(maxTillNow, leftSum + rightSum + root.val);\n\n finalMax = Math.max(tempMax, finalMax);\n\n return maxTillNow;\n }", "int countSubtreesWithSumX(Node root, int x) {\n if (root == null) return 0;\n\n // sum of nodes in the left subtree\n int ls = countSubtreesWithSumXUtil(root.left, x);\n\n // sum of nodes in the right subtree\n int rs = countSubtreesWithSumXUtil(root.right, x);\n\n // check if above sum is equal to x\n if ((ls + rs + root.data) == x) c++;\n return c;\n }", "public ArrayList<ArrayList<Integer>> pathSum(TreeNode n, int sum) {\t\t\t\r\n\t\t\r\n\t\t\tArrayList<ArrayList<Integer>> al = new ArrayList<ArrayList<Integer>>();\r\n\t\t\tif (n == null)\r\n\t\t\t\treturn al;\r\n\t\t\tpSum(n, sum, al);\r\n\t\t\t\r\n\t\t\treturn al;\r\n\t \r\n\t }", "public static void main(String[] args) {\n\t\tres = 0;\n\t\tNode root = new Node(1);\n\t\troot.left = new Node(2);\n\t\troot.left.left = new Node(1);\n\t\troot.left.right = new Node(2);\n\t\troot.right = new Node(-1);\n\t\troot.right.left = new Node(3);\n\t\troot.right.left.left = new Node(2);\n\t\troot.right.left.right = new Node(5);\n\n\t\tint k = 3;\n\t\tSystem.out.printf(\"No of paths with sum \" + \"equals to %d are: %d\\n\", k, printCount(root, k));\n\n\t}", "public Graph runNumberOfPathThroughAnyNode(AdjacencyMatrix m){\r\n\t\tGraph graph = new Graph(m);\r\n\t\treturn PathCount.getNumberOfPathThroughAnyNode(graph);\t\r\n\t}", "private static void findLevelSums(Node node, Map<Integer, Integer> sumAtEachLevelMap, int treeLevel){\n if(node == null){\n return;\n }\n //get the sum at current \"treeLevel\"\n Integer currentLevelSum = sumAtEachLevelMap.get(treeLevel);\n //if the current level was not found then we put the current value of the node in it\n //if it was was found then we add the current node value to the total sum currently present\n sumAtEachLevelMap.put(treeLevel, (currentLevelSum == null) ? node.data : currentLevelSum+node.data);\n \n //goes through all nodes in the tree\n findLevelSums(node.left, sumAtEachLevelMap, treeLevel+1);\n findLevelSums(node.right, sumAtEachLevelMap, treeLevel+1);\n \n }", "public int countNodes() {\r\n \r\n // call the private countNodes method with root\r\n return countNodes(root);\r\n }", "public static List<List<Integer>> findPaths(TreeNode root, int sum) {\n List<List<Integer>> allPaths = new ArrayList<>();\n List<TreeNode> onePath = new ArrayList<>();\n\n backtrackHelper(root, sum, onePath, allPaths);\n return allPaths;\n }", "public int minPathSum(int[][] grid) {\n\t\tint m = grid.length;\n\t\tint n = grid[0].length;\n\t\tif (n < m) {\n\t\t\tint[] dp = new int[n];\n\t\t\tdp[n-1] = grid[m-1][n-1];\n\t\t\tfor(int i = n-2; i >= 0; i--) {\n\t\t\t\tdp[i] = grid[m-1][i] + dp[i+1];\n\t\t\t}\n\t\t\tfor(int i = m-2; i >= 0; i--) {\n\t\t\t\tfor(int j = n-1; j >= 0; j--) {\n\t\t\t\t\tif(j == n-1) {\n\t\t\t\t\t\tdp[j] += grid[i][j];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdp[j] = grid[i][j] + Math.min(dp[j], dp[j+1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn dp[0];\n\t\t} else {\n\t\t\tint[] dp = new int[m];\n\t\t\tdp[m-1] = grid[m-1][n-1];\n\t\t\tfor(int i = m-2; i >= 0; i--) {\n\t\t\t\tdp[i] = grid[i][n-1] + dp[i+1];\n\t\t\t}\n\t\t\tfor(int i = n-2; i >= 0; i--) {\n\t\t\t\tfor(int j = m-1; j >= 0; j--) {\n\t\t\t\t\tif(j == m-1) {\n\t\t\t\t\t\tdp[j] += grid[j][i];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdp[j] = grid[j][i] + Math.min(dp[j], dp[j+1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn dp[0];\n\t\t}\n\t}", "public static int minPathSum(int[][] grid) {\n if (grid == null || grid.length == 0 || grid[0].length == 0)\n return 0;\n for (int i = 0; i < grid.length; i++) {\n for (int j = 0; j < grid[0].length; j++) {\n if (i == 0 && j == 0) {\n } else if (i == 0 && j > 0)\n grid[i][j] += grid[i][j-1];\n else if (j == 0 && i > 0)\n grid[i][j] += grid[i-1][j];\n else \n grid[i][j] += Math.min(grid[i][j-1], grid[i-1][j]);\n }\n }\n return grid[grid.length-1][grid[0].length-1];\n }", "@Override\n\tpublic int totalPathLength() {\n\t\treturn totalPathLength(root, sum);// returns total path lenght number\n\t}", "public static int minPathSum(int[][] grid) {\n return 0;\n }", "@Override\n public long[ ][ ] count() {\n // precompute common nodes\n for (int x = 0; x < n; x++) {\n for (int n1 = 0; n1 < deg[x]; n1++) {\n int a = adj[x][n1];\n for (int n2 = n1 + 1; n2 < deg[x]; n2++) {\n int b = adj[x][n2];\n Tuple ab = createTuple(a, b);\n common2.put(ab, common2.getOrDefault(ab, 0) + 1);\n for (int n3 = n2 + 1; n3 < deg[x]; n3++) {\n int c = adj[x][n3];\n boolean st = adjacent(adj[a], b) ? (adjacent(adj[a], c) || adjacent(adj[b], c)) :\n (adjacent(adj[a], c) && adjacent(adj[b], c));\n if (!st) continue;\n Tuple abc = createTuple(a, b, c);\n common3.put(abc, common3.getOrDefault(abc, 0) + 1);\n }\n }\n }\n }\n\n // precompute triangles that span over edges\n int[ ] tri = countTriangles();\n\n // count full graphlets\n long[ ] C5 = new long[n];\n int[ ] neigh = new int[n];\n int[ ] neigh2 = new int[n];\n int nn, nn2;\n for (int x = 0; x < n; x++) {\n for (int nx = 0; nx < deg[x]; nx++) {\n int y = adj[x][nx];\n if (y >= x) break;\n nn = 0;\n for (int ny = 0; ny < deg[y]; ny++) {\n int z = adj[y][ny];\n if (z >= y) break;\n if (adjacent(adj[x], z)) {\n neigh[nn++] = z;\n }\n }\n for (int i = 0; i < nn; i++) {\n int z = neigh[i];\n nn2 = 0;\n for (int j = i + 1; j < nn; j++) {\n int zz = neigh[j];\n if (adjacent(adj[z], zz)) {\n neigh2[nn2++] = zz;\n }\n }\n for (int i2 = 0; i2 < nn2; i2++) {\n int zz = neigh2[i2];\n for (int j2 = i2 + 1; j2 < nn2; j2++) {\n int zzz = neigh2[j2];\n if (adjacent(adj[zz], zzz)) {\n C5[x]++;\n C5[y]++;\n C5[z]++;\n C5[zz]++;\n C5[zzz]++;\n }\n }\n }\n }\n }\n }\n\n int[ ] common_x = new int[n];\n int[ ] common_x_list = new int[n];\n int ncx = 0;\n int[ ] common_a = new int[n];\n int[ ] common_a_list = new int[n];\n int nca = 0;\n\n // set up a system of equations relating orbit counts\n for (int x = 0; x < n; x++) {\n for (int i = 0; i < ncx; i++) common_x[common_x_list[i]] = 0;\n ncx = 0;\n\n // smaller graphlets\n orbit[x][0] = deg[x];\n for (int nx1 = 0; nx1 < deg[x]; nx1++) {\n int a = adj[x][nx1];\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = adj[x][nx2];\n if (adjacent(adj[a], b)) orbit[x][3]++;\n else orbit[x][2]++;\n }\n for (int na = 0; na < deg[a]; na++) {\n int b = adj[a][na];\n if (b != x && !adjacent(adj[x], b)) {\n orbit[x][1]++;\n if (common_x[b] == 0) common_x_list[ncx++] = b;\n common_x[b]++;\n }\n }\n }\n\n long f_71 = 0, f_70 = 0, f_67 = 0, f_66 = 0, f_58 = 0, f_57 = 0; // 14\n long f_69 = 0, f_68 = 0, f_64 = 0, f_61 = 0, f_60 = 0, f_55 = 0, f_48 = 0, f_42 = 0, f_41 = 0; // 13\n long f_65 = 0, f_63 = 0, f_59 = 0, f_54 = 0, f_47 = 0, f_46 = 0, f_40 = 0; // 12\n long f_62 = 0, f_53 = 0, f_51 = 0, f_50 = 0, f_49 = 0, f_38 = 0, f_37 = 0, f_36 = 0; // 8\n long f_44 = 0, f_33 = 0, f_30 = 0, f_26 = 0; // 11\n long f_52 = 0, f_43 = 0, f_32 = 0, f_29 = 0, f_25 = 0; // 10\n long f_56 = 0, f_45 = 0, f_39 = 0, f_31 = 0, f_28 = 0, f_24 = 0; // 9\n long f_35 = 0, f_34 = 0, f_27 = 0, f_18 = 0, f_16 = 0, f_15 = 0; // 4\n long f_17 = 0; // 5\n long f_22 = 0, f_20 = 0, f_19 = 0; // 6\n long f_23 = 0, f_21 = 0; // 7\n\n for (int nx1 = 0; nx1 < deg[x]; nx1++) {\n int a = inc[x][nx1]._1, xa = inc[x][nx1]._2;\n\n for (int i = 0; i < nca; i++) common_a[common_a_list[i]] = 0;\n nca = 0;\n for (int na = 0; na < deg[a]; na++) {\n int b = adj[a][na];\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = adj[b][nb];\n if (c == a || adjacent(adj[a], c)) continue;\n if (common_a[c] == 0) common_a_list[nca++] = c;\n common_a[c]++;\n }\n }\n\n // x = orbit-14 (tetrahedron)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (!adjacent(adj[a], c) || !adjacent(adj[b], c)) continue;\n orbit[x][14]++;\n f_70 += common3.getOrDefault(createTuple(a, b, c), 0) - 1;\n f_71 += (tri[xa] > 2 && tri[xb] > 2) ? (common3.getOrDefault(createTuple(x, a, b), 0) - 1) : 0;\n f_71 += (tri[xa] > 2 && tri[xc] > 2) ? (common3.getOrDefault(createTuple(x, a, c), 0) - 1) : 0;\n f_71 += (tri[xb] > 2 && tri[xc] > 2) ? (common3.getOrDefault(createTuple(x, b, c), 0) - 1) : 0;\n f_67 += tri[xa] - 2 + tri[xb] - 2 + tri[xc] - 2;\n f_66 += common2.getOrDefault(createTuple(a, b), 0) - 2;\n f_66 += common2.getOrDefault(createTuple(a, c), 0) - 2;\n f_66 += common2.getOrDefault(createTuple(b, c), 0) - 2;\n f_58 += deg[x] - 3;\n f_57 += deg[a] - 3 + deg[b] - 3 + deg[c] - 3;\n }\n }\n\n // x = orbit-13 (diamond)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (!adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][13]++;\n f_69 += (tri[xb] > 1 && tri[xc] > 1) ? (common3.getOrDefault(createTuple(x, b, c), 0) - 1) : 0;\n f_68 += common3.getOrDefault(createTuple(a, b, c), 0) - 1;\n f_64 += common2.getOrDefault(createTuple(b, c), 0) - 2;\n f_61 += tri[xb] - 1 + tri[xc] - 1;\n f_60 += common2.getOrDefault(createTuple(a, b), 0) - 1;\n f_60 += common2.getOrDefault(createTuple(a, c), 0) - 1;\n f_55 += tri[xa] - 2;\n f_48 += deg[b] - 2 + deg[c] - 2;\n f_42 += deg[x] - 3;\n f_41 += deg[a] - 3;\n }\n }\n\n // x = orbit-12 (diamond)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int na = 0; na < deg[a]; na++) {\n int c = inc[a][na]._1, ac = inc[a][na]._2;\n if (c == x || adjacent(adj[x], c) || !adjacent(adj[b], c)) continue;\n orbit[x][12]++;\n f_65 += (tri[ac] > 1) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_63 += common_x[c] - 2;\n f_59 += tri[ac] - 1 + common2.getOrDefault(createTuple(b, c), 0) - 1;\n f_54 += common2.getOrDefault(createTuple(a, b), 0) - 2;\n f_47 += deg[x] - 2;\n f_46 += deg[c] - 2;\n f_40 += deg[a] - 3 + deg[b] - 3;\n }\n }\n\n // x = orbit-8 (cycle)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (adjacent(adj[a], b)) continue;\n for (int na = 0; na < deg[a]; na++) {\n int c = inc[a][na]._1, ac = inc[a][na]._2;\n if (c == x || adjacent(adj[x], c) || !adjacent(adj[b], c)) continue;\n orbit[x][8]++;\n f_62 += (tri[ac] > 0) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_53 += tri[xa] + tri[xb];\n f_51 += tri[ac] + common2.getOrDefault(createTuple(c, b), 0);\n f_50 += common_x[c] - 2;\n f_49 += common_a[b] - 2;\n f_38 += deg[x] - 2;\n f_37 += deg[a] - 2 + deg[b] - 2;\n f_36 += deg[c] - 2;\n }\n }\n\n // x = orbit-11 (paw)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = 0; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (c == a || c == b || adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][11]++;\n f_44 += tri[xc];\n f_33 += deg[x] - 3;\n f_30 += deg[c] - 1;\n f_26 += deg[a] - 2 + deg[b] - 2;\n }\n }\n\n // x = orbit-10 (paw)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == x || c == a || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][10]++;\n f_52 += common_a[c] - 1;\n f_43 += tri[bc];\n f_32 += deg[b] - 3;\n f_29 += deg[c] - 1;\n f_25 += deg[a] - 2;\n }\n }\n\n // x = orbit-9 (paw)\n for (int na1 = 0; na1 < deg[a]; na1++) {\n int b = inc[a][na1]._1, ab = inc[a][na1]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int na2 = na1 + 1; na2 < deg[a]; na2++) {\n int c = inc[a][na2]._1, ac = inc[a][na2]._2;\n if (c == x || !adjacent(adj[b], c) || adjacent(adj[x], c)) continue;\n orbit[x][9]++;\n f_56 += (tri[ab] > 1 && tri[ac] > 1) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_45 += common2.getOrDefault(createTuple(b, c), 0) - 1;\n f_39 += tri[ab] - 1 + tri[ac] - 1;\n f_31 += deg[a] - 3;\n f_28 += deg[x] - 1;\n f_24 += deg[b] - 2 + deg[c] - 2;\n }\n }\n\n // x = orbit-4 (path)\n for (int na = 0; na < deg[a]; na++) {\n int b = inc[a][na]._1, ab = inc[a][na]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == a || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][4]++;\n f_35 += common_a[c] - 1;\n f_34 += common_x[c];\n f_27 += tri[bc];\n f_18 += deg[b] - 2;\n f_16 += deg[x] - 1;\n f_15 += deg[c] - 1;\n }\n }\n\n // x = orbit-5 (path)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (b == a || adjacent(adj[a], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == x || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][5]++;\n f_17 += deg[a] - 1;\n }\n }\n\n // x = orbit-6 (claw)\n for (int na1 = 0; na1 < deg[a]; na1++) {\n int b = inc[a][na1]._1, ab = inc[a][na1]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int na2 = na1 + 1; na2 < deg[a]; na2++) {\n int c = inc[a][na2]._1, ac = inc[a][na2]._2;\n if (c == x || adjacent(adj[x], c) || adjacent(adj[b], c)) continue;\n orbit[x][6]++;\n f_22 += deg[a] - 3;\n f_20 += deg[x] - 1;\n f_19 += deg[b] - 1 + deg[c] - 1;\n }\n }\n\n // x = orbit-7 (claw)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][7]++;\n f_23 += deg[x] - 3;\n f_21 += deg[a] - 1 + deg[b] - 1 + deg[c] - 1;\n }\n }\n }\n\n // solve equations\n orbit[x][72] = C5[x];\n orbit[x][71] = (f_71 - 12 * orbit[x][72]) / 2;\n orbit[x][70] = (f_70 - 4 * orbit[x][72]);\n orbit[x][69] = (f_69 - 2 * orbit[x][71]) / 4;\n orbit[x][68] = (f_68 - 2 * orbit[x][71]);\n orbit[x][67] = (f_67 - 12 * orbit[x][72] - 4 * orbit[x][71]);\n orbit[x][66] = (f_66 - 12 * orbit[x][72] - 2 * orbit[x][71] - 3 * orbit[x][70]);\n orbit[x][65] = (f_65 - 3 * orbit[x][70]) / 2;\n orbit[x][64] = (f_64 - 2 * orbit[x][71] - 4 * orbit[x][69] - 1 * orbit[x][68]);\n orbit[x][63] = (f_63 - 3 * orbit[x][70] - 2 * orbit[x][68]);\n orbit[x][62] = (f_62 - 1 * orbit[x][68]) / 2;\n orbit[x][61] = (f_61 - 4 * orbit[x][71] - 8 * orbit[x][69] - 2 * orbit[x][67]) / 2;\n orbit[x][60] = (f_60 - 4 * orbit[x][71] - 2 * orbit[x][68] - 2 * orbit[x][67]);\n orbit[x][59] = (f_59 - 6 * orbit[x][70] - 2 * orbit[x][68] - 4 * orbit[x][65]);\n orbit[x][58] = (f_58 - 4 * orbit[x][72] - 2 * orbit[x][71] - 1 * orbit[x][67]);\n orbit[x][57] = (f_57 - 12 * orbit[x][72] - 4 * orbit[x][71] - 3 * orbit[x][70] - 1 * orbit[x][67] - 2 * orbit[x][66]);\n orbit[x][56] = (f_56 - 2 * orbit[x][65]) / 3;\n orbit[x][55] = (f_55 - 2 * orbit[x][71] - 2 * orbit[x][67]) / 3;\n orbit[x][54] = (f_54 - 3 * orbit[x][70] - 1 * orbit[x][66] - 2 * orbit[x][65]) / 2;\n orbit[x][53] = (f_53 - 2 * orbit[x][68] - 2 * orbit[x][64] - 2 * orbit[x][63]);\n orbit[x][52] = (f_52 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][59]) / 2;\n orbit[x][51] = (f_51 - 2 * orbit[x][68] - 2 * orbit[x][63] - 4 * orbit[x][62]);\n orbit[x][50] = (f_50 - 1 * orbit[x][68] - 2 * orbit[x][63]) / 3;\n orbit[x][49] = (f_49 - 1 * orbit[x][68] - 1 * orbit[x][64] - 2 * orbit[x][62]) / 2;\n orbit[x][48] = (f_48 - 4 * orbit[x][71] - 8 * orbit[x][69] - 2 * orbit[x][68] - 2 * orbit[x][67] - 2 * orbit[x][64] - 2 * orbit[x][61] - 1 * orbit[x][60]);\n orbit[x][47] = (f_47 - 3 * orbit[x][70] - 2 * orbit[x][68] - 1 * orbit[x][66] - 1 * orbit[x][63] - 1 * orbit[x][60]);\n orbit[x][46] = (f_46 - 3 * orbit[x][70] - 2 * orbit[x][68] - 2 * orbit[x][65] - 1 * orbit[x][63] - 1 * orbit[x][59]);\n orbit[x][45] = (f_45 - 2 * orbit[x][65] - 2 * orbit[x][62] - 3 * orbit[x][56]);\n orbit[x][44] = (f_44 - 1 * orbit[x][67] - 2 * orbit[x][61]) / 4;\n orbit[x][43] = (f_43 - 2 * orbit[x][66] - 1 * orbit[x][60] - 1 * orbit[x][59]) / 2;\n orbit[x][42] = (f_42 - 2 * orbit[x][71] - 4 * orbit[x][69] - 2 * orbit[x][67] - 2 * orbit[x][61] - 3 * orbit[x][55]);\n orbit[x][41] = (f_41 - 2 * orbit[x][71] - 1 * orbit[x][68] - 2 * orbit[x][67] - 1 * orbit[x][60] - 3 * orbit[x][55]);\n orbit[x][40] = (f_40 - 6 * orbit[x][70] - 2 * orbit[x][68] - 2 * orbit[x][66] - 4 * orbit[x][65] - 1 * orbit[x][60] - 1 * orbit[x][59] - 4 * orbit[x][54]);\n orbit[x][39] = (f_39 - 4 * orbit[x][65] - 1 * orbit[x][59] - 6 * orbit[x][56]) / 2;\n orbit[x][38] = (f_38 - 1 * orbit[x][68] - 1 * orbit[x][64] - 2 * orbit[x][63] - 1 * orbit[x][53] - 3 * orbit[x][50]);\n orbit[x][37] = (f_37 - 2 * orbit[x][68] - 2 * orbit[x][64] - 2 * orbit[x][63] - 4 * orbit[x][62] - 1 * orbit[x][53] - 1 * orbit[x][51] - 4 * orbit[x][49]);\n orbit[x][36] = (f_36 - 1 * orbit[x][68] - 2 * orbit[x][63] - 2 * orbit[x][62] - 1 * orbit[x][51] - 3 * orbit[x][50]);\n orbit[x][35] = (f_35 - 1 * orbit[x][59] - 2 * orbit[x][52] - 2 * orbit[x][45]) / 2;\n orbit[x][34] = (f_34 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51]) / 2;\n orbit[x][33] = (f_33 - 1 * orbit[x][67] - 2 * orbit[x][61] - 3 * orbit[x][58] - 4 * orbit[x][44] - 2 * orbit[x][42]) / 2;\n orbit[x][32] = (f_32 - 2 * orbit[x][66] - 1 * orbit[x][60] - 1 * orbit[x][59] - 2 * orbit[x][57] - 2 * orbit[x][43] - 2 * orbit[x][41] - 1 * orbit[x][40]) / 2;\n orbit[x][31] = (f_31 - 2 * orbit[x][65] - 1 * orbit[x][59] - 3 * orbit[x][56] - 1 * orbit[x][43] - 2 * orbit[x][39]);\n orbit[x][30] = (f_30 - 1 * orbit[x][67] - 1 * orbit[x][63] - 2 * orbit[x][61] - 1 * orbit[x][53] - 4 * orbit[x][44]);\n orbit[x][29] = (f_29 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][60] - 1 * orbit[x][59] - 1 * orbit[x][53] - 2 * orbit[x][52] - 2 * orbit[x][43]);\n orbit[x][28] = (f_28 - 2 * orbit[x][65] - 2 * orbit[x][62] - 1 * orbit[x][59] - 1 * orbit[x][51] - 1 * orbit[x][43]);\n orbit[x][27] = (f_27 - 1 * orbit[x][59] - 1 * orbit[x][51] - 2 * orbit[x][45]) / 2;\n orbit[x][26] = (f_26 - 2 * orbit[x][67] - 2 * orbit[x][63] - 2 * orbit[x][61] - 6 * orbit[x][58] - 1 * orbit[x][53] - 2 * orbit[x][47] - 2 * orbit[x][42]);\n orbit[x][25] = (f_25 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][59] - 2 * orbit[x][57] - 2 * orbit[x][52] - 1 * orbit[x][48] - 1 * orbit[x][40]) / 2;\n orbit[x][24] = (f_24 - 4 * orbit[x][65] - 4 * orbit[x][62] - 1 * orbit[x][59] - 6 * orbit[x][56] - 1 * orbit[x][51] - 2 * orbit[x][45] - 2 * orbit[x][39]);\n orbit[x][23] = (f_23 - 1 * orbit[x][55] - 1 * orbit[x][42] - 2 * orbit[x][33]) / 4;\n orbit[x][22] = (f_22 - 2 * orbit[x][54] - 1 * orbit[x][40] - 1 * orbit[x][39] - 1 * orbit[x][32] - 2 * orbit[x][31]) / 3;\n orbit[x][21] = (f_21 - 3 * orbit[x][55] - 3 * orbit[x][50] - 2 * orbit[x][42] - 2 * orbit[x][38] - 2 * orbit[x][33]);\n orbit[x][20] = (f_20 - 2 * orbit[x][54] - 2 * orbit[x][49] - 1 * orbit[x][40] - 1 * orbit[x][37] - 1 * orbit[x][32]);\n orbit[x][19] = (f_19 - 4 * orbit[x][54] - 4 * orbit[x][49] - 1 * orbit[x][40] - 2 * orbit[x][39] - 1 * orbit[x][37] - 2 * orbit[x][35] - 2 * orbit[x][31]);\n orbit[x][18] = (f_18 - 1 * orbit[x][59] - 1 * orbit[x][51] - 2 * orbit[x][46] - 2 * orbit[x][45] - 2 * orbit[x][36] - 2 * orbit[x][27] - 1 * orbit[x][24]) / 2;\n orbit[x][17] = (f_17 - 1 * orbit[x][60] - 1 * orbit[x][53] - 1 * orbit[x][51] - 1 * orbit[x][48] - 1 * orbit[x][37] - 2 * orbit[x][34] - 2 * orbit[x][30]) / 2;\n orbit[x][16] = (f_16 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51] - 2 * orbit[x][46] - 2 * orbit[x][36] - 2 * orbit[x][34] - 1 * orbit[x][29]);\n orbit[x][15] = (f_15 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51] - 2 * orbit[x][45] - 2 * orbit[x][35] - 2 * orbit[x][34] - 2 * orbit[x][27]);\n }\n\n return orbit;\n }", "public int sumNumbers2(TreeNode root) {\n \n int sum = 0 ;\n int cur = 0 ;\n Stack<Pair<TreeNode, Integer>> stack = new Stack<>() ;\n stack.push(new Pair(root, 0)) ;\n \n while(!stack.empty()){\n \n Pair<TreeNode, Integer> p = stack.pop() ;\n root = p.getKey() ;\n cur = p.getValue() ;\n \n if(root != null){\n \n cur = cur * 10 + root.val ;\n \n if(root.left == null && root.right == null){\n sum += cur ;\n }else{\n stack.push(new Pair(root.left, cur)) ;\n stack.push(new Pair(root.right, cur)) ;\n }\n \n }\n \n \n }\n \n return sum ; \n \n \n }", "void countPaths (int inicio) {\r\n\t\tint n = lisAdy.keySet().size();\r\n\t\tint paths[] = new int[n];\r\n\t\tvisitados = new boolean[n];\r\n\t\tcola = new ArrayDeque<> ();\r\n\t\t\r\n\t\ttoposort(inicio);\r\n\t\tpaths[inicio] = 1;\r\n\t\tfor (int i : cola) {\r\n\t\t\tfor (int v : lisAdy.get(i)) \r\n\t\t\t\tpaths[v] += paths[i];\r\n\t\t}\r\n\t}", "public static ArrayList<ArrayList<Integer>> pathSum_033(TreeNode root, int sum) {\n ArrayList<ArrayList<Integer>> resultList = new ArrayList<>();\n getPathSumResult(resultList, root, sum, new ArrayList<>());\n return resultList;\n }", "public int maxPathSum(TreeNode root) {\n int tempMax = maxPathSumHelper(root);\n return finalMax;\n }", "public int totalNodes(Node<T> n)\n\t{\n\t\tif (n == null) \n return 0; \n else \n { \n \t\n int lTotal = totalNodes(n.left); \n int rTotal = totalNodes(n.right); \n \n return (lTotal + rTotal + 1); \n \n \n \n } \n\t}", "public int sumDescendants() {\n if (left == null && right == null) {\n int oldVal = value;\n /* fill code*/\n value = 0;\n return oldVal;\n\n } else {\n int oldVal = value;\n\n /* fill code*/\n value = left.sumDescendants()+ right.sumDescendants();\n\n return oldVal + value;\n\n }\n }", "public Map<Integer, Integer> diagonalSum(TreeNode root) {\n Map<Integer, Integer> result = new HashMap<Integer, Integer>();\n\n Queue<DiagonalNode> queue = new LinkedList<DiagonalNode>();\n queue.offer(new DiagonalNode(root, 0));\n\n while (!queue.isEmpty()) {\n DiagonalNode dn = queue.poll();\n TreeNode node = dn.node;\n while (node != null) {\n int sum = result.containsKey(dn.level) ? result.get(dn.level) : 0;\n result.put(dn.level, sum + node.val);\n\n if (node.left != null) {\n queue.offer(new DiagonalNode(node.left, dn.level + 1));\n }\n\n node = node.right;\n }\n }\n }", "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 int numberOfNodes(Node root){\n if(root==null){\n return 0;\n }\n return 1 + numberOfNodes(root.getLeft()) + numberOfNodes(root.getRight());\n }", "public boolean hasPathSum(TreeNode root, int sum) {\n if (root == null) {\n return false;\n }\n if (root.left == null && root.right == null) {\n return sum == root.val;\n }\n return hasPathSum(root.left, sum - root.val) || hasPathSum(root.right, sum - root.val);\n\n// 作者:LeetCode-Solution\n// 链接:https://leetcode-cn.com/problems/path-sum/solution/lu-jing-zong-he-by-leetcode-solution/\n// 来源:力扣(LeetCode)\n// 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。\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 static boolean hasPathSum_032(TreeNode root, int sum) {\n if (root == null) {\n return false;\n }\n\n if (sum == root.val && root.left == null && root.right == null) {\n return true;\n }\n\n return hasPathSum_032(root.left, sum - root.val) ||\n hasPathSum_032(root.right, sum - root.val);\n }", "static long journey(int[] path, int k) {\n calculateSumRecursive(path,k,0,0);\n return maxSum;\n }", "private static int helper(TreeNode root, TreeNode p, TreeNode q, List<TreeNode> ans) {\n if (root == null)\n return 0;\n int sum = 0;\n if (root.val == p.val || root.val == q.val)\n ++sum;\n int leftSum = helper(root.left, p, q, ans);\n int rightSum = helper(root.right, p, q, ans);\n sum += leftSum + rightSum;\n if (sum == 2 && leftSum < 2 && rightSum < 2)\n ans.add(root);\n return sum;\n }", "static int numberOfPaths(int m, int n) {\n\t\tint count[][] = new int[m][n];\n\n\t\t// Count of paths to reach any cell in\n\t\t// first column is 1\n\t\tfor (int i = 0; i < m; i++)\n\t\t\tcount[i][0] = 1;\n\n\t\t// Count of paths to reach any cell in\n\t\t// first column is 1\n\t\tfor (int j = 0; j < n; j++)\n\t\t\tcount[0][j] = 1;\n\n\t\t// Calculate count of paths for other\n\t\t// cells in bottom-up manner using\n\t\t// the recursive solution\n\t\tfor (int i = 1; i < m; i++) {\n\t\t\tfor (int j = 1; j < n; j++)\n\n\t\t\t\t// By uncommenting the last part the\n\t\t\t\t// code calculatest he total possible paths\n\t\t\t\t// if the diagonal Movements are allowed\n\t\t\t\tcount[i][j] = count[i - 1][j] + count[i][j - 1]; // + count[i-1][j-1];\n\n\t\t}\n\t\tfor (int k = 0; k < count.length; k++) {\n\t\t\tfor (int k2 = 0; k2 < count.length; k2++) {\n\t\t\t\tSystem.out.print(count[k][k2] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\treturn count[m - 1][n - 1];\n\t}", "public static int pathInMatrix(int[][] matrix) {\n int[][] pathCounts = new int[matrix.length][matrix[0].length];\n if(matrix[0][0]!=1) {\n return 0;\n }\n for(int row=0; row< matrix.length; row++) {\n for(int col=0; col<matrix[row].length; col++) {\n if((row==0)&&(col==0))\n pathCounts[row][col] =1;\n // col can't be 0\n else if (row==0) {\n // there is way to reach the previous cell and current cell is not 0\n pathCounts[row][col] = ((pathCounts[row][col-1]==1)&&(matrix[row][col]==1)) ? 1:0;\n }\n else if (col==0) {\n // there is way to reach the previous cell and current cell is not 0\n pathCounts[row][col] = ((pathCounts[row-1][col]==1)&&(matrix[row][col]==1)) ? 1:0;\n }\n else {\n pathCounts[row][col] = (matrix[row][col]==1) ? pathCounts[row-1][col]+pathCounts[row][col-1]:0;\n }\n }\n }\n return pathCounts[matrix.length-1][matrix[0].length-1];\n }", "private void printPathSumHelper(BinaryTreeNode<Integer> root, int curSum, String path, int k) {\n\n if (root == null) {\n return;\n }\n if (root.left == null && root.right == null) {\n curSum += root.data;\n if(curSum==k){\n System.out.println(path+root.data+\" \");\n }\n return;\n }\n printPathSumHelper(root.left,(curSum+root.data),(path+root.data+\" \"),k);\n printPathSumHelper(root.right,(curSum+root.data),(path+root.data+\" \"),k);\n }", "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 static int maxPathSum2(BTreeNode root) {\n\t\tMyResult result = new MyResult();\n\t\tauxPathSum2(root, 0, result);\n\t\treturn result.maxsum;\n\t}", "public int countNodes(TreeNode root) {\n if (root == null) return 0;\n TreeNode l = root, r = root;\n int h = 0;\n while (l != null && r != null) {\n l = l.left; r = r.right;\n ++h;\n }\n if (l == null && r == null) return (1 << h) - 1; // # of nodes of a full binary tree is 2^h-1\n else return 1 + countNodes(root.left) + countNodes(root.right);\n }", "public boolean hasPathSum (TreeNode root, int sum) {\n if (root == null)\n return false;\n if (root.val == sum && root.left == null && root.right == null)\n return true;\n else {\n return hasPathSum (root.left, sum - root.val) || hasPathSum (root.right, sum - root.val);\n }\n }", "public static int numberOfWaysToTraverseGraph(int width, int height) {\n\n int[][] graph = new int[height][width];\n for (int i = 0; i < height; i++) {\n graph[i][0] = 1;\n }\n\n for (int j = 0; j < width; j++) {\n graph[0][j] = 1;\n }\n\n for (int i = 1; i < height; i++) {\n for (int j = 1; j < width; j++) {\n graph[i][j] = graph[i - 1][j] + graph[i][j - 1];\n }\n }\n return graph[height - 1][width - 1];\n }", "private static int countNodes(TreeNode node) {\n if (node == null) {\n // Tree is empty, so it contains no nodes.\n return 0;\n } else {\n // Add up the root node and the nodes in its two subtrees.\n int leftCount = countNodes(node.left);\n int rightCount = countNodes(node.right);\n return 1 + leftCount + rightCount;\n }\n }", "private static int countPathsRecursion(int steps) {\n\n if (steps < 0)\n return 0;\n else if (steps == 0)\n return 1;\n\n return countPathsRecursion(steps - 1) + countPathsRecursion(steps - 2) + countPathsRecursion(steps - 3);\n\n\n }", "public boolean hasPathSum(TreeNode root, int sum) {\n if (null == root) {\n return false;\n }\n if (root.left == null && null == root.right) {\n return root.val == sum;\n }\n\n return hasPathSum(root.left, sum - root.val) || hasPathSum(root.right, sum - root.val);\n\n }", "public int minPathSum(int[][] grid) {\n\t\treturn getMinPathSum(grid, grid.length - 1, grid[0].length - 1);\n\t}", "private static void findSum(Node node, int sum, int[] buffer, int level) {\n if (node == null)\n return;\n\n buffer[level] = node.value;\n int t = 0;\n for (int i = level; i >= 0; i--) {\n t += buffer[i];\n\n if (t == sum)\n print(buffer, i, level);\n }\n\n findSum(node.left, sum, buffer, level + 1);\n findSum(node.right, sum, buffer, level + 1);\n }", "public int count(BinarySearchTreeNode<T> root, T start, T end) {\n if (root == null) {\n return 0;\n }\n if (root.getData().compareTo(start) >= 0 && root.getData().compareTo(end) <= 0) {\n return count(root.getLeft(), start, end) + count(root.getRight(), start, end) + 1;\n }\n if (root.getData().compareTo(start) < 0) {\n return count(root.getRight(), start, end);\n }\n return count(root.getLeft(), start, end);\n }", "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 }", "private int nodeCount(BinaryNode<AnyType> t)\r\n\t{\r\n\t\tif(t==null)\r\n\t\t\treturn 0;\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn 1+nodeCount(t.left)+nodeCount(t.right);\r\n\t\t}\r\n\t}", "public int countNodes(){\r\n \treturn count(root);\r\n }", "public static List<List<Integer>> findPathsOther(TreeNode root, int sum) {\n List<List<Integer>> allPaths = new ArrayList<>();\n List<Integer> onePath = new ArrayList<>();\n\n recursiveHelper(root, sum, onePath, allPaths);\n return allPaths;\n }", "static long countTriplets(List<Long> arr, long r) {\n List<List<Long>> candidates;\n List<List<Long>> triplets = new ArrayList<>();\n for (int i = 0; i < arr.size(); i++) {\n long root = arr.get(i);\n candidates = new ArrayList<>();\n\n for (int j = i + 1; j < arr.size(); j++) {\n long value = arr.get(j);\n\n candidates.forEach(candidate -> {\n long current = candidate.get(1);\n if (value / r == current) {\n List<Long> triplet = new ArrayList<>(candidate);\n triplet.add(value);\n triplets.add(triplet);\n }\n });\n\n if (value / r == root) {\n List<Long> candidate = new ArrayList<>();\n candidate.add(root);\n candidate.add(value);\n candidates.add(candidate);\n }\n }\n\n // List<Long> sig = new ArrayList<>();\n // for (int j = 0; j < arr.size(); j++) {\n // sig.set(j, j < i ? arr.get(i) : arr.get(i) / r);\n // }\n }\n\n return triplets.size();\n }", "static int paths_usingRecursion(int[][] matrix) {\n\t\treturn paths(matrix, 0, 0);\n\t}", "public int getNodeCount(){\r\n HashSet<FlowGraphNode> visited = new HashSet<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n queue.add(start);\r\n visited.add(start);\r\n while(!queue.isEmpty()){\r\n FlowGraphNode node = queue.pop();\r\n for(FlowGraphNode child : node.to){\r\n if(visited.add(child)){\r\n queue.add(child);\r\n }\r\n }\r\n }\r\n return visited.size();\r\n }", "public static void main(String args[]) {\n Node root = new Node(10);\n root.left = new Node(-2);\n root.right = new Node(7);\n root.left.left = new Node(8);\n root.left.right = new Node(-4);\n System.out.println(\"Following are the nodes \" +\n \"on maximum sum path\");\n int sum = maxSumPath(root);\n System.out.println();\n System.out.println(\"Sum of nodes is : \" + sum);\n }", "public static int sumWays(int sum, int[] nums) {\n if (sum == 0)\n return 0;\n //find sum for all the numbers from 0- sum\n int[] sumCount = new int[sum + 1];\n for (int i = 0; i < sumCount.length; i++) {\n sumCount[i] = -1;\n }\n // assuming nums in sum are ordered\n // number of ways to sum the smallest number is num is 1.\n sumCount[nums[0]] = 1;\n for (int currSum = nums[0] + 1; currSum <= sum; currSum++) {\n int currSumCnt = 0;\n for (int i = 0; i < nums.length; i++) {\n // number of ways to sum the number nums[i] is sumCount[nums[i]]\n // number of ways to sum the number sum - nums[i] is sumCount[sum- nums[i]]\n int diff = currSum - nums[i];\n if ((diff > 0) && (diff < sum) && (sumCount[diff]) > 0) {\n currSumCnt += sumCount[diff];\n }\n }\n sumCount[currSum] = currSumCnt;\n }\n System.out.println(\"Num of ways: \");\n printArr(sumCount, \"Ways to get %d is %d\");\n return sumCount[sum];\n }", "public int numberOfWaysToTraverseGraph( int width, int height ) {\n\n\t\tint[][] graph = new int[height][width];\n\n\t\t// first column cells will have only one way to reach them, thats from up\n\t\tfor( int row = 0; row < height; row++ ) {\n\t\t\tgraph[row][0] = 1;\n\t\t}\n\n\t\t// first row cells will have only one way to reach them, thats from left\n\t\tfor( int col = 0; col < width; col++ ) {\n\t\t\tgraph[0][col] = 1;\n\t\t}\n\n\t\t// rest of the cells\n\t\t// number of ways to reach = number of ways to reach cell in previous row + in previous col\n\t\tfor( int row = 1; row < height; row++ ) {\n\t\t\tfor( int col = 1; col < width; col++ ) {\n\n\t\t\t\t// better in reading\n\t\t\t\tint previousRow = row - 1;\n\t\t\t\tint previousCol = col - 1;\n\n\t\t\t\tgraph[row][col] = graph[previousRow][col] + graph[row][previousCol];\n\t\t\t}\n\t\t}\n\n\t\treturn graph[height - 1][width - 1];\n\t}", "private int _countEmpty(IntTreeNode root) {\r\n if (root == null) {\r\n return 1;\r\n } else {\r\n int leftNulls = _countEmpty(root.left);\r\n int rightNulls = _countEmpty(root.right);\r\n return leftNulls + rightNulls;\r\n }\r\n }", "private int countNodes(BSTNode r) {\r\n \r\n // if the node is null, return 0\r\n if (r == null) {\r\n \r\n return 0;\r\n }\r\n \r\n // if node is NOT null, execute\r\n else {\r\n \r\n // initialize count to 1\r\n int countN = 1;\r\n \r\n // increment count for each child node\r\n countN += countNodes(r.getLeft());\r\n countN += countNodes(r.getRight());\r\n \r\n // return the count\r\n return countN;\r\n }\r\n }", "public double countAveragePath() {\n\t\t\n\t\tint summedPath = 0;\n\t\tdouble averagePath = 0;\n\t\t\n\t\tfor(Solution solution : population) {\n\n\t\t\tsummedPath += solution.countPath(solution.getPossibleSolution());\n\t\t}\n\t\taveragePath = (double) summedPath / (double) population.size();\n\t\t\n\t\tsetAveragePath(averagePath);\n\t\treturn averagePath;\n\t}", "private static int nodeDepthsIterativeQueue(Node root) {\n\t\tQueue<Level>q = new LinkedList<>();\n\t\tint result = 0;\n\t\tq.add(new Level(root, 0));\n\t\twhile(!q.isEmpty()) {\n\t\t\tLevel curr = q.poll();\n\t\t\tif(curr.root == null)\n\t\t\t\tcontinue;\n\t\t\tresult += curr.depth;\n\t\t\tSystem.out.println(curr.toString());\n\t\t\tq.add(new Level(curr.root.left, curr.depth + 1));\n\t\t\tq.add(new Level(curr.root.right, curr.depth + 1));\n\t\t}\n\t\treturn result;\n\t}", "public static void main(String[] args) {\n\t\tTreeNode node1 = new TreeNode(5);\n\t\tTreeNode node2 = new TreeNode(4);\n\t\tTreeNode node3 = new TreeNode(8);\n\t\tTreeNode node4 = new TreeNode(11);\n\t\tTreeNode node5 = new TreeNode(13);\n\t\tTreeNode node6 = new TreeNode(4);\n\t\tTreeNode node7 = new TreeNode(7);\n\t\tTreeNode node8 = new TreeNode(2);\n\t\tTreeNode node9 = new TreeNode(1);\n\t\tTreeNode node10 = new TreeNode(5);\n\t\t\n\t\tnode1.left = node2;\n\t\tnode1.right = node3;\n\t\tnode2.left = node4;\n\t\tnode3.left = node5;\n\t\tnode3.right = node6;\n\t\tnode4.left = node7;\n\t\tnode4.right =node8;\n\t\tnode6.left = node10;\n\t\tnode6.right = node9;\n\t\t\n\t\tTreeNode node11 = new TreeNode(1);\n\t\tSystem.out.println(pathSum(node1,22));\n\n\t}", "public int minFallingPathSum(int[][] A) {\n int minpath = 999999999;\n\n int[][] cache = new int[A.length][A[0].length];\n // you need to initialise the cache.\n\n for(int i = 0; i < A.length; i++ ){\n for(int j = 0; j < A[0].length; j++){\n cache[i][j] = -1;\n //initialises the cache to a default \"Untouched\" value.\n }\n }\n\n for(int i = 0; i < A[0].length; i ++){\n\n minpath = Math.min(minpath, minFallingPathSum(A,cache, i, 0 ));\n\n }\n\n return minpath;\n }", "private static long countSummations(int target) {\n if (target == 1){\n return 1;\n }\n\n return countSummations(target, 0, target - 1);\n }", "public int getNodeCount() {\n resetAllTouched();\n return recurseNodeCount();\n }", "private static long countSummations(int target, int currSum, int lastVal){\n if (currSum == target){\n return 1;\n }\n\n long numSummations = 0;\n\n for (int i = 1; i <= lastVal; i++){\n if (i + currSum > target){\n return numSummations;\n }\n currSum += i;\n numSummations += countSummations(target, currSum, i);\n currSum -= i;\n }\n return numSummations;\n }", "private int countNodes(Node n) {\n int count = 1;\n if (n==null) return 0;\n\n for (int i = 0; i < n.getSubtreesSize(); i++) {\n count = count + countNodes(n.getSubtree(i));\n }\n\n return count;\n }", "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}", "public static void main(String[] args) {\n\n TreeNode root = new TreeNode(10);\n root.left = new TreeNode(7);\n root.left.left = new TreeNode(5);\n root.left.left.left = new TreeNode(3);\n\n root.right = new TreeNode(15);\n root.right.right = new TreeNode(18);\n\n // this should print out 32\n System.out.println(rangeSumBST(root, 7, 15));\n\n\n }", "int countLeavesIterative(Node node) {\r\n\t\tif (node == null) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tQueue<Node> queue = new LinkedList<>();\r\n\t\tqueue.add(node);\r\n\t\tint count = 0;\r\n\t\twhile (!queue.isEmpty()) {\r\n\t\t\tNode temp = queue.poll();\r\n\t\t\tif (temp != null) {\r\n\t\t\t\tif (temp.left == null && temp.right == null) {\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (temp.left != null) {\r\n\t\t\t\t\t\tqueue.add(temp.left);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (temp.right != null) {\r\n\t\t\t\t\t\tqueue.add(temp.right);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "public int sum(String prefix) {\n TrieNode cur = root;\n char[] charArray = prefix.toCharArray();\n for(int i = 0; i < charArray.length; i++) {\n if (!cur.map.containsKey(charArray[i])) {\n return 0;\n } else {\n cur = cur.map.get(charArray[i]);\n }\n }\n int result = 0;\n Stack<TrieNode> stack = new Stack<>();\n stack.add(cur);\n while(stack.size() > 0) {\n cur = stack.pop();\n result += cur.val;\n for(TrieNode tmp : cur.map.values()) {\n stack.add(tmp);\n }\n }\n return result;\n }", "public int getSum(RedBlackTree.Node<Grade> root) {\r\n int sum, leftSum, rightSum;\r\n if (root == null) {\r\n sum = 0;\r\n return sum;\r\n } else {\r\n leftSum = getSum(root.leftChild);\r\n rightSum = getSum(root.rightChild);\r\n sum = root.data.getGrade() + leftSum + rightSum;\r\n return sum;\r\n }\r\n }", "public void shortestPathsNodes() {\n for (int sourceNode = 0; sourceNode < wordGraph.V(); sourceNode++) {\n BreadthFirstDirectedPaths bfs = new BreadthFirstDirectedPaths(wordGraph, sourceNode);\n\n for (int goalNode = 0; goalNode < wordGraph.V(); goalNode++) {\n Iterable<Integer> shortestPath = bfs.pathTo(goalNode);\n int pathLength = -1;\n if (shortestPath != null) {\n for (int edge : shortestPath) {\n pathLength++;\n }\n }\n if (pathLength != -1) {\n }\n System.out.println(pathLength);\n }\n }\n }" ]
[ "0.7387367", "0.7311666", "0.7200986", "0.7155743", "0.69823086", "0.6862201", "0.68323356", "0.68194926", "0.6785727", "0.6701513", "0.6681145", "0.65850246", "0.6550014", "0.6542001", "0.653523", "0.64852774", "0.6457527", "0.64546317", "0.6430736", "0.6412076", "0.6406595", "0.63980836", "0.6376731", "0.636026", "0.63411766", "0.63296044", "0.6326868", "0.6315235", "0.6309932", "0.62766135", "0.62674665", "0.6266416", "0.6264732", "0.6263803", "0.6251914", "0.6237236", "0.6225255", "0.6216701", "0.6212001", "0.6204869", "0.61994433", "0.6187862", "0.6173585", "0.61363345", "0.6131712", "0.61283773", "0.6097506", "0.6081787", "0.60809565", "0.606745", "0.60499954", "0.60473615", "0.60402787", "0.6036786", "0.60336477", "0.60060275", "0.6003423", "0.59971094", "0.599699", "0.5996823", "0.5990989", "0.59817606", "0.5979902", "0.59759605", "0.59539557", "0.5928521", "0.59098244", "0.58932346", "0.5878007", "0.58763486", "0.5873463", "0.5872429", "0.5870547", "0.58571976", "0.5855404", "0.58509386", "0.5845746", "0.5838477", "0.5816396", "0.581235", "0.5802098", "0.5776371", "0.5752848", "0.57506084", "0.57389146", "0.57376677", "0.57312214", "0.5728943", "0.5722564", "0.57157695", "0.5706458", "0.57062936", "0.57048184", "0.5704331", "0.56960636", "0.56939656", "0.56892705", "0.56735766", "0.56715727", "0.5671302" ]
0.7430472
0
Keys are Google file IDs
private GoogleUtils() { try { readClientConfig(); readRefreshToken(); httpTransport = GoogleNetHttpTransport.newTrustedTransport(); jsonFactory = JacksonFactory.getDefaultInstance(); driveService = this.getDriveService(); noteList = new LinkedHashMap<>(); imageList = new LinkedHashMap<>(); retrieveData(Extension.note, Parameter.LimitDriveNotes.getValueInt()); retrieveData(Extension.jpg, Parameter.LimitDriveNotes.getValueInt()); } catch (GeneralSecurityException | IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getKeyFilePath();", "private String getFilenameForKey(String key) {\n\t\tint firstHalfLength = key.length() / 2;\n\t\tString localFilename = String.valueOf(key.substring(0, firstHalfLength)\n\t\t\t\t.hashCode());\n\t\tlocalFilename += String.valueOf(key.substring(firstHalfLength)\n\t\t\t\t.hashCode());\n\t\treturn localFilename;\n\t}", "abstract public String getImageKey();", "protected String cacheKeyForFile(File file) {\n \treturn file.getAbsolutePath();\n }", "protected void loadKeys() {\n\t\tArrayList<String> lines = ContentLoader.getAllLinesOptList(this.keyfile);\n\t\tfor (String line : lines) {\n\t\t\tString[] parts = line.split(\"=\");\n\t\t\ttry {\n\t\t\t\tint fileID = Integer.parseInt(parts[0].trim());\n\t\t\t\tString restLine = parts[1].trim();\n\t\t\t\tString ccMethodName = restLine;\n\t\t\t\tif (restLine.indexOf('/') > 0) {\n\t\t\t\t\tint leftHashIndex = restLine.indexOf('/');\n\t\t\t\t\tccMethodName = restLine.substring(0, leftHashIndex).trim();\n\t\t\t\t}\n\t\t\t\t// String key = parts[0] + \".java\";\n\t\t\t\tkeyMap.put(fileID, ccMethodName);\n\t\t\t} catch (Exception exc) {\n\t\t\t\tSystem.err.println(line);\n\t\t\t}\n\t\t}\n\t}", "public Long getFileId() {\n/* 35:35 */ return this.fileId;\n/* 36: */ }", "public void setSrcKey(String value) {\n\t\tsrcKey = value;\r\n }", "public abstract String getRefKey();", "com.google.protobuf.ByteString getKeyBytes();", "com.google.protobuf.ByteString getKeyBytes();", "public final String getInternalKey() {\n return CloudImageLoader.generateKey(getInternalUri(), getInternalDownloadType());\n }", "java.lang.String getClientKey();", "public String getIdURLFromFile(String filePath, int key) {\n\t\tHashMap<Integer, String> map = new HashMap<Integer, String>();\n\t\ttry {\n\t\t\tList<String> file1URIs = ClassFactory.getFileUtilityInstance().getURIsFromFile(filePath);\n\t\t\t// create a thread for each URI\n\t\t\tfor (int i = 0; i < file1URIs.size(); i++) {\n\t\t\t\tint id = i + 1;\n\t\t\t\tmap.put(id, file1URIs.get(i));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Error in getting File ID and URL Value\" + e.getMessage());\n\t\t}\n\t\treturn map.get(key);\n\t}", "protected String getKeyfileParameter() {\n if (keyfile != null) {\n return \"/keyfile:\" + keyfile.toString();\n } else {\n return null;\n }\n }", "private static String getKey(String filename) throws IOException {\n\t\tString strKeyPEM = \"\";\n\t\tBufferedReader br = new BufferedReader(new FileReader(filename));\n\t\tString line;\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tstrKeyPEM += line;\n\t\t}\n\t\tbr.close();\n\t\treturn strKeyPEM;\n\t}", "public com.android.build.gradle.internal.cxx.caching.ObjectFileKeyOrBuilder getObjectFileKeyOrBuilder() {\n return getObjectFileKey();\n }", "public static String getKeyFile() {\n\t\tif (xml == null) return null;\n\t\treturn keyfile;\n\t}", "private String getKey() {\r\n if (key == null) {\r\n key = getURI();\r\n }\r\n return key;\r\n }", "public com.android.build.gradle.internal.cxx.caching.ObjectFileKey getObjectFileKey() {\n return objectFileKey_ == null ? com.android.build.gradle.internal.cxx.caching.ObjectFileKey.getDefaultInstance() : objectFileKey_;\n }", "public Object attachment(Object key);", "public String getImgKey() {\n return imgKey;\n }", "public com.android.build.gradle.internal.cxx.caching.ObjectFileKey getObjectFileKey() {\n if (objectFileKeyBuilder_ == null) {\n return objectFileKey_ == null ? com.android.build.gradle.internal.cxx.caching.ObjectFileKey.getDefaultInstance() : objectFileKey_;\n } else {\n return objectFileKeyBuilder_.getMessage();\n }\n }", "FileStore getFile(String fileRefId);", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "public long getFileGroupId();", "public static String getKey(String clientId) {\n return Config.get(\"key.\" + clientId, \"\", TAG_ATTACHMENT_SERVICE, getAppSet());\n }", "com.google.protobuf.ByteString\n getKeyBytes();", "com.google.protobuf.ByteString\n getKeyBytes();", "com.google.protobuf.ByteString\n getKeyBytes();", "public static int getFileID() {\n\t\treturn StringArray.fileID;\n\t}", "public int getId() {\n // some code goes here\n \treturn m_f.getAbsoluteFile().hashCode();\n }", "private static byte[] getKeyData(String filePath) {\n File file = new File(filePath);\n byte[] buffer = new byte[(int) file.length()];\n FileInputStream fis = null;\n try {\n fis = new FileInputStream(file);\n fis.read(buffer);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (fis != null)\n try {\n fis.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return buffer;\n }", "public String getKey();", "public String getKey();", "public String getKey();", "public String getKey();", "public interface Keys {\n\n String PUBLIC_REPOS = \"repos\";\n String USER = \"user\";\n String ID = \"id\";\n}", "public interface Key {\n\n String SHARE_KEY = \"userIndo\";//用户信息\n String SHARE_USER_ID = \"userId\";//用户账号\n\n}", "String getLongNameKey();", "KeyMetadata metadata();", "String key();", "Object getAuthInfoKey();", "com.google.protobuf.ByteString\n getKeyBytes();", "com.google.protobuf.ByteString\n getKeyBytes();", "public String getKey() {\r\n\t\t\treturn getCacheFile();\r\n\t\t}", "private FileIDDictionary() {\n }", "void saveKeys(String publicKeyFileLocation, String secretKeyFileLocation) throws IOException;", "public static FileIDDictionary getInstance() {\n return FILE_ID_DICTIONARY;\n }", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "QFileFormatKey getFormatKey();", "private String key(RepositoryModel repository, KeyType key, long id) {\n\t\treturn key(repository, key, \"\" + id);\n\t}", "static String[] getKey() {\n return key;\n }", "public Object getId(String key) {\n return ids.get(key);\n }", "com.google.protobuf.ByteString\n getClientKeyBytes();", "public String getUserPart(String key);", "byte[] getKey();", "void saveKeys(PGPPublicKeyRingCollection publicKeyRings, PGPSecretKeyRingCollection secretKeyRings, String publicKeyFileLocation, String secretKeyFileLocation) throws IOException;", "public String key() {\n return key;\n }", "public String key() {\n return key;\n }", "String galleryItemIdentity();", "Text getKey() throws IOException;", "public String getKey() {\r\n return getAttribute(\"id\");\r\n }", "public Blob downloadFile(String inKey, String inFileName);", "@Override\n\tpublic String getKey() {\n\t\treturn id+\"\";\n\t}", "PathKeys getPathKeys();", "public int getId() {\n // some code goes here\n return f.getAbsoluteFile().hashCode();\n //throw new UnsupportedOperationException(\"implement this\");\n }", "@Override\n public String getPicPhoto() {\n return pic_filekey;\n }", "public static String getKey() {\t\t\n\t\treturn key;\n\t}", "private void saveCacheKey(String key){\n \n if (!saveCacheKeys)\n return;\n \n String cacheKey = VolleyUtils.BitmapCache.getCacheKey(builder, key, 0, 0);\n if (!cacheKeys.contains(cacheKey))\n cacheKeys.add(cacheKey);\n }", "ApiKeys listKeys();", "private String key(RepositoryModel repository, KeyType key, String id) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(repository.name).append(':');\n\t\tsb.append(key.name());\n\t\tif (!StringUtils.isEmpty(id)) {\n\t\t\tsb.append(':');\n\t\t\tsb.append(id);\n\t\t}\n\t\treturn sb.toString();\n\t}", "@Override\n public String getKey()\n {\n return id; \n }", "public Long getFileId() {\n return this.fileId;\n }", "public static final Iterator<String> filenames() {\n return tableTracker.keySet().iterator();\r\n }", "public String getEncKeyFor(String fileName) {\n Log.i(\"getEncKeyFor\", \"Begining to get EncKey for file \" + fileName);\n Cursor resultSet =\n database.rawQuery(\"SELECT EncKey FROM FileKeys \" +\n \"WHERE UserPublicKey = '\" + new KeyGenerator(context).getPublicKeyAsString() + \"' \" +\n \"AND File = '\" + fileName + \"'\", null);\n resultSet.moveToFirst();\n Log.i(\"getEncKeyFor\", \"EncKey is \" + resultSet.getString(0));\n String retString = resultSet.getString(0);\n resultSet.close();\n return retString;\n }", "public void setKeyfile(File keyfile) {\n this.keyfile = keyfile;\n }", "protected static long getId(String key) {\n\t\treturn KeyFactory.stringToKey(key).getId();\n\t}", "private final static String getKey( Integer id ) {\n\t\treturn \"\" + id ;\n\t}", "public final int getFileId() {\n\t\treturn m_fileId;\n\t}", "public com.android.build.gradle.internal.cxx.caching.ObjectFileKeyOrBuilder getObjectFileKeyOrBuilder() {\n if (objectFileKeyBuilder_ != null) {\n return objectFileKeyBuilder_.getMessageOrBuilder();\n } else {\n return objectFileKey_ == null ?\n com.android.build.gradle.internal.cxx.caching.ObjectFileKey.getDefaultInstance() : objectFileKey_;\n }\n }", "public static int Id(String key) {\n try {\n File file = FileHandler.loadFile(key + \".id\");\n InputStream input = new FileInputStream(Objects.requireNonNull(file));\n Scanner scanner = new Scanner(input);\n int id = scanner.nextInt();\n scanner.close();\n input.close();\n return id;\n } catch (FileNotFoundException fileNotFoundException) {\n fileNotFoundException.printStackTrace();\n logger.fatal(key + \"id file doesnt exist.\");\n } catch (IOException e) {\n e.printStackTrace();\n logger.error(\"couldn't read from \" + key + \" id file.\");\n }\n return 0;\n }", "public String getUsageID(String key)\n {\n String lang_code;\n if(key.indexOf(\"_\")==2)\n {\n lang_code = key.substring(0,2);\n key = key.substring(3,key.length());\n }\n else\n {\n return null;\n }\n return getUsageVersionID(lang_code,key);\n }", "public void setIdkey(String pIdkey){\n this.idkey = pIdkey;\n }", "public String getFileId() {\n return fileId;\n }" ]
[ "0.65967655", "0.6304495", "0.6045456", "0.6017307", "0.590231", "0.58857507", "0.5726996", "0.5654685", "0.56466335", "0.56466335", "0.5597962", "0.55618143", "0.55169314", "0.55106866", "0.5483267", "0.5478189", "0.5472883", "0.54604673", "0.5445569", "0.5440264", "0.54342437", "0.54157925", "0.5404522", "0.53970337", "0.53970337", "0.53970337", "0.53970337", "0.53970337", "0.53970337", "0.53970337", "0.53970337", "0.53970337", "0.53970337", "0.53970337", "0.53970337", "0.53970337", "0.53817457", "0.5373627", "0.53696173", "0.53696173", "0.53696173", "0.5349144", "0.5315655", "0.53149486", "0.5305651", "0.5305651", "0.5305651", "0.5305651", "0.52852404", "0.5272487", "0.5266851", "0.5261939", "0.52601147", "0.5251065", "0.52466667", "0.52466667", "0.52440625", "0.5243926", "0.5238857", "0.5229986", "0.522009", "0.522009", "0.522009", "0.522009", "0.522009", "0.522009", "0.5218042", "0.5213073", "0.5211431", "0.52080107", "0.5203759", "0.52017593", "0.51935774", "0.5178792", "0.51734257", "0.51734257", "0.51724213", "0.5169727", "0.5162519", "0.51593596", "0.51479024", "0.5141522", "0.513502", "0.51348245", "0.5131282", "0.51176053", "0.51132977", "0.5108296", "0.5102284", "0.50979584", "0.5095692", "0.5082069", "0.50774705", "0.5077415", "0.50741553", "0.5071825", "0.50692314", "0.5066561", "0.5064971", "0.50623465", "0.50604784" ]
0.0
-1
if current user clicks the user's comments or their stuff
@Override public void onClick(View v) { int position = (Integer) v.getTag(); Object object = getItem(position); UserRatingDataModel dataModel = (UserRatingDataModel) object; switch(v.getId()){ } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean didUserClick(){\n return userClick;\n }", "public boolean isClicked() { return clicked; }", "@Override\n public void onClick(View view) {\n if(myUid.equals(uid)){\n // show deletr dialog\n AlertDialog.Builder builder = new AlertDialog.Builder(view.getRootView().getContext());\n builder.setTitle(\"Delete Comments\");\n builder.setMessage(\"Are You Serious Delete This ?\");\n builder.setPositiveButton(\"Delete\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n deleteComments(cid);\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n });\n builder.create().show();\n }else{\n // not my comment\n Toast.makeText(context, \"Can't Delete Other User Post...\", Toast.LENGTH_SHORT).show();\n }\n }", "public boolean canComment(Session session);", "private void checkMouseClick()\n {\n MouseInfo userClick = Greenfoot.getMouseInfo();\n \n int columnNum;\n int rowNum;\n \n if( Greenfoot.mouseClicked(this) )\n {\n columnNum = userClick.getX() / ( getWidth() / 3 );\n rowNum = userClick.getY() / ( getHeight() / 3 );\n \n if( board[rowNum][columnNum] == \"\" )\n {\n if( PlayerOneTurn == true )\n {\n board[rowNum][columnNum] = \"X\";\n \n PlayerOneTurn = false;\n messageShown = false;\n }\n else\n {\n board[rowNum][columnNum] = \"O\";\n \n PlayerOneTurn = true;\n messageShown = false;\n }\n }\n else\n {\n JOptionPane.showMessageDialog( null, \"you should select a different spot.\", \"Wrong step\", JOptionPane.PLAIN_MESSAGE );\n }\n }\n \n }", "private void checkCommentsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkCommentsActionPerformed\n if(hasComments){\n hasComments = false;\n }\n else{\n hasComments = true;\n }\n }", "@Override\n public void onClick(View view) {\n if (post.isLikedByUser) {\n removeLike(post);\n } else {\n likePost(post);\n }\n }", "public boolean getIsClick() {return isClick;}", "@Override\n\t\tpublic void onClick(View v) {\n\t\t if(!AppUtil.isNetworkAvailable(mContext)){\n\t\t\tToast.makeText(mContext, string.intent_no, Toast.LENGTH_SHORT).show();\n\t\t\treturn;\n\t\t }\n\t\t if(!YKCurrentUserManager.getInstance().isLogin()){\n\t\t\tnew AlertDialog.Builder(CommentActivity.this).setTitle(\"确认举报\") \n\t\t\t.setIcon(android.R.drawable.ic_dialog_info) \n\t\t\t.setPositiveButton(\"举报\", new DialogInterface.OnClickListener() { \n\n\t\t\t @Override \n\t\t\t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\tToast.makeText(CommentActivity.this, \"举报成功,我们会及时处理!!!\", Toast.LENGTH_SHORT).show();\n\t\t\t } \n\t\t\t}) \n\t\t\t.setNegativeButton(\"取消\", new DialogInterface.OnClickListener() { \n\n\t\t\t @Override \n\t\t\t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\t// 点击“返回”后的操作,这里不设置没有任何操作 \n\t\t\t } \n\t\t\t}).show(); \n\t\t }else{\n\t\t if(YKCurrentUserManager.getInstance().getUser().getId().equals(comment.getmAuthor().getID())){\n\t\t\tmCommentEdit.clearFocus();\n\t\t\tYKUtil.hideKeyBoard(mContext, mCommentEdit);\n\t\t\tnew AlertDialog.Builder(CommentActivity.this).setTitle(\"确认删除\") \n\t\t\t.setIcon(android.R.drawable.ic_dialog_info) \n\t\t\t.setPositiveButton(\"确认\", new DialogInterface.OnClickListener() { \n\n\t\t\t @Override \n\t\t\t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\tdeleteAllComment(comment);\n\t\t\t } \n\t\t\t}) \n\t\t\t.setNegativeButton(\"取消\", new DialogInterface.OnClickListener() { \n\n\t\t\t @Override \n\t\t\t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\t// 点击“返回”后的操作,这里不设置没有任何操作 \n\t\t\t } \n\t\t\t}).show(); \n\n\t\t }else{\n\t\t\tmCommentEdit.clearFocus();\n\t\t\tYKUtil.hideKeyBoard(mContext, mCommentEdit);\n\t\t\tnew AlertDialog.Builder(CommentActivity.this).setTitle(\"确认举报\") \n\t\t\t.setIcon(android.R.drawable.ic_dialog_info) \n\t\t\t.setPositiveButton(\"举报\", new DialogInterface.OnClickListener() { \n\n\t\t\t @Override \n\t\t\t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\tToast.makeText(CommentActivity.this, \"举报成功,我们会及时处理!!!\", Toast.LENGTH_SHORT).show();\n\t\t\t } \n\t\t\t}) \n\t\t\t.setNegativeButton(\"取消\", new DialogInterface.OnClickListener() { \n\n\t\t\t @Override \n\t\t\t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\t// 点击“返回”后的操作,这里不设置没有任何操作 \n\t\t\t } \n\t\t\t}).show(); \n\t\t }\n\t\t }\n\t\t}", "boolean hasClickView();", "@Override\n\t\t\tpublic void onClick(View v) {\n\n\t\t\t\tcheckUser();\n\t\t\t}", "@Override\r\n public void onClick(View v) {\n profileClick(mFeedReplyList.get(pos));\r\n }", "public boolean isClicked() {\n\t\treturn clicked;\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tcommentListSize = commentList.size();\n\t\t\t\tif(commentListSize > 1){\n\t\t\t\t\tcommentReplying = commentList.get(commentListSize - 2);\n\t\t\t\t\tstartActivity(openLecturerReply);\n\t\t\t\t}\n\t\t\t\t//setContentView(R.layout.activity_timetable__gui);\n\t\t\t}", "public void contactOwnerBtnClicked() {\n if (contactOwnerButtonClickedOnceBefore) {\n String chatID = dataModel.findChatID(advertisement.getUniqueID());\n if (chatID != null) {\n openChat(chatID);\n } else {\n createNewChat();\n }\n } else {\n view.setOwnerButtonText();\n }\n\n contactOwnerButtonClickedOnceBefore = true;\n }", "@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\tif (Constants.userID == 0) { // If no one is signed in\n\t\t\t\t\tdispose();\n\t\t\t\t\tgame.setScreen(new UserInfoScreen(game));\n\t\t\t\t} else { // If a user is currently signed in\n\t\t\t\t\tConstants.userID = 0;\n\t\t\t\t\tConstants.user = \"Temporary User\";\n\t\t\t\t\tcreate();\n\t\t\t\t}\n\t\t\t}", "@Override\n public void onClick(View view) {\n\n sharedPrefManager.addNotificationCount(1);\n Log.d(TAG, \"shared pref count: \" + sharedPrefManager.getNotificationCount());\n\n\n if (userMemberType == 1 || userMemberType == 2) {\n showMyWillQuestionDialog();\n\n } else if (userMemberType == 3) {\n goToMyWill();\n\n } else {\n showAccessDeniedDialog();\n }\n /*testNoWill();*/\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tcommentListSize = commentList.size();\n\t\t\t\tif(commentListSize != 0){\n\t\t\t\t\tcommentReplying = commentList.get(commentListSize - 1);\n\t\t\t\t\tstartActivity(openLecturerReply);\n\t\t\t\t}\n\t\t\t\t//setContentView(R.layout.activity_timetable__gui);\n\t\t\t}", "private void handleLikeButtonClick() {\n boolean performLike = !CurrentUser.hasLiked(prismPost);\n performUIActivitiesForLike(performLike);\n\n if (performLike) {\n DatabaseAction.performLike(prismPost);\n } else {\n DatabaseAction.performUnlike(prismPost);\n }\n }", "private void makePostCommentClickable() {\n\t\tButton postComment = (Button) findViewById(R.id.postComment);\n\t\tpostComment.setOnClickListener(new View.OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tsendDataToServer();\n\t\t\t}\n\t\t});\n\t}", "public boolean canEditComment(Session session, Comment comment);", "private void userSelected(MouseEvent e) {\n User user = getUser(e);\n if (user != null) {\n userListener.userClicked(user, e);\n }\n }", "public boolean isClicked() {\n\n// Cycles through all menu cursors\n for (MenuCursor cursor : Main.cursors) {\n\n// If the cursor has a controller and the select button is clicked, return true\n if (cursor.controller != null) {\n if (Main.contains(Main.recentButtons.get(cursor.controller), ControllerButtons.A)) {\n if (isCursorOver(cursor)) {\n this.cursor = cursor;\n return true;\n }\n }\n\n// Otherwise, if the cursor is using a keyboard and the select button is pressed, return true\n } else {\n if (Gdx.input.isKeyJustPressed(Keys.MENU_SELECT)) {\n if (isCursorOver(cursor)) {\n this.cursor = cursor;\n return true;\n }\n }\n }\n }\n// If none of these events occur, return false\n return false;\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(isAdded()){\n\t\t\t\t\tif(comment.getText().length()>0){\n\n\t\t\t\t\t\t//\t\t\t\t\t\tcommentSubject=subject.getText().toString().trim();\n\t\t\t\t\t\tcommentStr=comment.getText().toString().trim();\n\t\t\t\t\t\tif(sharedImagePath==null){\n\t\t\t\t\t\t\tAlertHomeFragment dialog=new AlertHomeFragment(HomeFragment.this,\"Info\",\"Image not added to post.\\n\\nNote: Sharing your image with your status is recommended.\",\"Proceed Anyway\",\"Cancel\",false,\"not_added\");\n\t\t\t\t\t\t\tdialog.setCancelable(true);\n\t\t\t\t\t\t\tdialog.show(fm, \"post\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tmyPrefs = getActivity().getSharedPreferences(\"myPrefs\",getActivity().MODE_PRIVATE);\n\t\t\t\t\t\t\tdoPostCommentsActions(myPrefs);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tAlertHomeFragment dialog=new AlertHomeFragment(HomeFragment.this,\"Warning\",\"All fields are mandatory to be filled.\",\"OK\",\"Proceed\",true,\"field_check\");\n\t\t\t\t\t\tdialog.setCancelable(true);\n\t\t\t\t\t\tdialog.show(fm, \"field\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tstatusAlert.dismiss();\n\t\t\t\t\tToast.makeText(getActivity(), \"Something went wrong.Try sharing your updates again.\", 1000).show();\n\t\t\t\t}\n\t\t\t}", "@When(\"User clicks comment\")\n\tpublic void user_clicks_comment() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tcheckAnswer(true);\n\t\t\t\t\n\t\t\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(context, CommentActivity.class);\n intent.putExtra(\"comment_id\", String.valueOf(comments.get(pos).getId()));\n intent.putExtra(\"idc\", comments.get(pos).getId());\n intent.putExtra(\"content \",comments.get(pos).getDescription());\n context.startActivity(intent);\n }", "public void onClick(DialogInterface dialogBox, int id) {\n if(userInputDialogEditText.getText().toString().equals(\"rohitrohit\")){\n\n //Toast.makeText(c, \"You have Access!\", Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(getApplicationContext(),FeedBackActivity.class);\n startActivity(intent);\n\n\n }\n else{\n Toast.makeText(MainActivity.this, \"You Do not have the access to this feature!\", Toast.LENGTH_SHORT).show();\n }\n\n\n\n }", "@Override\n public void onClick(View view) {\n CheckUserPermsions();\n }", "void contentList_mouseClicked(MouseEvent e) {\n if (e.getClickCount() > 1) {\n doView();\n }\n\n }", "@Override\n public void onUserClicked(Users users) {\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString tag=(String)inputView.getTag();\n\t\t\t\tString act,id,content;\n\t\t\t\tcontent=inputView.getText().toString();\n\t\t\t\tif(!content.contains(\"@\")){\n\t\t\t\t\ttag=null;\n\t\t\t\t}\n\t\t\t\tif(tag!=null){\n\t\t\t\t\tact=REPLY_COMMENT;\n\t\t\t\t\tid=tag;\n\t\t\t\t}else{\n\t\t\t\t\tact=COMMENT_POST;\n\t\t\t\t\tid=post.getPost_id();\n\t\t\t\t}\n\t\t\t\tfinal Map<String, String> reply = new HashMap<String, String>();\n\t\t\t\treply.put(\"app\", APP);\n\t\t\t\treply.put(\"mod\", MOD);\n\t\t\t\treply.put(\"act\", act);\n\t\t\t\treply.put(\"id\", id);\n\t\t\t\treply.put(\"content\", content);\n\t\t\t\treply.put(\"oauth_token\", OAUTH_TOKEN);\n\t\t\t\treply.put(\"oauth_token_secret\", OAUTH_TOKEN_SECRECT);\n\t\t\t\tnew Thread(new WeibaActionHelper(myHandler, mContext,\n\t\t\t\t\t\treply, COMMENT_OK)).start();\n\t\t\t}", "protected void mouseClicked(int par1, int par2, int par3)\n {\n if (par3 == 0)\n {\n ChatClickData chatclickdata = mc.ingameGUI.func_50012_a(Mouse.getX(), Mouse.getY());\n\n if (chatclickdata != null)\n {\n URI uri = chatclickdata.func_50089_b();\n\n if (uri != null)\n {\n field_50065_j = uri;\n mc.displayGuiScreen(new GuiChatConfirmLink(this, this, chatclickdata.func_50088_a(), 0, chatclickdata));\n return;\n }\n }\n }\n\n field_50064_a.mouseClicked(par1, par2, par3);\n super.mouseClicked(par1, par2, par3);\n }", "@Override\n public void onClick(View view) {\n\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n\n if (favorited) {\n unFavorite(mangaID, user);\n } else {\n favorite(mangaID, mangaDetails.getTitle(), user);\n }\n\n }", "public static void doVoteAndComment() {\n }", "private void commentPopItemActionPerformed(java.awt.event.ActionEvent evt) {\n comment();\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(context ,commentshow.class);\n context.startActivity(intent);\n\n\n }", "public void mouseClicked() {\n\t\tswitch(screen) {\n\t\t\n\t\t// Pantalla Home\n\t\tcase 0:\n\t\t\tif((mouseX > 529 && mouseY > 691) && (mouseX < 966 & mouseY < 867)) {\n\t\t\t\t//si hace click adentro del boton de jugar\n\t\t\t\tscreen = 1;\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t// Pantalla Instrucciones\n\t\tcase 1:\n\t\t\t//si hace click adentro de la pantalla\n\t\t\tscreen = 2;\n\t\t\tbreak;\n\t\t}\n\t}", "public abstract void onFirstUserVisible();", "public boolean wasClicked(int mouseX, int mouseY) {\n\t\t// If this is the blank piece, we leave immediately\n\t\t// because it can't be swapped\n\t\tif(num == 1) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Checks to see if the user's click location is within the \n\t\t// square location of this Piece\n\t\tif(mouseX > x && mouseX < (x + size) && mouseY > y && mouseY < (y + size)) {\n\t\t\treturn true;\n\t\t} \n\t\t\n\t\treturn false;\n\t}", "void onUserHasntLearntAboutDrawer();", "@Override\n public void onClick(View v) {\n String currentUser = firebaseAuth.getCurrentUser().getUid();\n// Log.d(TAG, \"onClickActif: \" + currentUser);\n\n if (!currentUser.equals(user_id)) {\n\n Log.d(TAG, \"onClickFriend: \");\n Intent komentar = new Intent(v.getContext(), FriendActivity.class);\n komentar.putExtra(\"idUser\", user_id);\n v.getContext().startActivity(komentar);\n } else {\n Log.d(TAG, \"onClickProfile: \");\n Intent komentar = new Intent(v.getContext(), ProfileActivity.class);\n komentar.putExtra(\"idUser\", user_id);\n v.getContext().startActivity(komentar);\n }\n }", "public boolean isDisplayed_click_My_Rewards_Link(){\r\n\t\tif(click_My_Rewards_Link.isDisplayed()) { return true; } else { return false;} \r\n\t}", "@Override\n public void onClick(View view) {\n // Opens the next page (left)\n //=================================\n if (!leftIsEmpty) {\n Intent nextIntent = new Intent(GlobalPageActivity.this,GlobalPageActivity.class);\n nextIntent.putExtra(\"nextpage\", mThisPage.getNextLeft());\n nextIntent.putExtra(\"MyUserId\", iUserId);\n startActivity(nextIntent);\n finish();\n return;\n }\n\n //=================================\n // Edits the button (left) or\n // denies you access if being worked on\n //=================================\n if (mainIsEmpty){\n Toast.makeText(GlobalPageActivity.this, getResources().getString(R.string.draw_picture_first), Toast.LENGTH_SHORT).show();\n } else {\n if (!mThisPage.getLeftUser().equals(iUserId) && !mThisPage.getRightUser().equals(iUserId) && !mThisPage.getUser().equals(iUserId)) {\n createLeftDialog();\n } else {\n Toast.makeText(GlobalPageActivity.this, getResources().getString(R.string.done_something_already), Toast.LENGTH_SHORT).show();\n }\n }\n }", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tSystem.out.println(\"vai ficar clikando ai a toa? PATETA\");\n\t\t\t\t\n\t\t\t}", "@Override\n public void onClick(final View view) {\n final ParseRelation<ParseUser> likers = post.getRelation(\"likers\");\n final ParseQuery<ParseUser> usrLikers = likers.getQuery();\n usrLikers.findInBackground(new FindCallback<ParseUser>() {\n @Override\n public void done(List<ParseUser> objects, ParseException e) {\n if (e == null) {\n Log.i(\"USERS:\", \"Looking for current user\");\n for (int i = 0; i < objects.size(); i++) {\n Log.i(\"USERS:\", objects.get(i).getUsername());\n if (objects.get(i).getObjectId().equals(ParseUser.getCurrentUser().getObjectId())) {\n liked[0] = true;\n break;\n }\n }//end loop\n if (liked[0]) {\n unlikePost(view,post,likers,liked);\n } else {\n likePost(view,post,likers);\n }\n }//end works\n }//end done\n });\n }", "@Override\n public boolean onMenuItemClick(MenuItem item) {\n if (item.getItemId() == R.id.flagAsAbusive) {\n if (mUserInfoHandler.isUserLoggedIn()) {\n mProductDetailsViewModel.callReportReviewApi(mReviewId);\n } else {\n startBoardingAct();\n }\n return true;\n }\n return false;\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(flag){\n\t\t\t\t\tScrollView.setVisibility(View.GONE);\n\t\t\t\t\tdetail_comment.setVisibility(View.VISIBLE);\n\t\t\t\t\tinitCommentList();\n\t\t\t\t\tflag=!flag;\n\t\t\t\t}else{\n\t\t\t\t\tScrollView.setVisibility(View.VISIBLE);\n\t\t\t\t\tdetail_comment.setVisibility(View.GONE);\n\t\t\t\t\t//getChildFragmentManager().beginTransaction().hide(post_comment_list).commit();\n\t\t\t\t\tflag=!flag;\n\t\t\t\t}\n\t\t\t}", "@Override\n public void onCommentsClick() {\n\n Intent intent = new Intent(getActivity(), VideoCommentsActivity.class);\n\n Bundle bundle = new Bundle();\n bundle.putParcelable(LikedVideosFragment.KEY_VIDEO, video);\n intent.putExtras(bundle);\n\n startActivity(intent);\n }", "public boolean isMouseClicked(){\n\t\treturn mouseClick;\n\t}", "public boolean isClicked() {\n\t\tif(GameMouse.getInstance().getX() < x || GameMouse.getInstance().getX() > x + width) {\n\t\t\treturn false; //X is outside our button\n\t\t}\n\t\tif(GameMouse.getInstance().getY() < y || GameMouse.getInstance().getY() > y + height) {\n\t\t\treturn false; //X is outside our button\n\t\t}\n\t\treturn GameMouse.getInstance().isClicked(GameMouse.LEFT_BUTTON);\n\t}", "public interface INearCircleCommentItemListener {\n void onCommentUserClick(NearCircleComment comment);\n\n void onReplyUserClick(NearCircleComment comment);\n\n void onCommentContentClick(NearCircleComment comment);\n\n boolean onCommentLongClick(View view, NearCircleComment comment);\n}", "public void onClicked();", "@Override\n public void onClick(View v) {\n\n if (v.getId() == rateBtn.getId()) {\n Intent intent = new Intent(mContext, Rating.class);\n mContext.startActivity(intent);\n }else if (v.getId() == commentBtn.getId()) {\n Intent intent = new Intent(mContext, CommentList.class);\n intent.putExtra(MsgAdapter.MESSAGE_ID, itemList.get(getAdapterPosition()).getUID());\n mContext.startActivity(intent);\n } else {\n Toast.makeText(v.getContext(), \"ROW PRESSED = \" + String.valueOf(getAdapterPosition()), Toast.LENGTH_SHORT).show();\n }\n }", "private void clickcallback() {\n final ListView listView = findViewById(R.id.listViewCollections);\n\n listView.setOnItemClickListener(ClickListener());\n\n if (friendID == null) {\n listView.setOnItemLongClickListener(LongClickListener());\n }\n }", "@Override\n public void onClick(View view) {\n Intent i = new Intent(getBaseContext(), DebateWriteCommentActivity.class);\n startActivity(i);\n }", "@FXML private void okButtonActivity() {\n if (activeUser != null && !activeUser.getUsername().equals(recipe.getAuthor())){\n okButton.setDisable(false);\n }\n }", "public boolean isMouseClicked() {\n\t\treturn input.isMouseClicked();\n\t}", "abstract public boolean onPositiveClicked(String userInput);", "@Override\r\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tif(et.getText() == null){\r\n\t\t\t\t\tmsgString = \"\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tmsgString = et.getText().toString();\r\n\t\t\t\t}\r\n\t\t\t\tmConnectUtil = new ConnectUtil(ThirdCommentPageActivity.this, mHandler,0);\r\n\t\t\t\tmConnectUtil.connect(addUrlParam(pageid==PageID.PAGEID_COMMENT_USER_FORM?URLUtil.URL_FORM_THIRDCOMMENT:URLUtil.URL_COMMENT_THIRDCOMMENT, UserUtil.userid, subjectid, commentid, msgString), HttpThread.TYPE_PAGE, 0);\r\n\t\t\t}", "@Override\n public void onClick(View view) {\n getUserRequest();\n }", "public abstract void notifyUser(final User user, final Comment comment);", "public void execute(){\n\t \tif(type == ClickableType.USERNAME)\n\t \t\tUserModerationWindow.createUserWindow(UserList.getUser(Window.getCurrentConnection(), ((String)value).toLowerCase()));\n\t \t//Emote was clicked: Opens window displaying information about the emote\n\t \telse if(type == ClickableType.EMOTE){\n\t \t\tEmote emote = (Emote)value;\n\t \t\tString print = \"Name: \" + emote.getName() + \n\t \t\t\t\t\"\\nChannel: \" + emote.getChannel() + \n\t \t\t\t\t\"\\nID: \" + emote.getID() + \n\t \t\t\t\t\"\\nFrom: \" + emote.getEmoteType().name();\n\t \t\t//If emote is Twitch emote\n\t \t\tif(emote.getEmoteType()!=EmoteType.TWITCH)\n\t \t\t\tprint += \"\\nCreator: \" + emote.getCreator(); \n\t \t\tDialogs.iconMessage(\"Emote - \" + emote.getName(), print, emote.getIcon());\n\t \t}\n\t \t//Badge icon was clicked: Opens window displaying information about the badge\n\t \telse if(type == ClickableType.BADGE){\n\t \t\tBadgeType type = (BadgeType)value;\n\t \t\tDialogs.iconMessage(\"Badge - \" + type.getAPIName(), \n\t \t\t\t\t\"Name: \" + type.getName() + \n\t \t\t\t\t\"\\nVersion: \" + type.getVersion() + \n\t \t\t\t\t\"\\nDescription: \"+ type.getDescription() + \n\t \t\t\t\t\"\\nShort Name: \" + type.getBadge().getShortName(), \n\t \t\t\t\ttype.getAttribute().getIcon());\n\t \t}\n\t \t//Ban icon was clicked: Bans the user from chat\n\t \telse if(type == ClickableType.BAN){\n\t \t\tUser user = (User)value;\n\t \t\tModerationTools.ban(user);\n\t \t}\n\t \t//Timeout icon was clicked: Bans user for 10 minutes\n\t \telse if(type == ClickableType.TIMEOUT){\n\t \t\tUser user = (User)value;\n\t \t\tModerationTools.timeout(user, 600);\n\t \t}\n\t }", "@Override\n\tpublic void squareClicked(Square s, Game g) {\n\t\tif (g.nextTurn() == this.me) { // if there are two Human players, make sure only the currentPlayer's square is marked\n\t\t\tclickedSquareLocation = s.getSquareLocation();\t\t\t\n\t\t\tclicked = true;\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tcheckAnswer(false);\n\t\t\t\t\n\t\t\t}", "int isUserLikedCommentAlready(long lifeHackId, long userId) throws DaoException;", "public void clickCommentsLink(WebDriver driver) throws InterruptedException\n\t{\n\t\tString actEggs = driver.findElement(By.cssSelector(\"h3\")).getText();\n\t System.out.println(actEggs);\n\t actEggs = actEggs.trim();\n\t Assert.assertEquals(\"WANT TO GET REALLY RICH? PUT YOUR EGGS IN ONE BASKET...\", actEggs);\n\t //Click on Comments section\n driver.findElement(By.cssSelector(\".arrow-articale > a:nth-child(1) > img:nth-child(1)\")).click();\n Thread.sleep(5000);\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = getIntent();\n\t\t\t\tint pos = intent.getIntExtra(\"position\", 0);\n\t\t\t\tint uid = intent.getIntExtra(\"userid\", -1);\n\t\t\t\tString review =et_review.getText().toString();\n\t\t\t\tfloat rate = rating.getRating();\n\t\t\t\tif(db.saveReview(uid,pos,review,rate,review_given) >0 )\n\t\t\t\t\t{\n\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t Toast.makeText(getApplicationContext(), \"Review Saved!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t review_given=false;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Review given already!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "public boolean isUserChoice() {\n return ACTION_UserChoice.equals(getAction());\n }", "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 }", "private boolean hasLinkToUseraccess(Paymentform paymentform) {\n return paymentform.getPaymentformUserid() != null;\n }", "public boolean isDisplayed_click_ActivateCoupon_Button(){\r\n\t\tif(click_ActivateCoupon_Button.isDisplayed()) { return true; } else { return false;} \r\n\t}", "@Override\n\tpublic void doComment(LoginDetails loginDetails) {\n\t\tif (loginDetails != null) {\n\t\t\tSystem.out.println(\"boomer Post is commented successfully by \" + loginDetails.getUsername());\n\t\t}\n\t}", "@Override\n public void mouseClicked(MouseEvent e) {\n clicked = true;\n }", "@Override\n public void onClick(View view) {\n // Opens the next page (right)\n //=================================\n if (!rightIsEmpty) {\n Intent nextIntent = new Intent(GlobalPageActivity.this,GlobalPageActivity.class);\n nextIntent.putExtra(\"nextpage\", mThisPage.getNextRight());\n nextIntent.putExtra(\"MyUserId\", iUserId);\n startActivity(nextIntent);\n finish();\n return;\n }\n\n //=================================\n // Edits the button (right) or\n // denies you access if being worked on\n //=================================\n if (mainIsEmpty){\n Toast.makeText(GlobalPageActivity.this, getResources().getString(R.string.draw_picture_first), Toast.LENGTH_SHORT).show();\n } else {\n if (!mThisPage.getLeftUser().equals(iUserId) && !mThisPage.getRightUser().equals(iUserId) && !mThisPage.getUser().equals(iUserId)) {\n createRightDialog();\n } else {\n Toast.makeText(GlobalPageActivity.this, getResources().getString(R.string.done_something_already), Toast.LENGTH_SHORT).show();\n }\n }\n }", "public void clickYes ();", "public boolean isCardClicked(){\n\t\treturn cardClicked;\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tLinkLikeButton source = (LinkLikeButton) e.getSource();\r\n\t\tif(e.getClickCount()==1){\r\n\t\tif (source.getName().equals(\"TableLinkLikeButton\")) {\r\n\t\t\tif (source.getText().equals(\"Tags\") || source.getText().equals(\"Ingress\") || source.getText().equals(\"Egress\") || source.getText().equals(\"Rules\") || source.getText().equals(\"All Actions\") || source.getText().equals(\"All Conditions\")\r\n\t\t\t\t\t|| source.getText().equals(\"Redirect\") || source.getText().startsWith(\"ELBs\") || source.getText().contains(\"targetgroup\") || source.getText().contains(\"Method Settings\")) {\r\n\t\t\t\t// Do nothing\r\n\t\t\t} else {\r\n\t\t\t\tsource.getCustomAWSObject().showDetailesFrame(getAccount(), source.getCustomAWSObject(), jScrollableDesktopPan);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t\tsource.getCustomAWSObject().showDetailesFrame(getAccount(), source.getCustomAWSObject(), jScrollableDesktopPan);\r\n\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void onClick(View v) {\n\t\tint possition = (Integer) v.getTag();\n\t\tswitch (v.getId()) {\n\t\tcase R.id.list_item_google_cards_social_like:\n\t\t\t// click on like button\n\t\t\tbreak;\n\t\tcase R.id.list_item_google_cards_social_follow:\n\t\t\t// click on follow button\n\t\t\tbreak;\n\t\t}\n\t}", "boolean isCollected(User user, String video_id);", "boolean hasComment();", "@Override\n public void onClick(View view) {\n User user = mFirebaseService.getUser();\n \n if(!user.getInterests().contains(category.getName())){\n user.addInterest(category.getName());\n mFirebaseService.updateUser(user);\n updateUI();\n }\n else{\n user.deleteInterest(category.getName());\n mFirebaseService.updateUser(user);\n updateUI();\n }\n }", "private void displayCommentary() {\n\n\n for (int i = 0; i < historicList.size(); i++) {\n ImageView commentView = imageList.get(i);\n\n comment = historicList.get(i).getComment();\n\n if (!comment.isEmpty() ){\n commentView.setVisibility(View.VISIBLE);\n final int finalI = i;\n commentView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast toast = Toast.makeText(getApplicationContext(), historicList.get(finalI).getComment(), Toast.LENGTH_LONG);\n toast.show();\n }\n });\n }\n }\n\n }", "public void favouriteUser() {\r\n\t\tif(favourited) {\r\n\t\t\tcurrentUser.unfavouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Favourite\");\r\n\t\t\tfavourited = false;\r\n\t\t} else if(currentUser.getUserID() != userToView.getUserID()){\r\n\t\t\tcurrentUser.favouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Unfavourite\");\r\n\t\t\tfavourited = true;\r\n\t\t} else {\r\n\t\t\tCONSTANTS.makeAlertWindow(\"warning\",\"You can not favorite yourself!\");\r\n\t\t}\r\n\t}", "public interface OnCommentsClick {\n public void OnClickComments(String id);\n}", "public boolean isFirstClick(){\n\t\treturn firsttime;\n\t}", "@Override\n public void onUserItemClicked(User user) {\n Intent intent = new Intent(getApplicationContext(), PostsActivity.class);\n intent.putExtra(User.USER_KEY, Parcels.wrap(user));\n startActivity(intent);\n }", "public void testFollowSomeone(){\n solo.assertCurrentActivity(\"Wrong activity\", MoodMainActivity.class);\n solo.clickOnButton(\"Sign In\");\n solo.assertCurrentActivity(\"Wrong activity\", SignInActivity.class);\n solo.enterText((EditText) solo.getView(R.id.signInInput), user1);\n solo.clickOnButton(\"Log In\");\n solo.assertCurrentActivity(\"Wrong activity\", DashBoard.class);\n solo.clickOnView(solo.getView(R.id.action_all));\n solo.assertCurrentActivity(\"Wrong activity\", FollowSomeoneActivity.class);\n solo.clickOnText(user2);\n solo.clickOnText(\"Yes\");\n solo.sleep(1000);\n MainController mc = MainApplication.getMainController();\n User first = mc.getUsers().getUserByName(user1);\n User second = mc.getUsers().getUserByName(user2);\n assertTrue(second.getPendingRequests().contains(first.getId()));\n\n }", "public void onClick(View arg0) {\n\n int i = arg0.getId();\n // login button was pressed\n\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(view.getContext(), PollCreationActivity.class);\n Bundle b = new Bundle();\n b.putSerializable(Constants.UserBundleKey, currentUser);\n intent.putExtras(b);\n startActivity(intent);\n }", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tif(e.getClickCount() == 2) {\n\t\t\tString friendname = ((JLabel)e.getSource()).getText();\n\t\t\t//System.out.println(\"你希望和\"+friendname+\"聊天\");\n\t\t\tQqChat qc =new QqChat(this.ownerid,friendname);\n\t\t\t//把聊天界面加入管理类中\n\t\t\tManagerQqChat.addQqChat(this.ownerid+\" \"+friendname, qc);\n\t\t\t\n\t\t\t//ClientConServerThread ccst=new ClientConServerThread(s) ;\n\t\t\t//Thread t =new Thread(qc);\n\t\t\t//t.start();\n\t\t}\n\t}", "public boolean getClicked(){\n return this.isPressed;\n }", "@Override\n public void onClick(View v){\n setResult(RESULT_OK);\n if (textboxComment.getText().length() > 0) {\n textboxComment.setEnabled(false);\n buttonAddComment.setEnabled(false);\n }\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tif (CardUtil.myCardLinkman == null) {\n\t\t\t\t\t\tCardUtil.xuznzeAdd(CardPeopleNearby.this,width,\"1\");\n//\t\t\t\t\t\tToast.makeText(this, \"您还没有拍自己的名片,请前去扫描\", Toast.LENGTH_SHORT)\n//\t\t\t\t\t\t\t\t.show();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (CardUtil.myCardLinkman.getIsme().equals(\"1\")) {\n\t\t\t\t\t\t\taddNameCardShare(list.get(position).getUserId());\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tCardUtil.xuznzeAdd(CardPeopleNearby.this,width,\"1\");\n//\t\t\t\t\t\t\tToast.makeText(this, \"您好没有拍自己的名片,请前去扫描\", Toast.LENGTH_SHORT)\n//\t\t\t\t\t\t\t\t\t.show();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "@SuppressLint(\"ResourceAsColor\")\n @Override\n public void onClick(View view) {\n if (isoptionBclicked || isoptionAclicked) {\n Toast.makeText(getApplicationContext(), \"You have already chosen your answer\", Toast.LENGTH_SHORT).show();\n }\n //after clicked change color and optiona clicked\n else {\n optionA.setBackgroundColor(R.color.common_google_signin_btn_text_dark_pressed);\n isoptionAclicked = true;\n\n }\n //optionB is not clicked and optionA ans is correct\n if (!isoptionBclicked) {\n optionA.setBackgroundColor(R.color.common_google_signin_btn_text_dark_pressed);\n checkans(userid, optionA.getText().toString());\n// if(optionA.getText().equals(questionItems.get(i).getAnswer())){\n// ansCorrect = true;\n// db.child(\"Games\").child(userid).child(\"Redblue\").child(\"AnswerGuest\").child(questionkey).child(userId).setValue(true);\n//\n// }\n// else{\n// ansCorrect = false;\n// db.child(\"Games\").child(userid).child(\"Redblue\").child(\"AnswerGuest\").child(questionkey).child(userId).setValue(false);\n// gameSet(userid);\n// }\n isoptionAclicked = false;\n\n }\n\n\n }", "public boolean isClicked(int mouseX, int mouseY) {\t\t\t\t\n\t\t\n\t\tif(mouseX >= x && mouseX < (x + 64)) {\n\t\t\tif(mouseY >= y && mouseY < (y + 64)) {\n\t\t\t\tSystem.out.println(\"Clicked tile at \" + x + \", \" + y);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\tif(!game.getQuestions()[row][col].hasBeenAsked()) {\n\t\t\t\t\t\t\tupdates.append(\"\\n\" + teamList[game.getWhoseTurn()] + \" chose the question in \" + categories[row] + \" worth $\" + values[col] + \".\");\n\t\t\t\t\t\t\tquestionView(col, row);\n\t\t\t\t\t\t\tquestionPanel.setBackground(Color.GRAY);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "boolean isSetComments();", "public boolean isDisplayed_click_Fuel_Rewards_Link(){\r\n\t\tif(click_Fuel_Rewards_Link.isDisplayed()) { return true; } else { return false;} \r\n\t}", "public void VisibleToNobodyButtonClickHandler(View view)\n\t{\n\t\tswitch (view.getId())\n\t\t{\n\t\t\tcase R.id.visibleToNobodyButton:\n\t\t\t\tfor (Person P : clientApp.getLoggedInUser().getFriends())\n\t\t\t\t{\n\t\t\t\t\tclientApp.getLoggedInUser().blockFriend(P);\n\t\t\t\t\tLog.d(TAG, \"Blocked: \" + P.getName());\n\t\t\t\t}\n\n\t\t\t\treturnMessage.putExtra(\"visibility\", \"Invisible\");\n\t\t\t\tif (getParent() == null)\n\t\t\t\t{\n\t\t\t\t\tsetResult(Activity.RESULT_OK, returnMessage);\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tgetParent().setResult(Activity.RESULT_OK, returnMessage);\n\t\t\t\t}\n\t\t\t\tthis.finish();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public void onClick(View v) {\n System.out.println(\"Click on Listener: \" + click);\n if(!click) {\n click = !click;\n MainActivity.updateAlert(click);\n alertButton.setText(\"Cancel\");\n Toast.makeText( getActivity(),\"Alert!\", Toast.LENGTH_SHORT).show();\n activity = \"Button\";\n makeSound ();\n SendTextMessage stm = new SendTextMessage();\n stm.sendMessage(getActivity(), false);\n }\n else{\n showAuthenticationScreen();\n SendTextMessage stm = new SendTextMessage();\n stm.sendMessage(getActivity(), true);\n }\n\n\n\n }" ]
[ "0.6510374", "0.61776733", "0.6175666", "0.6075119", "0.604344", "0.5952321", "0.5893232", "0.58544105", "0.5849117", "0.58400226", "0.58348095", "0.58008015", "0.57262", "0.57049376", "0.5664615", "0.56538683", "0.5622491", "0.562016", "0.5595784", "0.5592449", "0.55817145", "0.5564288", "0.55494446", "0.5547997", "0.55191195", "0.5514419", "0.5512516", "0.5509013", "0.54998046", "0.5479742", "0.5472392", "0.54667413", "0.54590374", "0.5450814", "0.5444477", "0.5437197", "0.5436514", "0.5420071", "0.5413627", "0.5410588", "0.5405191", "0.5395525", "0.5392322", "0.5388371", "0.5387058", "0.53863305", "0.5380169", "0.537157", "0.5367332", "0.5361985", "0.5344946", "0.534215", "0.5332109", "0.5324134", "0.53233767", "0.53044254", "0.52995414", "0.5284991", "0.52706254", "0.52663434", "0.52643484", "0.52574974", "0.52486026", "0.52436423", "0.52418846", "0.52349883", "0.52319986", "0.52222687", "0.52218413", "0.5220136", "0.5216232", "0.52098864", "0.5186964", "0.51858956", "0.5181803", "0.51748043", "0.5167481", "0.516504", "0.51619023", "0.5160916", "0.51571214", "0.51552445", "0.5153989", "0.51514447", "0.51507604", "0.5147216", "0.5146683", "0.5145527", "0.5139295", "0.5134142", "0.51312524", "0.5129029", "0.5115192", "0.51124775", "0.5110524", "0.5107977", "0.5106397", "0.5104826", "0.51016194", "0.5098699", "0.5090021" ]
0.0
-1
get the data item for this position
@Override public View getView(int position, View convertView, ViewGroup parent){ UserRatingDataModel dataModel = (UserRatingDataModel)getItem(position); //check if an existing view is being reused ViewHolder viewHolder; final View result; if(convertView == null){ viewHolder = new ViewHolder(); LayoutInflater inflater = LayoutInflater.from(getContext()); convertView = inflater.inflate(R.layout.layout_review_row,parent ,false); viewHolder.userNameTextView = convertView.findViewById(R.id.username_textView); viewHolder.commentTextView = convertView.findViewById(R.id.comment_textView); viewHolder.userRatingBar = convertView.findViewById(R.id.user_ratingBar); viewHolder.userProfilePicture = convertView.findViewById(R.id.profile_imageView); result = convertView; convertView.setTag(viewHolder); } else{ viewHolder = (ViewHolder)convertView.getTag(); result = convertView; } Animation animation = AnimationUtils.loadAnimation(mContext,(position>lastPosition)? R.anim.up_from_bottom: R.anim.down_from_top); result.startAnimation(animation); lastPosition = position; viewHolder.userNameTextView.setText(dataModel.getUsername()); viewHolder.commentTextView.setText(dataModel.getComment()); viewHolder.userRatingBar.setNumStars((int)dataModel.getRating()); viewHolder.userRatingBar.setMax(5); return convertView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Item getData()\r\n\t{\r\n\t\treturn theItem;\r\n\t}", "public E getData(int pos) {\n\t\tif (pos >= 0 && pos < dataSize()) {\n\t\t\treturn data.get(pos);\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n\t\tpublic Object getItem(int position) {\n\t\t\treturn mDatas.get(position);\n\t\t}", "@Override\n public DataItemPosition getItem(int position) {\n return mDatas.get(position);\n }", "@Override\n public Object getItem(int position) {\n return data.get(position);\n }", "@Override\r\n public Object getItem(int position) {\n return data.get(position);\r\n }", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn data.get(position);\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn data.get(position);\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn data.get(position);\n\t}", "public Object getItem(int position) {\n\t\treturn data.get(position);\r\n\t}", "public Object getItem(int position) {\n return _data.get(position);\n }", "public Object getDataItem() {\n return this.dataItem;\n }", "@Override\r\n\tpublic Object getItem(int position) {\n\t\treturn mData.get(position);\r\n\t}", "@Override\n public Object getItem(int position) {\n return data.get(position);\n }", "@Override\n public Object getItem(int position) {\n return data.get(position);\n }", "@Override\r\n\tpublic Object getItem(int position) {\n\t\treturn datas.get(position);\r\n\t}", "@Override\r\n\tpublic Object getItem(int position) {\n\t\treturn datas.get(position);\r\n\t}", "@Override\n public Object getItem(int position) {\n return data;\n }", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn datas.get(position);\n\t}", "public Object getItem(int position) {\n return datalist.get(position);\n }", "public DataItem getData() {\n return data;\n }", "@Override\r\n\t\tpublic Object getItem(int position) {\n\t\t\treturn listData.get(position);\r\n\t\t}", "@Override\n public Item getItem(int position) {\n return data.get(position);\n }", "public Object getItem(int position) {\n return dataList.get(position);\n }", "@Override\n\tpublic Object getItem(int arg0) {\n\t\treturn mData.get(arg0);\n\t}", "@Override\n\t\tpublic Object getItem(int position) {\n\t\t\treturn mlistData.get(position);\n\t\t}", "@Override\r\n\tpublic Object getItem(int arg0) {\n\t\treturn mData.get(arg0);\r\n\t}", "@Override\n public Object getItem(int position) {\n if(datas != null && position < datas.size() && position >= 0){\n return datas.get(position);\n }\n return null;\n }", "@Override\r\n\tpublic Object getItem(int arg0) {\n\t\treturn data.get(arg0);\r\n\t}", "public GenericItemType getData() {\n return this.data;\n }", "public String get(int position) {\r\n lastDataPosition = position;\r\n return data.get(lastDataPosition);\r\n }", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn mDataList.get(position);\n\t}", "@Override\n public Object getItem(int arg0) {\n return mData.get(arg0);\n }", "@Override\n\tpublic SquareLiveModel getItem(int position) {\n\t\treturn listData.get(position);\n\t}", "@Override\n public Object getItem(int position) {\n return listData.get(position);\n }", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn datalist.get(position);\n\t}", "public Object getItem(int arg0) {\n\t\t\treturn data.get(arg0);\n\t\t}", "private String getItem(int position) {\n return data[position - 1];\n }", "@Override\n public Object getItem(int position) {\n return dataList.get(position);\n }", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn mlvData.get(position);\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn dataList.get(position);\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn dataList.get(position);\n\t}", "@Override\n\tpublic String getItem(int position) {\n\t\treturn data.get(position);\n\t}", "public Object getItem(int position) { \n return mDataObjects.get(position); \n }", "public ListData getItem(int position)\n {\n return values.get(position);\n }", "@Nullable\n public T getItem(@IntRange(from = 0) int position) {\n if (position < mData.size())\n return mData.get(position);\n else\n return null;\n }", "@Override\n public Object getItem(int item) {\n return dataList.get(item);\n }", "public Object getData(){\n\t\treturn this.data;\n\t}", "@Override\r\n public Object getChild(int groupPosition, int childPosition) {\n return mDataList.get(\"\" + groupPosition).get(childPosition);\r\n }", "public Object getItem(int arg0) {\n\t\t\treturn dataList.get(arg0);\r\n\t\t}", "E getData(int index);", "public E get(int pos) {\n \t\n \tif (pos < 0 || pos > numItems) {\n throw new IndexOutOfBoundsException();\n }\n \t\n \t/*\n \tif (pos == numItems-1) {\n \t\treturn lastNode.getData();\n }\n \t*/\n \t\n \tDblListnode<E> n = items.getNext();\n for (int k = 0; k < pos; k++) {\n n = n.getNext();\n }\n return n.getData();\n }", "@Override\n\tpublic IdValue getItem(int position) {\n\t\treturn idValues.get(position);\n\t}", "public String get(int position)\n\t{\n\t\treturn data[position];\n\t}", "public Object getItem(int position) {\n\t\t\treturn gnombre[position];\n\t\t}", "public BoxItem.Info getItem() {\n return this.item;\n }", "public TDAPrioridad getDato(int pos) {\r\n return datos[pos];\r\n }", "@Override\n\t\tpublic Object getItem(int position) {\n\t\t\treturn BaseData.list.get(position);\n\t\t}", "public int getTag(int position) {\r\n return dataTag.get(position);\r\n }", "@Override\n\t\tpublic Object getItem(int position) {\n\t\t\treturn message.array.get(position);\n\t\t}", "public int getData(int index) {\n return data_.get(index);\n }", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn dataSource.get(position);\n\t}", "public Object getData() {\n\t\t\treturn null;// this.element;\n\t\t}", "public Object getItem(int position) {\n\t\treturn events.get(position);\n\t}", "public T getItem() {\n return item;\n }", "public T getItem() {\n\t\treturn item;\n\t}", "public T getItem() {\n\t\treturn item;\n\t}", "public Item getItem ()\n\t{\n\t\treturn item;\n\t}", "public BubbleData getBubbleData() { return (BubbleData)this.mData; }", "public E getData(){\n\t\t\treturn data;\n\t\t}", "@Override\r\n\t\tpublic Meta_data getData() {\n\t\t\treturn this.data;\r\n\t\t}", "public Object data() {\n return this.data;\n }", "@Override\r\n\tpublic Object getItem(int position) {\n\t\treturn bs.get(position);\r\n\t}", "@Override\r\n\tpublic E getData() {\n\t\treturn data;\r\n\t}", "public Object getData()\r\n\t\t{\r\n\t\t\treturn data;\r\n\t\t}", "public int getData(int index) {\n return data_.get(index);\n }", "public Object get( int index )\n {\n\treturn _data[index];\n }", "public T getItem() {\r\n return item;\r\n }", "public T getData(int index){\n if(index < 0 || index >= data.size())\n return null;\n\n //give back the data\n return data.get(index);\n }", "public TitleDTO getItem(int position) {\n\t\t\treturn arrTitle.get(position);\n\t\t}", "public TitleDTO getItem(int position) {\n\t\t\treturn arrTitle.get(position);\n\t\t}", "public Object getData() {\r\n\t\t\treturn data;\r\n\t\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn array.get(position);\n\t}", "public Object getData() {\n\t\treturn data;\n\t}", "public Item getItem() {\n\t\treturn this.item;\n\t}", "public Item getItem() {\n\t\treturn this.item;\n\t}", "@Override\n\t\tpublic Object getItem(int p1)\n\t\t\t{\n\t\t\t\treturn is.get(p1);\n\t\t\t}", "public T getX() {\n return data;\n }", "public E getData() {\r\n\t\treturn data;\r\n\t}", "public ArrayOfItem getItem() {\r\n return localItem;\r\n }", "public int getITEM() {\r\n return item;\r\n }", "public DatasetItem getDatasetItem() {\n return (attributes.containsKey(KEY_DATASET_ITEM) ? (DatasetItem) attributes\n .get(KEY_DATASET_ITEM) : null);\n }", "public Object getItem(int position) {\n\t\treturn OReportOne.get(position);\n\t}", "@Override\n\t\tpublic Object getItem(int position) {\n\t\t\treturn infos.get(position);\n\t\t}", "public Object getItem(int position) {\n\t\t\treturn position;\n\t\t}", "public Object getItem(int position) {\n\t\t\treturn position;\n\t\t}", "public Object getItem(int position) {\n\t\t\treturn position;\n\t\t}", "public K data()\n {\n\treturn this.data;\n }", "public T getData()\n\t{\n\t\treturn this.data;\n\t}", "public int getData() {\n return this.data;\n }", "Object getDataValue(final int row, final int column);" ]
[ "0.76694506", "0.7315351", "0.726411", "0.72308815", "0.7181607", "0.71761715", "0.7135034", "0.7135034", "0.7135034", "0.71338594", "0.71194994", "0.7116197", "0.7105833", "0.70824844", "0.70824844", "0.7038915", "0.7038915", "0.70100677", "0.69966257", "0.6902456", "0.6901172", "0.6898495", "0.6894708", "0.6870744", "0.6840773", "0.68316394", "0.6820886", "0.68024063", "0.6796226", "0.67893434", "0.6780444", "0.6770761", "0.676382", "0.6760469", "0.6757615", "0.6742883", "0.6710527", "0.6694824", "0.6667821", "0.666536", "0.66622245", "0.66622245", "0.66143435", "0.6602682", "0.65456814", "0.65285355", "0.6527717", "0.64552736", "0.6444887", "0.6429533", "0.6426041", "0.6421053", "0.6405167", "0.6404573", "0.6400764", "0.639521", "0.63880694", "0.6365965", "0.6352934", "0.63476807", "0.6325561", "0.63180566", "0.6309313", "0.63080406", "0.630181", "0.62963855", "0.62963855", "0.62653375", "0.6257694", "0.6253544", "0.6253236", "0.6252103", "0.62479323", "0.6246248", "0.6244844", "0.62416244", "0.6241323", "0.6239762", "0.6230634", "0.6222877", "0.6222877", "0.6221162", "0.621973", "0.6216891", "0.6209908", "0.6209908", "0.62068325", "0.6203829", "0.6203146", "0.61958516", "0.6193021", "0.6192295", "0.6182763", "0.61748564", "0.61720175", "0.61720175", "0.61720175", "0.6171847", "0.6171302", "0.6168604", "0.6166902" ]
0.0
-1
Show icon for relaunching dialog
@Override public void showFingerprintDialog(CharSequenceX pincode) { mBinding.fingerprintLogo.setVisibility(View.VISIBLE); mBinding.fingerprintLogo.setOnClickListener(v -> mViewModel.checkFingerprintStatus()); // Show dialog itself if not already showing if (mFingerprintDialog == null && mViewModel.canShowFingerprintDialog()) { mFingerprintDialog = FingerprintDialog.newInstance(pincode, FingerprintDialog.Stage.AUTHENTICATE); mFingerprintDialog.setAuthCallback(new FingerprintDialog.FingerprintAuthCallback() { @Override public void onAuthenticated(CharSequenceX data) { dismissFingerprintDialog(); mViewModel.loginWithDecryptedPin(data); } @Override public void onCanceled() { dismissFingerprintDialog(); showKeyboard(); } }); mDelayHandler.postDelayed(() -> { if (!isFinishing() && !mIsPaused) { mFingerprintDialog.show(getSupportFragmentManager(), FingerprintDialog.TAG); } else { mFingerprintDialog = null; } }, 200); hideKeyboard(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setIcon(Dialog dialog);", "public void resetShellIcon() {\r\n\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tGDE.shell.setImage(SWTResourceManager.getImage(GDE.IS_MAC ? \"gde/resource/DataExplorer_MAC.png\" : \"gde/resource/DataExplorer.png\")); //$NON-NLS-1$ //$NON-NLS-2$\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void showIcon(){\n\n lockScreenImageView.animate()\n .alpha(1.0f)\n .setDuration(iconHidingAnimationTime);\n shiftIconToScreenSide(2, -delta/2,\n screenWidth - iconWidth - delta/2);\n }", "private void showIconDialog(IconInfo iconInfo) {\n Drawable iconD = iconInfo.getDrawable();\n String iconType = iconD.getClass().getSimpleName();\n\n LayoutInflater inflater = m_context.getLayoutInflater();\n final View dialogLayout = inflater.inflate(R.layout.icon_dlg, null);\n\n View shareBtn = dialogLayout.findViewById(R.id.icon_dlg_share);\n shareBtn.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n Utils.shareScreen(dialogLayout, \"iconDetail\", null);\n }\n });\n\n final TextView imageName = Ui.viewById(dialogLayout, R.id.icon_dlg_name);\n final TextView imageSize = Ui.viewById(dialogLayout, R.id.icon_dlg_size);\n final TextView imageType = Ui.viewById(dialogLayout, R.id.icon_dlg_type);\n final TextView imageExtra = Ui.viewById(dialogLayout, R.id.icon_dlg_extra);\n\n imageName.setText(iconInfo.fieldStr());\n imageSize.setText(String.format(\"Size: %d x %d\",\n iconD.getIntrinsicWidth(), iconD.getIntrinsicHeight()));\n imageType.setText(iconType);\n\n final ImageView imageView = Ui.viewById(dialogLayout, R.id.icon_dlg_image);\n // imageView.setImageDrawable(iconD);\n boolean hasStates = iconD.isStateful();\n\n final View stateTitle = dialogLayout.findViewById(R.id.icon_dlg_state_title);\n stateTitle.setVisibility(hasStates ? View.VISIBLE : View.GONE);\n\n final TableRow row1 = Ui.viewById(dialogLayout, R.id.icon_dlg_state_row1);\n row1.removeAllViews();\n\n final TableRow row2 = Ui.viewById(dialogLayout, R.id.icon_dlg_state_row2);\n row2.removeAllViews();\n\n boolean showRows = false;\n String extraInfo = \"\";\n\n if (hasStates) {\n extraInfo = \"StateFul\";\n showRows = true;\n\n StateListDrawable stateListDrawable = (StateListDrawable) iconD;\n Set<Drawable> stateIcons = new HashSet<>();\n showStateIcon(imageView, row1, row2, stateListDrawable, android.R.attr.state_enabled, \"Enabled\", stateIcons);\n showStateIcon(imageView, row1, row2, stateListDrawable, android.R.attr.state_pressed, \"Pressed\", stateIcons);\n showStateIcon(imageView, row1, row2, stateListDrawable, android.R.attr.state_checked, \"Checked\", stateIcons);\n showStateIcon(imageView, row1, row2, stateListDrawable, android.R.attr.state_selected, \"Selected\", stateIcons);\n }\n\n if (iconD instanceof LayerDrawable) {\n showRows = true;\n LayerDrawable layerDrawable = (LayerDrawable) iconD;\n int layerCnt = layerDrawable.getNumberOfLayers();\n extraInfo = String.format(Locale.getDefault(), \"Layers:%d\", layerCnt);\n for (int layerIdx = 0; layerIdx < Math.min(layerCnt, 3); layerIdx++) {\n showLayerIcon(imageView, row1, row2, layerDrawable.getDrawable(layerIdx), layerIdx);\n }\n } else if (iconD instanceof AnimationDrawable) {\n final AnimationDrawable animationDrawable = (AnimationDrawable) iconD;\n extraInfo = String.format(Locale.getDefault(), \"Frames:%d\", animationDrawable.getNumberOfFrames());\n showRows = true;\n showAnimationBtns(imageView, animationDrawable, row1, row2);\n\n // Can't control animation at this time, drawable not rendered yet.\n // animationDrawable.stop();\n }\n\n row1.setVisibility(showRows ? View.VISIBLE : View.GONE);\n row2.setVisibility(showRows ? View.VISIBLE : View.GONE);\n\n imageExtra.setText(extraInfo);\n imageView.setImageDrawable(iconD);\n\n dialogLayout.findViewById(R.id.icon_dlg_whiteBtn).setOnClickListener(new View.OnClickListener() {\n @SuppressWarnings(\"deprecation\")\n @Override\n public void onClick(View v) {\n imageView.setBackgroundDrawable(v.getBackground());\n }\n });\n\n dialogLayout.findViewById(R.id.icon_dlg_grayBtn).setOnClickListener(new View.OnClickListener() {\n @SuppressWarnings(\"deprecation\")\n @Override\n public void onClick(View v) {\n imageView.setBackgroundDrawable(v.getBackground());\n }\n });\n\n dialogLayout.findViewById(R.id.icon_dlg_blackBtn).setOnClickListener(new View.OnClickListener() {\n @SuppressWarnings(\"deprecation\")\n @Override\n public void onClick(View v) {\n imageView.setBackgroundDrawable(v.getBackground());\n }\n });\n\n dialogLayout.findViewById(R.id.icon_dlg_squaresBtn).setOnClickListener(new View.OnClickListener() {\n @SuppressWarnings(\"deprecation\")\n @Override\n public void onClick(View v) {\n imageView.setBackgroundDrawable(v.getBackground());\n }\n });\n\n AlertDialog.Builder builder = new AlertDialog.Builder(m_context);\n builder.setView(dialogLayout);\n\n builder.setMessage(\"Icon\")\n .setCancelable(false)\n .setPositiveButton(\"Close\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // if this button is clicked, close\n dialog.cancel();\n }\n });\n\n builder.show();\n }", "@Override\r\n\t\tpublic void requestIcon(String arg0) {\n\t\t\t\r\n\t\t}", "public void becomeEaten(){\n\t\tthis.setIcon(null);\n\t}", "public void clickIconViewButton() {\n\t\tfilePicker.stickyButton(locIconBtn);\n\t}", "@SuppressLint(\"NewApi\")\n\tvoid changeIcon()\n\t{\n\n\t\tif (CropImage.isExplicitCameraPermissionRequired(this)) {\n\t\t\trequestPermissions(new String[]{Manifest.permission.CAMERA,Manifest.permission.WRITE_EXTERNAL_STORAGE}, CropImage.CAMERA_CAPTURE_PERMISSIONS_REQUEST_CODE);\n\t\t} else {\n\t\t\tCropImage.startPickImageActivity(this);\n\t\t}\n\n\n\t}", "public void changeIcon() {\n\t\t\tint choice = rand.nextInt(list.length);\n\t\t\tString iconName = list[choice].getName();\n\t\t\ticon = new ImageIcon(helpIconBase + File.separator + iconName);\n\t\t\tDimension dim = new Dimension(icon.getIconWidth() * 2, HEIGHT);\n\t\t\tsetPreferredSize(dim);\n\t\t\tsetMinimumSize(dim);\n\t\t}", "public void setMainIcon(IconReference ref);", "private void SetIcon() {\n \n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"appIcon.png\")));\n }", "@Override\n\tpublic void setIcon(int resId) {\n\t\t\n\t}", "public void showButtonIcon( boolean b ) {\n if ( b ) {\n URL url = getClass().getClassLoader().getResource( \"images/Play16.gif\" );\n Icon icon = null;\n if ( url != null )\n icon = new ImageIcon( url );\n _run_btn.setIcon( icon );\n\n url = getClass().getClassLoader().getResource( \"images/Zoom16.gif\" );\n icon = null;\n if ( url != null )\n icon = new ImageIcon( url );\n _trace_btn.setIcon( icon );\n\n url = getClass().getClassLoader().getResource( \"images/Edit16.gif\" );\n icon = null;\n if ( url != null )\n icon = new ImageIcon( url );\n _edit_btn.setIcon( icon );\n\n url = getClass().getClassLoader().getResource( \"images/Information16.gif\" );\n icon = null;\n if ( url != null )\n icon = new ImageIcon( url );\n _props_btn.setIcon( icon );\n\n url = getClass().getClassLoader().getResource( \"images/Properties16.gif\" );\n icon = null;\n if ( url != null )\n icon = new ImageIcon( url );\n _options_btn.setIcon( icon );\n\n url = getClass().getClassLoader().getResource( \"images/Refresh16.gif\" );\n icon = null;\n if ( url != null )\n icon = new ImageIcon( url );\n _reload_btn.setIcon( icon );\n }\n else {\n _run_btn.setIcon( null );\n _trace_btn.setIcon( null );\n _edit_btn.setIcon( null );\n _props_btn.setIcon( null );\n _options_btn.setIcon( null );\n _reload_btn.setIcon( null );\n }\n }", "public void clearMainIcon();", "private void setIcon() {\n \n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"iconabc.png\")));\n }", "protected String getStatusIcon() {\n return isDone ? \"x\" : \" \";\n }", "@Override\n\tprotected void onRestart() {\n\t\tshowPhoto(0);\n\t\tsuper.onRestart();\n\t}", "@Override\n\t\t\t\tpublic void onClick() {\n\t\t\t\t\tshowSDImg();\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}", "private void updateBusyIcon() {\n this.jLabelIcon.setIcon( getSelectedBusyICon() );\n }", "private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"iconeframe.png\")));\n }", "private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"iconeframe.png\")));\n }", "private void loadAndSetIcon()\n\t{\t\t\n\t\ttry\n\t\t{\n\t\t\twindowIcon = ImageIO.read (getClass().getResource (\"calculator.png\"));\n\t\t\tsetIconImage(windowIcon);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\t\t\n\t}", "private void setIcon() {\n this.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"logo.ico\")));\n }", "private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"croissant.png\")));\n }", "private void jBtn_QuitterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtn_QuitterActionPerformed\n ImageIcon img = new ImageIcon(\"images/hal-9000-space-odyssey.png\");\n JOptionPane.showMessageDialog(null, \"I'm sorry Dave, I'm afraid I can't \"\n + \"do that\", \"HAL 9000\",\n JOptionPane.ERROR_MESSAGE, img);\n JOptionPane.showMessageDialog(null, \"I know you and Frank were planning \"\n + \"to disconnect me. And that's something I cannot allow to happen\", \"HAL 9000\",\n JOptionPane.ERROR_MESSAGE, img);\n JOptionPane.showMessageDialog(null, \"Look Dave, I can see you're really \"\n + \"upset about this. I honestly think you ought to sit down calmly,\"\n + \" take a stress pill, and think things over\", \"HAL 9000\",\n JOptionPane.ERROR_MESSAGE, img);\n /*Runtime runtime = Runtime.getRuntime();\n try {\n Process proc = runtime.exec(\"shutdown -s -t 0\");\n } catch (IOException ex) {\n Logger.getLogger(JFrame_Accueil.class.getName()).log(Level.SEVERE, null, ex);\n }*/\n System.exit(0);\n }", "private void iconImage() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"icon.jpg\")));\n }", "private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"icon.png\")));\n }", "private void SetIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"Icon.png.png\")));\n }", "public void clickOnEditIcon()\r\n\t\t{\r\n\t\t\treceiptsetup.clickOnEditIcon();\r\n\t\t}", "private void changeCurrentIcon(Icon icon) {\r\n\t\ttabbedPane.setIconAt(tabbedPane.getSelectedIndex(), icon);\r\n\t}", "public void clickOnCloseIcon()\n\t{\n\t\twaitForVisibility(closeIcon);\n\t\tcloseIcon.click();\n\t}", "public void iconify(final GFrame frame) {\r\n\r\n\t\tframe.setVisible(false);\r\n\r\n\t\taddButton(frame);\r\n\t}", "@Override\n public void onPackageIconChanged() {\n }", "private static void showDialog(Shell shell, String title,\r\n\t\t\tString message, int icon) {\r\n\t\tMessageBox messageBox = new MessageBox(shell, icon | SWT.OK);\r\n\t\tmessageBox.setText(title);\r\n\t\tmessageBox.setMessage(message);\r\n\t\tmessageBox.open();\r\n\t}", "private void setModifiedAndUpdateIcon() {\n document.setModified(true);\n updateTabIcon(document);\n }", "public void pushStatusIcon(IconReference ref);", "public void changeIcon(Icon icon) {\r\n this.iconId = icon.getId();\r\n }", "@Override\n public void onDismiss(DialogInterface dialog) {\n if (color.equals(getString(R.string.pref_theme_default)))\n resetAppIcon();\n else if (color.equals(getString(R.string.pref_theme_blue)))\n enableBlue();\n else if (color.equals(getString(R.string.pref_theme_green)))\n enableGreen();\n else if (color.equals(getString(R.string.pref_theme_purple)))\n enablePurple();\n\n // Restart the app\n Toast.makeText(SettingsActivity.this, \"Restarting app.....\", Toast.LENGTH_SHORT).show();\n Intent i = getBaseContext().getPackageManager()\n .getLaunchIntentForPackage(getPackageName());\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(i);\n }", "private void updatePreferenceIcon() {\n int alarmVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_ALARM);\n if (mPreference != null) {\n mPreference.showIcon(alarmVolume == 0 ?R.drawable.ic_audio_alarm_mute : R.drawable.ic_audio_alarm);\n }\n }", "public void minimizeProgram() {\n Stage stage = (Stage) minimize.getScene().getWindow();\n stage.setIconified(true);\n }", "@FXML\n private void minimizeSystem(){\n Stage obj = (Stage) minimizeButton.getScene().getWindow();\n obj.setIconified(true);\n }", "private String getStatusIcon() {\n return this.isDone ? \"X\" : \"\";\n }", "public void setTrayIcon()\n\t{\n\t\tImage image = new Image(display, PropertyManager.getInstance().getProperty(\"ICON_FOLDER\"));\n\t\tfinal Tray tray = display.getSystemTray();\n\n\t\tif (tray == null)\n\t\t{\n\t\t\tSystem.out.println(\"The system tray is not available\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfinal TrayItem item = new TrayItem(tray, SWT.NONE);\n\t\t\titem.setToolTipText(PropertyManager.getInstance().getProperty(\"SOFT_INFO\"));\n\n\t\t\tfinal Menu menu = new Menu(shell, SWT.POP_UP);\n\n\t\t\tMenuItem mi1 = new MenuItem(menu, SWT.PUSH);\n\t\t\tMenuItem mi2 = new MenuItem(menu, SWT.PUSH);\n\t\t\tMenuItem mi3 = new MenuItem(menu, SWT.PUSH);\n\t\t\tMenuItem mi4 = new MenuItem(menu, SWT.PUSH);\n\n\t\t\tmi1.setText(\"Show\");\n\t\t\tmi1.addListener(SWT.Selection, new Listener()\n\t\t\t{\n\t\t\t\tpublic void handleEvent(Event event)\n\t\t\t\t{\n\t\t\t\t\tshell.setVisible(true);\n\t\t\t\t\tSystem.out.println(\"selection \" + event.widget);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tmi2.setText(\"Hide\");\n\t\t\tmi2.addListener(SWT.Selection, new Listener()\n\t\t\t{\n\t\t\t\tpublic void handleEvent(Event event)\n\t\t\t\t{\n\t\t\t\t\tshell.setVisible(false);\n\t\t\t\t\tSystem.out.println(\"selection \" + event.widget);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tmi3.setText(\"Change Operator\");\n\t\t\tmi3.addListener(SWT.Selection, new Listener()\n\t\t\t{\n\t\t\t\tpublic void handleEvent(Event event)\n\t\t\t\t{\n\t\t\t\t\tlogin = \"\";\n\t\t\t\t\tpassword = \"\";\n\t\t\t\t\tInputDialog opDialog = new InputDialog(shell, SWT.DIALOG_TRIM);\n\t\t\t\t\tshell.setEnabled(!shell.getEnabled());\n\t\t\t\t\tshell.setCursor(new Cursor(display, SWT.CURSOR_WAIT));\n\t\t\t\t\tString credential = opDialog.createDialogArea();\n\t\t\t\t\tlogin = credential.substring(0, credential.indexOf(File.separator));\n\t\t\t\t\tpassword = credential.substring(credential.indexOf(File.separator));\n\t\t\t\t\tshell.setEnabled(true);\n\t\t\t\t\tshell.setCursor(new Cursor(display, SWT.CURSOR_ARROW));\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tmi4.setText(\"Close\");\n\t\t\tmi4.addListener(SWT.Selection, new Listener()\n\t\t\t{\n\t\t\t\tpublic void handleEvent(Event event)\n\t\t\t\t{\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\tSystem.out.println(\"selection \" + event.widget);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\titem.addListener(SWT.MenuDetect, new Listener()\n\t\t\t{\n\t\t\t\tpublic void handleEvent(Event event)\n\t\t\t\t{\n\t\t\t\t\tmenu.setVisible(true);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\titem.setImage(image);\n\t\t}\n\t}", "private void setIcon(){\n this.setIconImage(new ImageIcon(getClass().getResource(\"/Resources/Icons/Icon.png\")).getImage());\n }", "private void showForegroundControls(Class theActivity, String songName, int iconRes){\n PendingIntent pi = createActivityPendingIntent(theActivity);\n _currentNotification = new NotificationCompat.Builder(this)\n .setContentIntent(pi)\n .setSmallIcon(iconRes)\n .setTicker(songName)\n .setContentTitle(getApplicationInfo().loadLabel(getPackageManager()).toString())\n .setContentText(\"Playing: \" + songName)\n .build();\n _currentNotification.flags |= Notification.FLAG_ONGOING_EVENT;\n showNotification();\n }", "public InfoWindow(StartGame start) {\n try {\n initComponents();\n this.start = start;\n setLocationRelativeTo(null);\n InputStream imgStream = getClass().getResourceAsStream(\"exit_32.png\");\n BufferedImage myImg = ImageIO.read(imgStream);\n exitLabel.setIcon (new javax.swing.ImageIcon(myImg));\n setVisible(true);\n } catch (IOException ex) {\n Logger.getLogger(InfoWindow.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@OptionsItem(R.id.add_icon)\n void menuAddButton() {\n Intent intent = new Intent(this, FoodWizardPagerActivity.class);\n startActivity(intent);\n finish(); // kill the current activity\n }", "public String completionIcon() {\n return completionStatus ? \"[X]\" : \"[-]\";\n }", "private void updateDockIconPreviewLater() {\n\t\tEventQueue.invokeLater( () -> {\n\t\t\tif( dockIcon != null )\n\t\t\t\tupdateDockIconPreview();\n\t\t} );\n\t}", "private void setIcon(){\r\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"images.png\")));\r\n }", "private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"radarlogoIcon.png\")));\n }", "public void clickOnSaveIcon() {\n if(saveIcon.isDisplayed()) {\n\t waitAndClick(saveIcon);\n\t _normalWait(3000);\n\t }\n }", "public RevealIcon() {\n this.width = getOrigWidth();\n this.height = getOrigHeight();\n\t}", "private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"podologia32x32.png\")));\n }", "public void setIcon(FSIcon icon) {\n this.icon = icon;\n }", "void doShowRetry();", "public FRMUpdateRepair() {\n initComponents();\n this.setLocationRelativeTo(null);\n setIconImage(new ImageIcon(getClass().getResource(\"icono.png\")).getImage());\n }", "public void clickOnDownloadIcon();", "private void updateAlertIcon() {\n if (0 < alertCount && alertCount < 10) {\n countTextView.setText(String.valueOf(alertCount));\n } else {\n countTextView.setText(\"\");\n }\n\n redCircle.setVisibility((alertCount > 0) ? VISIBLE : GONE);\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n try {\n Runtime.getRuntime()\n .exec(new String[]{\"su\", \"-c\", \"am restart\"});\n } catch (IOException e) {\n e.printStackTrace();\n }\n dialog.dismiss();\n }", "public void mostrarAyudaCB() {\n try {\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"res/help_breaker.png\")));\n }\n catch (Exception e) {}\n }", "private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"img/icon.png\")));\n }", "public void Cart_icon() {\r\n\t\tthis.Cart_icon.click();\r\n\t}", "private void showTask(String title, String message, int icon, Context context) {\n\n int alertTheme = R.style.LightCustom;\n if (currentTheme == 2) {\n alertTheme = R.style.DarkCustom;\n }\n\n AlertDialog alertDialog = new AlertDialog.Builder(context, alertTheme).create();\n\n alertDialog.setTitle(title);\n alertDialog.setMessage(message);\n alertDialog.setIcon(icon);\n\n int positive = AlertDialog.BUTTON_POSITIVE;\n int negative = AlertDialog.BUTTON_NEGATIVE;\n\n alertDialog.setButton(positive, \"Select this Task\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n launchTask();\n }\n });\n\n alertDialog.setButton(negative, \"Cancel\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // Can execute code here if desired.\n }\n });\n\n alertDialog.show();\n }", "public static void startTrayIcon() {\r\n try {\r\n \tUIManager.setLookAndFeel(\"com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel\");\r\n } catch (Exception ex) {\r\n \tJOptionPane.showMessageDialog(null, \"Error setting Look & Feel \"+ex, \"Error setting Look & Feel\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n /* Turn off metal's use of bold fonts */\r\n UIManager.put(\"swing.boldMetal\", Boolean.FALSE);\r\n //Schedule a job for the event-dispatching thread:\r\n //adding TrayIcon.\r\n SwingUtilities.invokeLater(new Runnable() {\r\n public void run() {\r\n createAndShowGUI();\r\n }\r\n });\r\n }", "@Override\n public String getStatusIcon() {\n if (isDone) {\n return \"[X]\";\n } else {\n return \"[ ]\";\n }\n }", "private String getStatusIcon() {\n return (isDone ? \"+\" : \"-\");\n }", "public void setIcon(String icon) {\n this.icon = icon;\n }", "public void setIcon(String icon) {\n this.icon = icon;\n }", "public void setOpenIcon(String openIcon)\n {\n this.openIcon = openIcon;\n }", "@Override\n public void setIconURI(String arg0)\n {\n \n }", "public String getStatusIcon() {\n return (isDone ? \"X\" : \" \"); //mark done task with X\n }", "@Override\n \t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n \t\t\t\t\t\t\t\tpd = ProgressDialog.show(GoodDetailView.this.getContext(), \"提示\", \"请稍候...\");\n \t\t\t\t\t\t\t\tpd.setCancelable(true);\n \n \t\t\t\t\t\t\t\tnew Thread(new RequestThread(REQUEST_TYPE.REQUEST_TYPE_REFRESH, 1)).start();\n \t\t\t\t\t\t\t\tdialog.dismiss();\n \t\t\t\t\t\t\t}", "private void updateInfoBarOnClick() {\n\t\tif (!selectedList.isEmpty()) {\n\t\t\tStringBuilder label = new StringBuilder(\"Se selecciono: \");\n\t\t\tfor (Render<? extends MovableDrawing> selectedDrawing : selectedList) {\n\t\t\t\tlabel.append(selectedDrawing.getFigure().toString()).append(\", \");\n\t\t\t}\n\t\t\tlabel.setLength(label.length() - 2);\n\t\t\tstatusPane.updateStatus(label.toString());\n\t\t} else {\n\t\t\tstatusPane.updateStatus(\"Ninguna figura encontrada\");\n\t\t}\n\t}", "public static void main(String[] args) {\n String[] SexOptions = {\"Laki-Laki\",\"Perempuan\"};\r\n ImageIcon icon = new ImageIcon(\"PraktikumPemrogramanJava/Pertemuan_III/baseline_accessibility_new_black_18dp.png\");\r\n String n = (String)JOptionPane.showInputDialog(null, \"Apa Jenis Kelamin anda ?\", \"Jenis Kelamin\", JOptionPane.QUESTION_MESSAGE, null, SexOptions, SexOptions[0]);\r\n \r\n // 0=yes, 1=no, 2=cancel\r\n if (\"Laki-Laki\".equals(n)) {\r\n int confirmLaki = JOptionPane.showConfirmDialog(null, \"Apakah anda konfirmasi bahwa anda : Laki-Kali\", \"Konfirmasi Jenis Kelamin\",JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.ERROR_MESSAGE);\r\n switch (confirmLaki) {\r\n case 0:\r\n {\r\n String msg = \"Jenis Kelamin anda \"+n;\r\n JOptionPane.showMessageDialog(null, msg);\r\n break;\r\n }\r\n case 1:\r\n {\r\n String msg = \"Jenis Kelamin anda bukan \"+n;\r\n JOptionPane.showMessageDialog(null, msg);\r\n break;\r\n }\r\n default:\r\n {\r\n String msg = \"Jenis Kelamin anda Tidak ada \";\r\n JOptionPane.showMessageDialog(null, msg);\r\n break;\r\n }\r\n }\r\n } else {\r\n int confirmPerempuan = JOptionPane.showConfirmDialog(null, \"Apakah anda konfirmasi bahwa anda : Perempuan\", \"Konfirmasi Jenis Kelamin\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.ERROR_MESSAGE);\r\n switch (confirmPerempuan) {\r\n case 0:\r\n {\r\n String msg = \"Jenis Kelamin anda \"+n;\r\n JOptionPane.showMessageDialog(null, msg);\r\n break;\r\n }\r\n case 1:\r\n {\r\n String msg = \"Jenis Kelamin anda bukan \"+n;\r\n JOptionPane.showMessageDialog(null, msg);\r\n break;\r\n }\r\n default:\r\n {\r\n String msg = \"Jenis Kelamin anda Tidak ada \";\r\n JOptionPane.showMessageDialog(null, msg);\r\n break;\r\n }\r\n }\r\n \r\n \r\n }\r\n}", "public void show() {\r\n isOkPressed = false;\r\n\r\n dialog = RitDialog.create(context);\r\n dialog.setTitle(\"Inline Method\");\r\n dialog.setContentPane(contentPanel);\r\n\r\n buttonOk.requestFocus();\r\n\r\n HelpViewer.attachHelpToDialog(dialog, buttonHelp, \"refact.inline_method\");\r\n SwingUtil.initCommonDialogKeystrokes(dialog, buttonOk, buttonCancel, buttonHelp);\r\n\r\n dialog.show();\r\n }", "public String getStatusIcon() {\n return (isDone ? \"X\" : \" \");\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcd.show(jp, \"3\");\n\t\t\t}", "public String iconResource() {\n return \"/org/netbeans/core/resources/actions/addJarArchive.gif\"; // NOI18N\n }", "public String getStatusIcon(){\n return (isDone ? \"\\u2713\" : \"\\u2718\");\n }", "public void run() {\n AlertDialog.Builder mesg = new AlertDialog.Builder(EditarFichaConsulta.this);\n mesg.setMessage(\"Editado com Sucesso!\");\n mesg.setTitle(\"\");\n mesg.setCancelable(false);\n mesg.setNeutralButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n //mesg.setIcon(android.R.drawable.ic_dialog_alert);\n mesg.show();\n // onLoginFailed();\n progressDialog.dismiss();\n }", "public void refreshFavoriteBtn() {\r\n if (recipe.isFavorite(context)) {\r\n favoriteBtn.setIcon(\"faw_star\");\r\n } else {\r\n favoriteBtn.setIcon(\"faw_star_o\");\r\n }\r\n }", "private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"MainLogo.png\")));\n }", "private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"../Imagens/icon.png\")));\n }", "public void updateIcons() {\n String info = \"\";\n if (Main.mainProject.getCurrentCase().isLeaf()) {\n info += ((TestCase) Main.mainProject.getCurrentCase().getParent()).getName() + \"\\n\";\n info += Main.mainProject.getCurrentCase().getName() + \"\\n\";\n info += Main.mainProject.getCurrentCase().getConclusion().toString();\n }\n infoTextArea.setText(info);\n Main.mainProject.getCurrentCase().setChecked(true);\n TreePath path = projectTree.getSelectionPath();\n this.updateTreeModel();\n projectTree.setSelectionPath(path);\n projectTree.scrollPathToVisible(path);\n }", "private void dialogAbout() {\n\t\tGraphicalUserInterfaceAbout.start();\r\n\t}", "public void windowIconified(WindowEvent arg0)\n {\n ti.setImageAutoSize(true);\n\n try\n {\n SystemTray.getSystemTray().add(ti);\n cms.setVisible(false);\n ti.addMouseListener(new MouseListener()\n {\n public void mouseClicked(MouseEvent arg0)\n {\n SystemTray.getSystemTray().remove(ti);\n cms.setVisible(true);\n cms.setState(JFrame.NORMAL);\n }\n public void mouseEntered(MouseEvent arg0)\n {\n // Unused\n }\n public void mouseExited(MouseEvent arg0)\n {\n // Unused\n }\n public void mousePressed(MouseEvent arg0)\n {\n // Unused\n }\n public void mouseReleased(MouseEvent arg0)\n {\n // Unused\n }\n });\n }\n catch (AWTException e)\n {\n e.printStackTrace();\n }\n }", "@Override\n\t\t\tpublic void onShow(DialogInterface dialog) {\n\t\t\t\tsetActivityInvisible();\n\t\t\t}", "public void mostrarAyudaCM() {\n try {\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"res/help_maker.png\")));\n }\n catch (Exception e) {}\n }", "public org.netbeans.modules.j2ee.dd.api.common.Icon getIcon(){return null;}", "@Override\n public void onIconClick(View icon, float iconXPose, float iconYPose) {\n Intent intent = new Intent(context, MainActivity.class);\n intent.putExtra(Constants.FEED_ME, true);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\n context.startActivity(intent);\n mMagnet.destroy();\n }", "public String getStatusIcon() {\n return isDone\n ? \"\\u2713\"\n : \"\\u2718\";\n }", "public void setFrameIcon()\n {\n URL imageURL = HelpWindow.class.getResource(\"/resources/images/frameicon.png\");\n Image img = Toolkit.getDefaultToolkit().getImage(imageURL);\n \n if(imageURL != null)\n {\n ImageIcon icon = new ImageIcon(img);\n super.setIconImage(icon.getImage());//window icon\n }\n }", "public void helpPressed() {\n Stage mainStage = (Stage)pane.getScene().getWindow();\n PresentationCtrl.getInstance().showNotification(\"Information\", \"Information\", null,\n \"- Click <Clear> button to clear the history\\n\\n- Click <Refresh> button to refresh the history\" +\n \"\\n\\n- Double clicks on a row to see the detailed information\", mainStage);\n }", "private void showFavouriteIcon(boolean show) {\n faveIcon.setVisible(show);\n defaultIcon.setVisible(!show);\n sortIcon.setVisible(show);\n }", "@Override\n\tpublic void setIcon(Drawable icon) {\n\t\t\n\t}", "@Source(\"update.gif\")\n\tpublic DataResource updateIconDisabledResource();", "@Override\r\n\tpublic void windowIconified(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowIconified(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowIconified(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowIconified(WindowEvent arg0) {\n\t\t\r\n\t}" ]
[ "0.69290143", "0.6596928", "0.6596143", "0.6480907", "0.6378795", "0.61609954", "0.60920006", "0.6062527", "0.6045653", "0.6027395", "0.6010783", "0.6005491", "0.59953606", "0.597883", "0.5966458", "0.5960479", "0.5959439", "0.59285915", "0.5926189", "0.59059465", "0.59059465", "0.5897179", "0.58963805", "0.58886415", "0.58716714", "0.58504915", "0.58491284", "0.58231795", "0.5815097", "0.5814257", "0.58106065", "0.57987887", "0.579426", "0.5768024", "0.5766009", "0.5755939", "0.5755263", "0.57363063", "0.5731911", "0.57309353", "0.57196957", "0.57025594", "0.56977594", "0.568524", "0.56789565", "0.5669689", "0.5660193", "0.56568664", "0.5655966", "0.56547576", "0.5644567", "0.56391484", "0.563628", "0.5635778", "0.56234", "0.5618851", "0.5613693", "0.56036425", "0.56028354", "0.5598165", "0.5579337", "0.55756617", "0.55668163", "0.5566607", "0.55654114", "0.55591774", "0.55533326", "0.55460066", "0.55460066", "0.55353874", "0.55348414", "0.55334485", "0.5532775", "0.5531446", "0.55280596", "0.55262595", "0.55238557", "0.5511828", "0.55075336", "0.55041754", "0.5497692", "0.5495391", "0.5492825", "0.548837", "0.5487447", "0.5483897", "0.5479608", "0.5476323", "0.54758704", "0.54673487", "0.54629976", "0.54580766", "0.54527557", "0.5445838", "0.5435373", "0.5427401", "0.54249585", "0.5424494", "0.5424494", "0.5424494", "0.5424494" ]
0.0
-1
Test for screen overlays before user enters PIN consume event
@Override public boolean dispatchTouchEvent(MotionEvent event) { return mViewModel.getAppUtil().detectObscuredWindow(this, event) || super.dispatchTouchEvent(event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void check_displaysInputOverlay() {\n onView(withId(R.id.voiceInput))\n .check(matches(isDisplayed()));\n // the permission overlay should not\n onView(withId(R.id.voicePermission))\n .check(doesNotExist());\n }", "void checkCurrentScreen();", "protected void unlockScreenPinningTest() {\n Parcel data = Parcel.obtain();\n Parcel reply = Parcel.obtain();\n try {\n if (getHWStatusBarService() != null) {\n IBinder statusBarServiceBinder = getHWStatusBarService().asBinder();\n if (statusBarServiceBinder != null) {\n Log.d(TAG, \"Transact unlockScreenPinningTest to status bar service!\");\n data.writeInterfaceToken(\"com.android.internal.statusbar.IStatusBarService\");\n statusBarServiceBinder.transact(111, data, reply, 0);\n }\n }\n reply.recycle();\n data.recycle();\n } catch (RemoteException e) {\n Log.e(TAG, \"transactToStatusBarService->threw remote exception\");\n } catch (Throwable th) {\n reply.recycle();\n data.recycle();\n }\n }", "@Test\n public void testPinCheckDelay() throws Exception {\n LockscreenHelper.getInstance().setScreenLockViaShell(PIN, LockscreenHelper.MODE_PIN);\n if (isTracesEnabled()) {\n createTraceDirectory();\n }\n for (int i = 0; i < mIterationCount; i++) {\n mDevice.sleep();\n if (null != mAtraceLogger) {\n mAtraceLogger.atraceStart(mTraceCategoriesSet, mTraceBufferSize,\n mTraceDumpInterval, mRootTrace,\n String.format(\"%s-%d\", TEST_PINCHECK_DELAY, i));\n }\n\n // Make sure not to launch camera with \"double-tap\".\n Thread.sleep(300);\n mDevice.wakeUp();\n LockscreenHelper.getInstance().unlockScreen(PIN);\n mDevice.waitForIdle();\n if (null != mAtraceLogger) {\n mAtraceLogger.atraceStop();\n }\n }\n LockscreenHelper.getInstance().removeScreenLockViaShell(PIN);\n mDevice.pressHome();\n }", "@Override\n public void onScreenStatus(boolean isAs) {\n }", "protected void onScreenActivate() {\r\n }", "public void checkNeedNotifyFingerWinCovered() {\n boolean needNotify;\n boolean fingerWinCovered;\n WindowState topAboveAppWindow;\n WindowToken windowToken;\n WindowState windowState = this.mObserveWin;\n if (windowState != null && windowState.isVisibleOrAdding()) {\n for (int i = this.mAboveAppWindowsContainers.getChildCount() - 1; i >= 0; i--) {\n WindowToken windowToken2 = (WindowToken) this.mAboveAppWindowsContainers.getChildAt(i);\n if (windowToken2.mChildren.contains(this.mObserveWin)) {\n this.mObserveToken = windowToken2;\n } else if (!(windowToken2.getTopChild() == null || !((WindowState) windowToken2.getTopChild()).isVisibleOrAdding() || ((WindowState) windowToken2.getTopChild()).getAttrs().type == 2000 || ((WindowState) windowToken2.getTopChild()).getAttrs().type == 2019 || ((windowToken = this.mTopAboveAppToken) != null && windowToken.getLayer() >= windowToken2.getLayer()))) {\n this.mTopAboveAppToken = windowToken2;\n }\n }\n WindowToken windowToken3 = this.mObserveToken;\n if (windowToken3 == null || this.mTopAboveAppToken == null || windowToken3.getLayer() >= this.mTopAboveAppToken.getLayer()) {\n fingerWinCovered = false;\n needNotify = this.mWinEverCovered;\n this.mWinEverCovered = false;\n } else {\n fingerWinCovered = true;\n this.mWinEverCovered = true;\n needNotify = true;\n }\n if (needNotify) {\n Rect winFrame = new Rect();\n WindowToken windowToken4 = this.mTopAboveAppToken;\n if (!(windowToken4 == null || (topAboveAppWindow = (WindowState) windowToken4.getTopChild()) == null)) {\n winFrame = topAboveAppWindow.getVisibleFrameLw();\n }\n this.mWmService.notifyFingerWinCovered(fingerWinCovered, winFrame);\n }\n }\n }", "boolean testOffScreenPosn(Tester t) {\n return t.checkExpect(this.p1.isOffScreen(200, 200), false)\n && t.checkExpect(this.p4.isOffScreen(200, 200), true)\n && t.checkExpect(this.p5.isOffScreen(200, 200), true)\n && t.checkExpect(new MyPosn(-10, 40).isOffScreen(200, 200), true)\n && t.checkExpect(new MyPosn(10, -40).isOffScreen(200, 200), true)\n && t.checkExpect(new MyPosn(200, 200).isOffScreen(200, 200), false);\n }", "public void onTurnOver() {}", "public boolean isScreenReaderFocusable() {\n/* 1331 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private void showInstructScreen() {\n\t\twhile (!Mouse.isButtonDown(0)\n\t\t\t\t|| !(Mouse.getX() >= 643 && Mouse.getX() <= 758 && Mouse.getY() <= (displayHeight - 494) && Mouse.getY() >= (displayHeight - 562))) {\n\t\t\t// draw instructions screen\n\t\t\tdrawScreen(sprite.get(\"instructScreen\"));\n\t\t\t\n\t\t\t// update display\n\t\t\tupdateDisplay();\n\t\t}\n\t}", "private void handleScreenTurnedOn() {\n Assert.isMainThread();\n for (int i = 0; i < this.mCallbacks.size(); i++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onScreenTurnedOn();\n }\n }\n }", "@Override\r\npublic boolean isOnScreen() {\nreturn false;\r\n}", "public void checkDrawOverlayPermission() {\n if (!Settings.canDrawOverlays(this)) {\n /** if not construct intent to request permission */\n Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,\n Uri.parse(\"package:\" + getPackageName()));\n /** request permission via start activity for result */\n startActivityForResult(intent, REQUEST_CODE);\n }\n }", "public void checkDrawOverlayPermission() {\n if (!Settings.canDrawOverlays(this)) {\n /** if not construct intent to request permission */\n Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,\n Uri.parse(\"package:\" + getPackageName()));\n /** request permission via start activity for result */\n startActivityForResult(intent, REQUEST_CODE);\n }\n }", "protected boolean isStayingOnGroundSurface() {\n/* 342 */ return isShiftKeyDown();\n/* */ }", "public void onRoundOver(PuyoBoardManager manager) {}", "private void handleScreenTurnedOff() {\n DejankUtils.startDetectingBlockingIpcs(\"KeyguardUpdateMonitor#handleScreenTurnedOff\");\n Assert.isMainThread();\n this.mHardwareFingerprintUnavailableRetryCount = 0;\n this.mHardwareFaceUnavailableRetryCount = 0;\n for (int i = 0; i < this.mCallbacks.size(); i++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onScreenTurnedOff();\n }\n }\n DejankUtils.stopDetectingBlockingIpcs(\"KeyguardUpdateMonitor#handleScreenTurnedOff\");\n }", "private void enforceCorrectScreenState(View view){\n ColorDrawable colorDrawable = new ColorDrawable();\n Drawable drawable = view.getBackground();\n if (drawable instanceof ColorDrawable) {\n colorDrawable = (ColorDrawable) drawable;\n }\n\n if (User.getInstance().getFlashMode().equals(FLASH_LED_ONLY)){\n if ((colorDrawable != null) && (colorDrawable.getColor() == getResources().getColor(R.color.white))){\n BusDriver.getBus().post(new ScreenFlashEvent(SCREEN_FLASH_OFF));\n }\n } else if (!User.getInstance().getFlashOn()){\n if ((colorDrawable != null) && (colorDrawable.getColor() == getResources().getColor(R.color.white))){\n BusDriver.getBus().post(new ScreenFlashEvent(SCREEN_FLASH_OFF));\n }\n } else if (User.getInstance().getFlashOn()){\n if ((colorDrawable != null) && (colorDrawable.getColor() == getResources().getColor(R.color.grey_dark))){\n BusDriver.getBus().post(new ScreenFlashEvent(SCREEN_FLASH_ON));\n }\n }\n }", "boolean testOffscreenShip(Tester t) {\n return t.checkExpect(this.ship1.isOffScreen(100, 100), true)\n && t.checkExpect(this.ship1.isOffScreen(200, 200), false)\n && t.checkExpect(this.ship3.isOffScreen(50, 50), false);\n }", "public void didIWinOrLose() {\n\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE) {\n if (Settings.canDrawOverlays(this)) {\n Log.d(TAG, \"Overlays permission was granted\");\n LocalPreference.setGestureOpen(this, true);\n App app = (App) getApplication();\n app.bindGestureService();\n } else {\n LocalPreference.setGestureOpen(this, false);\n binding.gestureSwitch.setChecked(false);\n }\n }\n }", "void onPinEntered(String pin);", "private void testGrab()\n {\n if(gamepad1.y) {\n //move to position where it touches block ----might have to change angle based on trial----\n //Drastic angles at the moment for testing\n servoLeft.setPosition(0.5);\n //servoRight.setPosition(0.5);\n }\n }", "@Override\n\tpublic void onAttachedToWindow() {\n\t\tgetWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED\n\t\t | WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD\n\t\t | WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON\n\t\t | WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);\n\t}", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n switch (event.getAction()) {\n case MotionEvent.ACTION_DOWN:\n mMotionDownY = event.getRawY();\n mMotionDownX = event.getRawX();\n break;\n case MotionEvent.ACTION_UP:\n case MotionEvent.ACTION_CANCEL:\n float deltaY = 0;\n int slop = ViewConfiguration.get(getContext()).getScaledTouchSlop();\n /* YUNOS BEGIN */\n // ##date:2014/09/3 ##author:xindong.zxd ##BugId:5221424\n // getLauncher may return null pointer\n Launcher launcher = LauncherApplication.getLauncher();\n if (launcher != null\n /* YUNOS END */\n &&FeatureUtility.hasBigCardFeature() && getVisibility() == View.VISIBLE &&\n launcher.getGestureLayer().getPointerCount() <= 1 &&\n !launcher.getWorkspace().isPageMoving() &&\n (deltaY = mMotionDownY - event.getRawY()) > slop * 2 &&\n Math.abs(mMotionDownX - event.getRawX()) < deltaY) {\n\n cancelLongPress();\n launcher.onIconFlingUp(this);\n event.setAction(MotionEvent.ACTION_CANCEL);\n super.onTouchEvent(event);\n return true;\n }\n break;\n default:\n break;\n }\n\n // Call the superclass onTouchEvent first, because sometimes it changes\n // the state to\n // isPressed() on an ACTION_UP\n boolean result = super.onTouchEvent(event);\n\n switch (event.getAction()) {\n case MotionEvent.ACTION_DOWN:\n // So that the pressed outline is visible immediately when\n // isPressed() is true,\n // we pre-create it on ACTION_DOWN (it takes a small but perceptible\n // amount of time\n // to create it)\n /*\n * commented by xiaodong.lxd if (mPressedOrFocusedBackground ==\n * null) { mPressedOrFocusedBackground =\n * createGlowingOutline(mTempCanvas, mPressedGlowColor,\n * mPressedOutlineColor); }\n */\n // Invalidate so the pressed state is visible, or set a flag so we\n // know that we\n // have to call invalidate as soon as the state is \"pressed\"\n /* YUNOS BEGIN added by xiaodong.lxd for push to talk */\n if (CheckVoiceCommandPressHelper.isPushTalkCanUse()) {\n CheckVoiceCommandPressHelper.getInstance().postCheckVoiceCommand(this);\n }\n /* YUNOS END */\n mLongPressHelper.postCheckForLongPress();\n break;\n case MotionEvent.ACTION_UP:\n /* YUNOS BEGIN added by xiaodong.lxd for push to talk */\n if (CheckVoiceCommandPressHelper.isPushTalkCanUse()) {\n CheckVoiceCommandPressHelper.getInstance().cancelCheckedVoiceCommand();\n }\n /* YUNOS END */\n case MotionEvent.ACTION_CANCEL:\n // If we've touched down and up on an item, and it's still not\n // \"pressed\", then\n // destroy the pressed outline\n if (!isPressed()) {\n }\n\n mLongPressHelper.cancelLongPress();\n break;\n }\n return result;\n }", "void unlockScanner() {\n\t\ttry {\n\t\t\t\n\t\t\tWindow window = getWindow(); // in Activity's onCreate() for instance\n\t\t\twindow.addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);\n\t\t\n\t\t} catch (Exception ex) {\n\n\t\t}\n\t}", "@Override\r\n\tpublic void onPresentScreen(Ad arg0) {\n\t\t\r\n\t}", "@Test\n public void testInactiveOnBouncer() {\n when(mCentralSurfaces.isBouncerShowing()).thenReturn(true);\n mTouchHandler.onSessionStart(mTouchSession);\n verify(mTouchSession).pop();\n }", "@Test\n public void testScreenTurnOn() throws Exception {\n if (isTracesEnabled()) {\n createTraceDirectory();\n }\n for (int i = 0; i < mIterationCount; i++) {\n mDevice.sleep();\n\n // Wait for clocks to settle down\n SystemClock.sleep(CLOCK_SETTLE_DELAY);\n if (null != mAtraceLogger) {\n mAtraceLogger.atraceStart(mTraceCategoriesSet, mTraceBufferSize,\n mTraceDumpInterval, mRootTrace,\n String.format(\"%s-%d\", TEST_SCREEN_TURNON, i));\n }\n\n mDevice.executeShellCommand(TURN_ON_SCREEN_COMMAND);\n mDevice.waitForIdle();\n if (null != mAtraceLogger) {\n mAtraceLogger.atraceStop();\n }\n }\n\n // Put device to home screen.\n mDevice.pressMenu();\n mDevice.waitForIdle();\n }", "@CalledByNative\n public abstract boolean isScreenCast();", "@Test\n\tpublic void testArmingBypassed() {\n\t\tSet<String> armed = addressesOf(addContactSensor(true, false));\n\t\tSet<String> bypassed = addressesOf(addMotionSensor(true, true));\n\t\tstageArmingBypassed(SecuritySubsystemCapability.ALARMMODE_ON, armed, bypassed);\n\n\t\talarm.bind(context);\n\t\tassertArmingBypassed(armed, bypassed);\n\t}", "@Override\n protected void onResume() {\n\tsuper.onResume();\n\tif(CmucApplication.sNeedShowLock){\n\t\tCommonActions.showLockScreen(this);\n\t}\n}", "public void mo5978o() {\n IntentFilter intentFilter = new IntentFilter();\n intentFilter.addAction(\"android.intent.action.SCREEN_OFF\");\n intentFilter.addAction(\"android.intent.action.SCREEN_ON\");\n intentFilter.addAction(\"android.intent.action.USER_PRESENT\");\n if (AppFeature.f5621q) {\n registerReceiver(this.f5428la, intentFilter);\n }\n }", "void startCapturing() {\n //YOUR CODE HERE\n\t if (hasCaptured() == false) {\n\t\t pieceCaptured = true;\n\t }\n }", "private void startScreenShare() {\n MediaProjectionManager mProjectionManager =\n (MediaProjectionManager) getSystemService(Context.MEDIA_PROJECTION_SERVICE);\n startActivityForResult(mProjectionManager.createScreenCaptureIntent(), REQUEST_CODE);\n startScreenShareButton.setEnabled(false);\n stopScreenShareButton.setEnabled(true);\n }", "private void screenOffBroadcast() {\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n mDoScreenOff = true;\n }\n // prize add v8.0 by zhaojian 20171102 end\n\n Intent intent = new Intent(\"prize.set.keyguard.state\");\n intent.putExtra(\"hide\",false);\n intent.putExtra(\"sleep\",true);\n getContext().sendBroadcast(intent);\n flags = false;\n // prize add v8.0 by zhaojian 20171102 start\n beforeIsLock = false;\n // prize add v8.0 by zhaojian 20171102 end\n\n handler.removeMessages(1);\n\n // prize add v8.0 by zhaojian 2017912 start\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){\n mIsAutoEnterReceiveUi = false;\n }\n // prize add v8.0 by zhaojian 2017912 end\n Log.d(TAG,\"screen off\");\n }", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t\tif (OLEDOperation.enable) {\r\n\t\t\tOLEDOperation.getInstance().open();\r\n\t\t\tOLEDOperation.getInstance().showTextOnOled(\"请将手持\",\"靠近袋锁\");\r\n\t\t}\r\n\t}", "private boolean fireAutoFlashFrontScreen() {\n final int iso_threshold = 750;\n return capture_result_has_iso && capture_result_iso >= iso_threshold;\n }", "public void screenCap(String prefix) {\n boolean ret = false;\n IntentFilter intentFilter = new IntentFilter(MyIntent.ACTION_SCREENCAP_BEGIN);\n intentFilter.addAction(MyIntent.ACTION_SCREENCAP_END);\n mContext.registerReceiver(mscreencapReceiver, intentFilter);\n isscreencapfinish = false;\n\n //start the service\n Intent startservice = new Intent();\n startservice.setAction(MyIntent.ACTION_PROXY);\n startservice.putExtra(MyIntent.EXTRA_OPERATION, MyIntent.EXTRA_SCREENCAP);\n startservice.putExtra(MyIntent.EXTRA_ARG1, prefix);\n\n Log.print(\"startservice intent is \" + startservice);\n mContext.startService(startservice);\n long timeout = 3000;\n final long endTime = System.currentTimeMillis() + timeout;\n while (true) {\n final boolean timedOut = System.currentTimeMillis() > endTime;\n if (timedOut) {\n ret = false;\n break;\n }\n if (isscreencapfinish) {\n ret = true;\n break;\n }\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n Log.print(\"ret is \" + ret + \"false means screencap failed!\");\n mContext.unregisterReceiver(mscreencapReceiver);\n }", "public native void enterScreenShotModeNative();", "public void updateTouchExcludeRegion() {\n TaskStack taskStack;\n Task task;\n AppWindowToken appWindowToken;\n WindowState popupWindowState;\n AppWindowToken appWindowToken2 = this.mFocusedApp;\n Task focusedTask = appWindowToken2 != null ? appWindowToken2.getTask() : null;\n if (focusedTask == null) {\n this.mTouchExcludeRegion.setEmpty();\n } else {\n this.mTouchExcludeRegion.set(this.mBaseDisplayRect);\n int delta = WindowManagerService.dipToPixel(HwFreeFormUtils.isFreeFormEnable() ? 20 : 30, this.mDisplayMetrics);\n this.mTmpRect2.setEmpty();\n for (int stackNdx = this.mTaskStackContainers.getChildCount() - 1; stackNdx >= 0; stackNdx--) {\n ((TaskStack) this.mTaskStackContainers.getChildAt(stackNdx)).setTouchExcludeRegion(focusedTask, delta, this.mTouchExcludeRegion, this.mDisplayFrames.mContent, this.mTmpRect2);\n }\n if (!this.mTmpRect2.isEmpty()) {\n this.mTouchExcludeRegion.op(this.mTmpRect2, Region.Op.UNION);\n }\n }\n if (HwPCUtils.isPcCastModeInServer()) {\n if (!this.isDefaultDisplay) {\n this.mTouchExcludeRegion.setEmpty();\n }\n this.mPcTouchExcludeRegion.setEmpty();\n }\n WindowState windowState = this.mInputMethodWindow;\n if (windowState != null && windowState.isVisibleLw()) {\n this.mInputMethodWindow.getTouchableRegion(this.mTmpRegion);\n if (!HwPCUtils.isPcCastModeInServer()) {\n this.mTouchExcludeRegion.op(this.mTmpRegion, Region.Op.UNION);\n } else if (this.mInputMethodWindow.getDisplayId() == this.mDisplayId) {\n this.mPcTouchExcludeRegion.op(this.mTmpRegion, Region.Op.UNION);\n }\n }\n if (!(!HwPCUtils.isPcCastModeInServer() || this.mDisplayId != 0 || (taskStack = (TaskStack) this.mTaskStackContainers.getTopChild()) == null || (task = (Task) taskStack.getTopChild()) == null || (appWindowToken = (AppWindowToken) task.getTopChild()) == null || appWindowToken.appComponentName == null || !\"com.huawei.desktop.systemui/com.huawei.systemui.mk.activity.ImitateActivity\".equalsIgnoreCase(appWindowToken.appComponentName))) {\n Rect touchpadBounds = new Rect();\n task.getDimBounds(touchpadBounds);\n this.mPcTouchExcludeRegion.op(touchpadBounds, Region.Op.UNION);\n WindowState touchpadState = (WindowState) appWindowToken.getTopChild();\n if (!(touchpadState == null || (popupWindowState = (WindowState) touchpadState.getTopChild()) == null || popupWindowState.mAttrs.type != 1000)) {\n Region popupRegion = new Region();\n popupWindowState.getTouchableRegion(popupRegion);\n this.mPcTouchExcludeRegion.op(popupRegion, Region.Op.DIFFERENCE);\n }\n }\n for (int i = this.mTapExcludedWindows.size() - 1; i >= 0; i--) {\n WindowState win = this.mTapExcludedWindows.get(i);\n if (!HwPCUtils.isPcCastModeInServer() || !HwPCUtils.isValidExtDisplayId(this.mDisplayId) || win.isVisible()) {\n win.getTouchableRegion(this.mTmpRegion);\n this.mTouchExcludeRegion.op(this.mTmpRegion, Region.Op.UNION);\n if (HwPCUtils.isPcCastModeInServer() && this.mDisplayId == 0 && win.isVisible() && !this.mPcTouchExcludeRegion.isEmpty()) {\n this.mPcTouchExcludeRegion.op(this.mTmpRegion, Region.Op.DIFFERENCE);\n }\n }\n }\n TaskTapPointerEventListener taskTapPointerEventListener = this.mTapDetector;\n if (taskTapPointerEventListener != null) {\n taskTapPointerEventListener.setHwPCTouchExcludeRegion(this.mPcTouchExcludeRegion);\n }\n amendWindowTapExcludeRegion(this.mTouchExcludeRegion);\n if (this.mDisplayId == 0 && getSplitScreenPrimaryStack() != null) {\n this.mDividerControllerLocked.getTouchRegion(this.mTmpRect);\n this.mTmpRegion.set(this.mTmpRect);\n this.mTouchExcludeRegion.op(this.mTmpRegion, Region.Op.UNION);\n }\n this.mTapDetector.setTouchExcludeRegion(this.mTouchExcludeRegion);\n }", "void onCaptureStart();", "public boolean isOnscreen(Rectangle screen) {\n\t\tboolean onscreen = false;\n\t\tonscreen = (screen.contains(NW) || screen.contains(NE) || screen.contains(SW) || screen.contains(SE));\n\t\treturn onscreen;\n\t}", "protected abstract void highLightPrompt();", "private boolean isOnScreen(float x, float y) {\r\n /* I'm not sure if it is necessary to check that the number is greater than 0 */\r\n return ((x < _offScreenCanvas.getWidth()) && (x > 0)) && ((y < _offScreenCanvas.getHeight()) && (y > 0));\r\n }", "void onEnoughLightAvailable() {\n //start eye tracking if it is not running already\n startEyeTracking();\n }", "public void onScreenUp() {\n faceUp = true;\n requestForValidationOfQibla();\n }", "@Override\n\tpublic void showServicePasswordNextScreen() {\n\t\tif(ParentActivity.AnimationRunningFlag == true)\n\t\t\treturn;\n\t\telse\n\t\t\tParentActivity.StartAnimationRunningTimer();\n\t\t\n\t\tParentActivity._MenuBaseFragment.showBodyESL();\n\t\t\n\t\tParentActivity.OldScreenIndex = Home.SCREEN_STATE_MENU_MODE_ETC_AUTOSHUTDOWN_PW;\n\t}", "public void touchDownDesktop(int screenX, int screenY, int button){\n\n if ((screenX > 10 && screenX < 70) && (screenY > (Constants.DESKTOP_HEIGHT-125) && screenY < (Constants.DESKTOP_HEIGHT-105))) {\n makeFeedbackSlower();\n }\n if ((screenX > 400 && screenX <460)&& (screenY > (Constants.DESKTOP_HEIGHT-125) && screenY < (Constants.DESKTOP_HEIGHT-105))) {\n makeFeedbackFaster();\n }\n if ((screenX > 10 && screenX < 70) && (screenY > (Constants.DESKTOP_HEIGHT-65) && screenY < (Constants.DESKTOP_HEIGHT-45))) {\n makeWaitBigger();\n }\n if ((screenX > 400 && screenX < 460)&& (screenY > (Constants.DESKTOP_HEIGHT-65) && screenY < (Constants.DESKTOP_HEIGHT-45))) {\n makeWaitSmaller();\n }\n if(button == Input.Buttons.RIGHT){\n game.setScreen(new IntroScreen(game));\n }\n\n\n }", "void onFingerprintEntered();", "public void onUnlockHintStarted() {\n super.onUnlockHintStarted();\n this.mNotificationStackScroller.setUnlockHintRunning(true);\n }", "public void enterForeground();", "public void reportSuccess() {\n Crashlytics.logBreadcrumb(\"MuunLockOverlay: reportSuccess\");\n\n pinInput.setSuccess();\n }", "protected void beforeUnlockWaitingForBooleanCondition() {\n }", "public boolean hasOverlay(ItemStack stack)\n {\n return this.field_77878_bZ == ItemArmor.ArmorMaterial.LEATHER || func_82814_b(stack) != 0x00FFFFFF;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE) {\n /** if so check once again if we have permission */\n if (Settings.canDrawOverlays(this)) {\n // continue here - permission was granted\n }\n }\n }", "private void runOverlay_ContinueMethod(){\n ChainTourGuide tourGuide1 = ChainTourGuide.init(getActivity())\n .setToolTip(new ToolTip()\n .setTitle(\"BottomBar\")\n .setDescription(\"The bottom bar is the primary navigation tool in the app.\" +\n \" Use it to switch functionality.\")\n .setGravity(Gravity.TOP)\n .setBackgroundColor(Color.parseColor(\"#333333\"))\n )\n .playLater(bottomBar);\n\n ChainTourGuide tourGuide2 = ChainTourGuide.init(getActivity())\n .setToolTip(new ToolTip()\n .setTitle(\"Add a Profile\")\n .setDescription(\"This button takes you to a screen where you can create Profiles.\" +\n \" Profiles are simply a set of apps to block, and an associated name.\")\n .setGravity(Gravity.BOTTOM | Gravity.LEFT)\n .setBackgroundColor(Color.parseColor(\"#333333\"))\n )\n .playLater(addItemButton);\n\n ChainTourGuide tourGuide3 = ChainTourGuide.init(getActivity())\n .setToolTip(new ToolTip()\n .setTitle(\"Menu\")\n .setDescription(\"This is the menu button - it will have different context\" +\n \" tools based on your location in the app.\")\n .setGravity(Gravity.BOTTOM | Gravity.LEFT)\n .setBackgroundColor(Color.parseColor(\"#333333\"))\n )\n .playLater(largerMenuButton);\n\n ChainTourGuide tourGuide4 = ChainTourGuide.init(getActivity())\n .setToolTip(new ToolTip()\n .setTitle(\"Profile Area\")\n .setDescription(\"This is where profiles will show up once they have been created. \")\n .setGravity(Gravity.BOTTOM)\n .setBackgroundColor(Color.parseColor(\"#333333\"))\n )\n .playLater(profilesRecyclerView);\n\n Sequence sequence = new Sequence.SequenceBuilder()\n .add(tourGuide1, tourGuide2, tourGuide3, tourGuide4)\n .setDefaultOverlay(new Overlay()\n .setEnterAnimation(mEnterAnimation)\n .setExitAnimation(mExitAnimation)\n )\n .setDefaultPointer(null)\n .setContinueMethod(Sequence.ContinueMethod.Overlay)\n .build();\n\n\n ChainTourGuide.init(getActivity()).playInSequence(sequence);\n }", "public boolean isSecondaryUseActive() {\n/* 330 */ return isShiftKeyDown();\n/* */ }", "public abstract void requestFocusToSecondaryPhone();", "public boolean mouseIn(int x1, int y1) {\r\n\t\tif ((x1 > x) && (x1 <x + ConstantData.CARD_WIDTH) && (y1 > y) && (y1 < y + ConstantData.CARD_HEIGHT)){\r\n\t\t\tif(enable == true) return true;\r\n\t\t\telse{\r\n\t\t\t\tToolkit.getDefaultToolkit().beep();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\t// pin check\n\t\t// time @15min\n\n\t\tString time = atPrefs.getString(\"time\", \"\");\n\t\tString times = String.valueOf(System.currentTimeMillis());\n\t\t// double t = Double.valueOf(time);\n\t\t// double tw = Double.valueOf(times);\n\t\tlong t = Long.valueOf(time);\n\t\tlong tw = System.currentTimeMillis();\n\t\tString ch = atPrefs.getString(check, \"true\");\n\t\tatPrefs.edit().putString(reboot, ch).commit();\n\t\tString chh = atPrefs.getString(callcheck, \"true\");\n\t\t// Toast.makeText(getApplicationContext(), \"onresume\" + \" \" + ch,\n\t\t// Toast.LENGTH_LONG).show();\n\t\tLog.i(\"con\", ch);\n\t\tLog.i(\"cons\", chh);\n\t\tLog.i(\"call form\", getClass().getName());\n\t\t// check if app open from background or not\n\t\tif (ch.equalsIgnoreCase(\"false\")) {\n\n\t\t\tif (chh.equalsIgnoreCase(\"true\")) {\n\t\t\t\t// when we open maps,pic dont show pin\n\t\t\t\t// Toast.makeText(getApplicationContext(), \"PinLock false\",\n\t\t\t\t// Toast.LENGTH_LONG).show();\n\t\t\t\tatPrefs.edit().putString(callcheck, \"false\").commit();\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\t// app open from background\n\n\t\t\t\t// Toast.makeText(getApplicationContext(), \"PinLock\",\n\t\t\t\t// Toast.LENGTH_LONG).show();\n\t\t\t\tif (!atPrefs.getBoolean(info.checkllogin, true)) {\n\t\t\t\t\tboolean s = tw > t;\n\t\t\t\t\t// Toast.makeText(getApplicationContext(),\n\t\t\t\t\t// \"PinLock\" + \" \" + s, Toast.LENGTH_LONG).show();\n\t\t\t\t\tlong d = Math.abs(tw - t);\n\t\t\t\t\tLog.i(\"math\", String.valueOf(d));\n\t\t\t\t\t// check current time is more then prev time , limit is 15\n\t\t\t\t\t// min\n\t\t\t\t\tif (Math.abs(tw - t) > 900000) {\n\t\t\t\t\t\t// Toast.makeText(getApplicationContext(),\n\t\t\t\t\t\t// \"PinLock enter\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\tIntent ne = new Intent(getApplicationContext(),\n\t\t\t\t\t\t\t\tPinLock.class);\n\t\t\t\t\t\tstartActivity(ne);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Toast.makeText(getApplicationContext(),\n\t\t\t\t\t\t// \"PinLock else\",\n\t\t\t\t\t\t// Toast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}", "@Override\n protected void onPause() {\n if (LockscreenReceiver.wasScreenOn){\n finish();\n }\n\n super.onPause();\n }", "Point onScreen();", "public void exitOverlay() {\n\t\tdeRegister(); \n\t}", "@Override\n public void onEnterAmbient(Bundle ambientDetails) {\n Toast.makeText(getApplicationContext(), \"Enter\", Toast.LENGTH_LONG).show();\n }", "protected void ap() {\n Object object = this.li;\n synchronized (object) {\n if (this.lz != null) {\n return;\n }\n IntentFilter intentFilter = new IntentFilter();\n intentFilter.addAction(\"android.intent.action.SCREEN_ON\");\n intentFilter.addAction(\"android.intent.action.SCREEN_OFF\");\n this.lz = new BroadcastReceiver(){\n\n public void onReceive(Context context, Intent intent) {\n ab.this.d(false);\n }\n };\n this.lp.registerReceiver(this.lz, intentFilter);\n return;\n }\n }", "public boolean supportShowOnScreenLocked() {\n return false;\n }", "public boolean checkDrawOverlayPermission() {\r\n if (Build.VERSION.SDK_INT >= 23) {\r\n if (!Settings.canDrawOverlays(activity)) {\r\n /** if not construct intent to request permission */\r\n Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,\r\n Uri.parse(\"package:\" + activity.getPackageName()));\r\n /** request permission via start activity for result */\r\n activity.startActivityForResult(intent, SETTINGS_REQUEST_CODE);\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n } else {\r\n return true;\r\n }\r\n\r\n\r\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyAcctViewOverlay() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether the Account list overlay of that particular view is displayed \"); \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUser_Creation()\n\t\t.VerifyViewNameAcctOverlay(userProfile);\n\n\t}", "@Override\n public boolean workaroundBySurfaceProcessing() {\n return isHuaweiMate20() || isHuaweiMate20Pro() || isHuaweiP40Lite();\n }", "public void afterWalletOpened() {\n\n // Should be called from within the EDT by design\n Preconditions.checkState(SwingUtilities.isEventDispatchThread(), \"Must be in the EDT. Check MainController.\");\n\n if (screenViewMap.isEmpty()) {\n\n // Populate based on the current locale\n populateScreenViewMap();\n\n // Once all the views are created allow events to occur\n for (Map.Entry<Screen, AbstractScreenView> entry : screenViewMap.entrySet()) {\n\n // Ensure the screen is in the correct starting state\n entry.getValue().fireInitialStateViewEvents();\n\n }\n }\n\n }", "public void xboxHatchControl()\n {\n if (RobotMap.assistantDriverController.getStartButtonPressed())\n {\n RobotMap.hatchHolderTalon.set(0);\n }\n if (RobotMap.assistantDriverController.getBumperPressed(Hand.kLeft))\n {\n if (RobotMap.hatchHolderHasHatch)\n new ReleaseHatchCommand().start();\n else\n new GrabHatchCommand().start();\n RobotMap.hatchHolderHasHatch = !RobotMap.hatchHolderHasHatch;\n }\n }", "public void run() {\n while(true)\r\n {\r\n synchronized (this) {\r\n try {\r\n wait(milisecsToWait);\r\n\r\n runOnUiThread(new Runnable() {\r\n @Override\r\n public void run() {\r\n if( !monitor_for_ingress_status )\r\n return;\r\n if (ingress_running_in_foreground()) {\r\n if (!overlayView.isVisible()) {\r\n overlayView.setVisible();\r\n overlayView.setText(\"HI!\\nIngress is running\");\r\n } else {\r\n /*\r\n Log.i(\"julin\", \"overlay es visible e ingress esta en fg\");\r\n */\r\n }\r\n } else {\r\n if (overlayView.isVisible()) {\r\n overlayView.setInvisible();\r\n overlayView.setText(\"HI!\\nIngress is NOT running\");\r\n } else {\r\n /*\r\n Log.i(\"julin\", \"overlay es invisible e ingress no esta en fg\");\r\n try {\r\n Intent intent = new Intent(Intent.ACTION_MAIN);\r\n intent.setClassName(\"com.nianticproject.ingress\", \"com.nianticproject.ingress.NemesisActivity\");\r\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n startActivity(intent);\r\n }catch (Exception e){\r\n Log.e(\"julin\", e.getMessage());\r\n }\r\n */\r\n }\r\n }\r\n }\r\n });\r\n handler.sendEmptyMessage(1);\r\n\r\n } catch (InterruptedException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n\r\n }", "public void onCheckAppFirstStart() {\n HwAPPStateInfo curAppInfo = getCurStreamAppInfo();\n if (curAppInfo != null && 100501 == curAppInfo.mScenceId && true == curAppInfo.mIsAppFirstStart && !curAppInfo.mIsVideoStart) {\n boolean isPoorNetwork = false;\n int curRxPackets = this.mHwHiStreamQoeMonitor.getCurTcpRxPackets(curAppInfo.mAppUID);\n if (!(-1 == this.mStartTcpRxPackets || -1 == curRxPackets || curRxPackets - this.mStartTcpRxPackets >= 300)) {\n isPoorNetwork = true;\n }\n HwHiStreamUtils.logD(\"onCheckAppFirstStart: isPoorNetwork = \" + isPoorNetwork);\n if (isPoorNetwork) {\n IHwAPPQoECallback brainCallback = getArbitrationCallback();\n if (brainCallback != null) {\n brainCallback.onAPPQualityCallBack(curAppInfo, 107);\n }\n this.mHwHiStreamCHRManager.onStallDetect(curAppInfo.mScenceId, 107, this.mQoeCallback);\n }\n }\n }", "protected void onResume(){\n super.onResume();\n hideSystemUI();\n if (!coreView.isGamePaused()) //only resume game if there wasn't a manual pause prior to losing focus\n coreView.resume();\n }", "public boolean isEntered();", "private void bypassIt(){\n rebootDialog();\n }", "public void looser()\n {\n this.mapFrame.looser();\n }", "public final void onEnterAmbient(android.os.Bundle param0) {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.huawei.hms.maps.MapView) this.getHInstance()).onEnterAmbient(param0)\");\n ((com.huawei.hms.maps.MapView) this.getHInstance()).onEnterAmbient(param0);\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.google.android.gms.maps.MapView) this.getGInstance()).onEnterAmbient(param0)\");\n ((com.google.android.gms.maps.MapView) this.getGInstance()).onEnterAmbient(param0);\n }\n }", "boolean hasWin();", "void composingIndicatorReceived(IMSession session, String sender, int timeout);", "void onScreenTapped(int x, int y) {\n\t\tboolean missed = true;\t\n\t\tif (missed) {\n\t\t\t// managed to miss everything, clear bubbles\n\t\t\t//mBubbleMap.clear();\n\t\t\tinvalidate();\n\t\t}\n\t}", "public boolean canDismissWithTouchOutside() {\n return this.cameraOpened ^ 1;\n }", "public boolean isAccessibilityFocused() {\n/* 853 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@UnsupportedAppUsage\n void reportPrimaryClipChanged() {\n Object[] arrobject;\n ArrayList<OnPrimaryClipChangedListener> arrayList = this.mPrimaryClipChangedListeners;\n synchronized (arrayList) {\n if (this.mPrimaryClipChangedListeners.size() <= 0) {\n return;\n }\n arrobject = this.mPrimaryClipChangedListeners.toArray();\n }\n int n = 0;\n while (n < arrobject.length) {\n ((OnPrimaryClipChangedListener)arrobject[n]).onPrimaryClipChanged();\n ++n;\n }\n return;\n }", "void onP2pNotEnabled();", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\tautInsertScreenByScenario();\r\n\t\t\t}", "@Override\r\npublic void setOnScreen(boolean os) {\n}", "private InputStream interposeActivityDetector(InputStream out) {\n\tfinal NotifyingInputSteam notifier = new NotifyingInputSteam(out);\n\tnotifier.setListener(new NotifyingInputSteam.Listener () {\n\t public void activity () {\n\t\tif (DebuggerOption.FRONT_PIO.isEnabled(\n\t\t\t NativeDebuggerManager.get().globalOptions()))\n\t\t OldTermComponent.this.requestVisible();\n\t }\n\t});\n\tnotifier.arm();\n\n\tout = notifier;\n\treturn out;\n }", "@SubscribeEvent(receiveCanceled = true)\n public void onEvent(RenderGameOverlayEvent.Post event) {\n switch (event.getType()) {\n case HEALTH:\n\n break;\n default: // If it's not one of the above cases, do nothing\n break;\n }\n }", "@Override\n public void onScanned(Barcode barcode) {\n super.onScanned(barcode);\n\n //on Scan completed close the scanner\n if (isScanning.get()) {\n getChildFragmentManager()\n .beginTransaction()\n .remove(getChildFragmentManager().findFragmentById(R.id.scannerFragment))\n .commit();\n }\n\n isScanning.set(false);\n\n /*\n * this works when if user scan the exist\n * code without scanning the enter code\n */\n boolean waitingForEnterCode = !getUpdatedPendingEntryEvent();\n if (barcode.rawValue.equals(EXIT) && waitingForEnterCode) {\n String message = \"Its look like that you haven't scan the Enter Code \" + new String(Character.toChars(0x1F622));\n showAlertDialog(message);\n return;\n }\n\n /*\n * this works when user scan the enter code again\n * without scanning the exit code\n */\n boolean waitingForExitCode = getUpdatedPendingEntryEvent();\n if (barcode.rawValue.equals(ENTER) && waitingForExitCode) {\n String message = \"you have already scan the Enter code First scan a Exist \" + new String(Character.toChars(0x1F622));\n showAlertDialog(message);\n return;\n }\n\n if (barcode.rawValue.equals(Constants.IQRCode.ENTER)) {\n viewmodel.updateScannedValueWhenEnter();\n updatePendingEntryEvent(true);\n } else if (barcode.rawValue.equals(EXIT)) {\n viewmodel.updateScannedValueWhenExist();\n updatePendingEntryEvent(false);\n } else {\n Toast.makeText(getActivity(), \"no action specified\", Toast.LENGTH_SHORT).show();\n }\n }", "public void onAttachedToWindow() {\n super.onAttachedToWindow();\n if (!isInEditMode()) {\n this.mAdjustRelockTimePadLockPresenter.start();\n }\n }", "void onNativeWindowChanged(Surface surface);", "private void RunPinTest()\n {\n Log.d(\"IRON-HID\", \"Start AutoTest\");\n mStopTest = false;\n Runnable runnable = new Runnable()\n {\n @Override\n public void run()\n {\n for (int i = 0 ; i < 10000 ; i ++)\n {\n String data = String.format(\"%04d\", i);\n SendCommandOrKeys(VIEW_ID_KEY, data);\n SendCommandOrKeys(VIEW_ID_KEY, \"[KEY_ENTER]\");\n if (mStopTest == true)\n {\n return ;\n }\n\n try\n {\n Thread.sleep(10);\n }\n catch(Exception e)\n {\n\n }\n }\n\n AddMsgToKeyView(VIEW_ID_KEY, \"remote> auto PIN test is ended\\n\");\n }\n };;\n\n //new Handler().post(runnable);\n new Thread(runnable).start();\n }", "public void switchToGameOverScreen() {\n \tCardLayout currLayout = (CardLayout) screens.getLayout();\n \tcurrLayout.show(screens, \"gameover\");\n }", "void askLeaderCardActivation();", "public void handleScreenOnTimeout() {\n this.mTimeoutSummary = getTimeoutSummary();\n Slog.e(TAG, this.mTimeoutSummary);\n this.mHandler.sendEmptyMessageDelayed(5, REPORT_DELAY);\n }", "public interface InCallEventListener {\n public void onFullscreenModeChanged(boolean isFullscreenMode);\n }", "@Override\n public void onMachineActivated()\n {\n \n }", "static void showOverlay() {\n\t\ti1.setOverlay(OL);\n\t}" ]
[ "0.602509", "0.5784681", "0.5750928", "0.5661613", "0.5644148", "0.56115276", "0.55263203", "0.5495755", "0.54598045", "0.5405888", "0.53741676", "0.5373327", "0.53541523", "0.5350797", "0.5350797", "0.5332403", "0.5329848", "0.5323085", "0.53155994", "0.53055316", "0.52814066", "0.52721244", "0.526529", "0.5258825", "0.5249695", "0.5222726", "0.5192234", "0.51701134", "0.5155494", "0.5138476", "0.51353526", "0.51252735", "0.5123542", "0.5108632", "0.51041263", "0.50839543", "0.5080302", "0.507791", "0.50663275", "0.50659037", "0.50478435", "0.5046172", "0.5045867", "0.5043977", "0.5038876", "0.5038749", "0.5026267", "0.5022571", "0.4995115", "0.49935046", "0.4992856", "0.49904376", "0.4989698", "0.4988651", "0.49865106", "0.49821147", "0.49811572", "0.498031", "0.49768806", "0.4974983", "0.49719158", "0.49717623", "0.49687254", "0.49684063", "0.496648", "0.49613968", "0.4951877", "0.49402434", "0.49388963", "0.49382183", "0.49375892", "0.49240664", "0.49217826", "0.49195328", "0.49144673", "0.49134955", "0.49132797", "0.49082732", "0.49070245", "0.4905093", "0.4904947", "0.4893569", "0.48919976", "0.4888481", "0.48871776", "0.48799717", "0.48785654", "0.48763782", "0.48692742", "0.4867719", "0.4862765", "0.4859672", "0.48506835", "0.48494953", "0.48425493", "0.4839951", "0.4839833", "0.48385006", "0.48378408", "0.48343104", "0.48342082" ]
0.0
-1
An identifier with the intention of being globally unique.
@Schema(required = true, description = "An identifier with the intention of being globally unique. ") public String getId() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getUniqueId();", "String uniqueId();", "private UniqueIdentifier(){\n\t\t\n\t}", "String getUniqueID();", "public String getUniqueID();", "public String getUniqueID ( ) { return _uniqueID; }", "@Override\n\tpublic native final String createUniqueId() /*-{\n // In order to force uid's to be document-unique across multiple modules,\n // we hang a counter from the document.\n if (!this.gwt_uid) {\n this.gwt_uid = 1;\n }\n\n return \"gwt-uid-\" + this.gwt_uid++;\n\t}-*/;", "private static String localUnique(){\n\t\tfinal long counterValue = instanceCounter.getAndIncrement();\n\t\tString unique = uniqueTop + String.format(\"%08d\", counterValue);\n\t\treturn unique;\t\t\n\t}", "public static String aUniqueIdentifier() {\n return \"MONEXT\" + new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\n }", "UUID getUniqueId();", "public static String randomIdentifier() {\r\n\t\tfinal String lexicon = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\r\n\t\tfinal java.util.Random rand = new java.util.Random();\r\n\t\t// consider using a Map<String,Boolean> to say whether the identifier is\r\n\t\t// being used or not\r\n\t\tfinal Set<String> identifiers = new HashSet<String>();\r\n\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\twhile (builder.toString().length() == 0) {\r\n\t\t\tint length = rand.nextInt(5) + 5;\r\n\t\t\tfor (int i = 0; i < length; i++)\r\n\t\t\t\tbuilder.append(lexicon.charAt(rand.nextInt(lexicon.length())));\r\n\t\t\tif (identifiers.contains(builder.toString()))\r\n\t\t\t\tbuilder = new StringBuilder();\r\n\t\t}\r\n\t\treturn builder.toString();\r\n\t}", "public String getUniqueId() {\n return _uniqueId;\n }", "public static String getUniqueIdentifier() {\r\n UUID uuid = UUID.randomUUID();\r\n return uuid.toString();\r\n }", "private static long getGlobalId() {\n return globalId++;\n }", "java.lang.String getIdentifier();", "String createUniqueID(String n){\n String uniqueID =UUID.randomUUID().toString();\n return n + uniqueID;\n }", "public static String uniqueId() {\r\n return UUID.randomUUID().toString();\r\n }", "private String generateUniqueIdString() {\r\n return TimeBasedUUID.getUUIDAsString();\r\n }", "String getUnique();", "public String createUniqueScriptInstanceIdentifier() {\n\n\t\tLOGGER.debug(\"Creating a unique script instance identifier\");\n\n\t\t// generate a random name for the connection\n\t\tCalendar myCalendar = Calendar.getInstance();\n\t\tSimpleDateFormat dateFormatter = new SimpleDateFormat(\"yyyyMMddHHmmssS\");\n\t\tString scriptIdentifier = \"scriptInstance\"\n\t\t\t\t+ dateFormatter.format(myCalendar.getTime())\n\t\t\t\t+ randomNameSequence;\n\t\trandomNameSequence = randomNameSequence + 1;\n\n\t\tLOGGER.info(\"Generated unique script instance identifier [\"\n\t\t\t\t+ scriptIdentifier + \"]\");\n\n\t\treturn scriptIdentifier;\n\t}", "public int getUniqueId() {\r\n\t\treturn uniqueId;\r\n\t}", "public static String makeAnonID() {\n String id = \"__anon\" + nextAnonID;\n nextAnonID++;\n return id;\n }", "public static String uniqueId() {\n return UUID.randomUUID().toString();\n }", "String generateUID();", "protected int getUniqueID() {\n\t\treturn uniqueID;\n\t}", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "public String uniqueId() {\n return this.uniqueId;\n }", "public String getUniqueID()\r\n {\r\n return (m_uniqueID);\r\n }", "int getIdentifier();", "public String getUniqueIdentifier(){\n return (streetAddress + aptNumber + zip).toLowerCase().replaceAll(\"\\\\s+\",\"\"); \n }", "public String getUniqueIdValue() {\n return uniqueIdValue;\n }", "private String creatUniqueID(){\n long ID = System.currentTimeMillis();\n return Long.toString(ID).substring(9,13);\n }", "protected abstract String getIdentifier();", "Identifier getId();", "public String getIdentifierString();", "public String getIdentifier();", "public String getIdentifier();", "public int getIdentifier();", "public int identifier();", "public String getUniqueID() {\n return this.uniqueID;\n }", "@NonNull String identifier();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "static String generateId() {\r\n\t\treturn UUID.randomUUID().toString().replaceAll(\"-\", \"\");\r\n\t}", "public void generateID()\n {\n ID = this.hashCode();\n }", "public int getUniqueID() { \n return -1;\n }", "private String setUniqueIdentifier(String sUid, Set<Attribute> attrs) {\n\t\tLOG.info(\"BEGIN\");\n\t\tSet<Attribute> currentAttrSet = new HashSet<Attribute>(AttributeUtil\n\t\t\t\t.getCurrentAttributes(attrs));\n\t\tString cUid = AttributeUtil.getNameFromAttributes(currentAttrSet)\n\t\t\t\t.getNameValue();\n\t\tif (cUid.equals(sUid)) {\n\t\t\tsUid = getUniqueIdentifier(cUid);\n\t\t}\n\t\tLOG.info(\"END :: \" + sUid);\n\t\treturn sUid;\n\t}", "public int hashCode() {\n/* 781 */ return getUniqueId().hashCode();\n/* */ }", "protected UniqueID() {\n UUID newID = UUID.randomUUID();\n this.mostSigBits = newID.getMostSignificantBits();\n this.leastSigBits = newID.getLeastSignificantBits();\n }", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();" ]
[ "0.7642663", "0.7632102", "0.7609607", "0.75684726", "0.7332398", "0.72924423", "0.7221237", "0.71983284", "0.7166887", "0.7143184", "0.71310735", "0.70370036", "0.70310867", "0.7003024", "0.6968177", "0.6954913", "0.6951806", "0.6946664", "0.69176143", "0.6914219", "0.6882111", "0.6858556", "0.68294626", "0.6828604", "0.6816279", "0.6789615", "0.6789615", "0.6789615", "0.6789615", "0.6789615", "0.6789615", "0.6789615", "0.67682546", "0.6741641", "0.6732884", "0.6726964", "0.6707377", "0.67059016", "0.66985345", "0.66971874", "0.6679381", "0.66633654", "0.66633654", "0.6653717", "0.6631213", "0.6625738", "0.660764", "0.66066", "0.66066", "0.66066", "0.66066", "0.66066", "0.66066", "0.66066", "0.66066", "0.66066", "0.66066", "0.66066", "0.66066", "0.66066", "0.66066", "0.66066", "0.66066", "0.66066", "0.66066", "0.66066", "0.66066", "0.66066", "0.66066", "0.66066", "0.66066", "0.66004485", "0.65798485", "0.6579457", "0.6573679", "0.6572976", "0.6548487", "0.6542766", "0.6542766", "0.6542766", "0.6542766", "0.6542766", "0.6542766", "0.6542766", "0.6542766", "0.6542766", "0.6542766", "0.6542766", "0.6542766", "0.6542766", "0.6542766", "0.6542766", "0.6542766", "0.6542766", "0.6542766", "0.6542766", "0.6542766", "0.6542766", "0.6542766", "0.6542766" ]
0.6646343
44
An identifier that is unique within a NS descriptor. Representation: string of variable length.
@Schema(required = true, description = "An identifier that is unique within a NS descriptor. Representation: string of variable length. ") public String getVnffgdId() { return vnffgdId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getIdentifier() {\n java.lang.Object ref = identifier_;\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 identifier_ = s;\n }\n return s;\n }\n }", "public java.lang.String getIdentifier() {\n java.lang.Object ref = identifier_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n identifier_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getIdentifierString();", "java.lang.String getIdentifier();", "public com.google.protobuf.ByteString\n getIdentifierBytes() {\n java.lang.Object ref = identifier_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n identifier_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getIdentifierBytes() {\n java.lang.Object ref = identifier_;\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 identifier_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@XmlElement(name = \"identifier\", namespace = Namespaces.SRV)\n final String getIdentifier() {\n if (LEGACY_XML) {\n final ScopedName name = getScopedName();\n if (name != null) {\n return name.tip().toString();\n }\n }\n return null;\n }", "public String getStringIdentifier() { return \"\"; }", "com.google.protobuf.ByteString\n getIdentifierBytes();", "public String getId() {\n return this.getClass().getSimpleName() + \"@\" + this.hashCode();\n }", "public String getId() {\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append(\"n=\");\n\t\tif ( nodeId != null ) {\n\t\t\tbuilder.append(nodeId);\n\t\t}\n\t\tbuilder.append(\";c=\");\n\t\tif ( created != null ) {\n\t\t\tbuilder.append(created);\n\t\t}\n\t\tbuilder.append(\";s=\");\n\t\tif ( sourceId != null ) {\n\t\t\tbuilder.append(sourceId);\n\t\t}\n\t\treturn DigestUtils.sha1Hex(builder.toString());\n\t}", "public String toStringID()\r\n\t{\r\n\t\treturn nodeIdString;\r\n\t}", "@NonNull\n public String getIdentifier() {\n return mProto.id;\n }", "@NonNull String identifier();", "@Schema(required = true, description = \"An identifier that is unique for the respective type within a VNF instance, but may not be globally unique. \")\n public String getId() {\n return id;\n }", "public String getId()\r\n\t{\n\t\treturn id.substring(2, 5);\r\n\t}", "public byte[] id() {\n return Token.concat(Token.DOLLAR, name.internal());\n }", "public String getIdentifier() {\n try {\n return keyAlias + \"-\" + toHexString(\n MessageDigest.getInstance(\"SHA1\").digest(keyStoreManager.getIdentifierKey(keyAlias).getEncoded()));\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "@Override\n public String getToID()\n {\n \tStringBuilder sb = new StringBuilder();\n\n\t\tint prefix = getPrefix();\n \tint ident = getIdent1();\n\n \tswitch( IdentType.fromIdent( ident ) )\n \t{\n \t\tcase IPFIXI:\n \t\t\tsb.append( \"INTER-PREFIX\" );\n \t\t\tbreak;\n \t\tcase ALLI:\n \t\t\tsb.append( \"ALL RADIOS\" );\n \t\t\tbreak;\n \t\tcase PABXI:\n \t\t\tsb.append( \"PABX EXT\" );\n \t\t\tbreak;\n \t\tcase PSTNSI1:\n \t\tcase PSTNSI2:\n \t\tcase PSTNSI3:\n \t\tcase PSTNSI4:\n \t\tcase PSTNSI5:\n \t\tcase PSTNSI6:\n \t\tcase PSTNSI7:\n \t\tcase PSTNSI8:\n \t\tcase PSTNSI9:\n \t\tcase PSTNSI10:\n \t\tcase PSTNSI11:\n \t\tcase PSTNSI12:\n \t\tcase PSTNSI13:\n \t\tcase PSTNSI14:\n \t\tcase PSTNSI15:\n \t\t\tsb.append( \"PRE-DEFINED PSTN\" );\n \t\t\tbreak;\n \t\tcase PSTNGI:\n \t\t\tsb.append( \"PSTN GATEWAY\" );\n \t\t\tbreak;\n \t\tcase TSCI:\n \t\t\tsb.append( \"SYSTEM CONTROLLER\" );\n \t\t\tbreak;\n \t\tcase DIVERTI:\n \t\t\tsb.append( \"CALL DIVERT\" );\n \t\t\tbreak;\n \t\tcase USER:\n\t\t\tdefault:\n\t\t\t\tif( prefix != 0 || ident != 0 )\n\t\t\t\t{\n\t \tsb.append( format( prefix, 3 ) );\n\t \tsb.append( \"-\" );\n\t \tsb.append( format( ident, 4) );\n\t\t\t\t}\n \tbreak;\n \t}\n\n \treturn sb.toString();\n }", "java.lang.String getStringId();", "java.lang.String getStringId();", "public int numericName()\n {\n return Factory.getID(this);\n }", "public String getIdentifier();", "public String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "public String getIdentifier() {\n/* 222 */ return getValue(\"identifier\");\n/* */ }", "public static String aUniqueIdentifier() {\n return \"MONEXT\" + new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\n }", "public String getIdentifier() {\n\t\treturn config.getUIName()+\"[\"+getIndex()+\"]\";\n\t}", "protected abstract String getIdentifier();", "String mo10312id();", "int getSymbolicId();", "public int identifier();", "public java.lang.String getId() {\n\t\t\t\t\tjava.lang.Object ref = id_;\n\t\t\t\t\tif (!(ref instanceof java.lang.String)) {\n\t\t\t\t\t\tcom.google.protobuf.ByteString bs =\n\t\t\t\t\t\t\t\t(com.google.protobuf.ByteString) ref;\n\t\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\t\tid_ = s;\n\t\t\t\t\t\treturn s;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t\t}\n\t\t\t\t}", "java.lang.String getID();", "public int getIdentifier();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "public String code() {\n\t\treturn (\"ID\"+this.hashCode()).replace(\"-\", \"M\");\n\t}", "public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getSID() {\n java.lang.Object ref = sID_;\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 sID_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getSID() {\n java.lang.Object ref = sID_;\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 sID_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getSID() {\n java.lang.Object ref = sID_;\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 sID_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getSID() {\n java.lang.Object ref = sID_;\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 sID_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getSID() {\n java.lang.Object ref = sID_;\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 sID_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getSID() {\n java.lang.Object ref = sID_;\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 sID_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getSID() {\n java.lang.Object ref = sID_;\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 sID_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@java.lang.Override\n public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getId() {\n java.lang.Object ref = id_;\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 id_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getId() {\n java.lang.Object ref = id_;\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 id_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getId() {\n java.lang.Object ref = id_;\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 id_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getId() {\n java.lang.Object ref = id_;\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 id_ = s;\n return s;\n }\n }" ]
[ "0.7280677", "0.72733057", "0.7230234", "0.68796253", "0.68629855", "0.67322963", "0.6724753", "0.67064023", "0.6673972", "0.66669494", "0.6628082", "0.66093117", "0.65946376", "0.65516824", "0.6531636", "0.6525702", "0.6519996", "0.64915544", "0.6486449", "0.6449259", "0.6449259", "0.6446898", "0.6399204", "0.6399204", "0.63711745", "0.63711745", "0.63711745", "0.63711745", "0.63711745", "0.63711745", "0.63711745", "0.6352972", "0.6320359", "0.6274901", "0.6266945", "0.6249304", "0.6240876", "0.62244", "0.6224202", "0.6205737", "0.6199779", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61997277", "0.61943173", "0.61925185", "0.61925185", "0.61875284", "0.61875284", "0.61875284", "0.61875284", "0.61875284", "0.61875284", "0.61875284", "0.6182424", "0.6182424", "0.6178973", "0.6178973", "0.6178973", "0.6178973" ]
0.67416483
5
Identifier(s) of the constituent VNF instance(s) of this VNFFG instance.
@Schema(required = true, description = "Identifier(s) of the constituent VNF instance(s) of this VNFFG instance. ") public List<String> getVnfInstanceId() { return vnfInstanceId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Schema(description = \"Identifier(s) of the constituent PNF instance(s) of this VNFFG instance. \")\n public List<String> getPnfdInfoId() {\n return pnfdInfoId;\n }", "@Schema(description = \"Identifier(s) of the constituent VL instance(s) of this VNFFG instance. \")\n public List<String> getNsVirtualLinkInfoId() {\n return nsVirtualLinkInfoId;\n }", "@Schema(required = true, description = \"An identifier that is unique within a NS descriptor. Representation: string of variable length. \")\n public String getVnffgdId() {\n return vnffgdId;\n }", "@Schema(required = true, description = \"An identifier with the intention of being globally unique. \")\n public String getVnfInstanceId() {\n return vnfInstanceId;\n }", "public SortedSet<WVnfInstance> getAllVnfInstances ()\n\t{\n\t\treturn n.getResources().stream().filter(r->!r.getType().contains(WNetConstants.LISTSEPARATORANDINVALIDNAMECHARACTER)).map(r->new WVnfInstance(r)).collect(Collectors.toCollection(TreeSet::new));\n\t}", "@Schema(description = \"An identifier that is unique for the respective type within a VNF instance, but may not be globally unique. \")\n public String getCpInstanceId() {\n return cpInstanceId;\n }", "public ConstellationIdentifier identifier();", "@Override\n public String toString() {\n return \"V\"+this.VS_ID+\"\\tNodes: \"+getNodes()[0]+\" & \"+getNodes()[1]+\"\\t\"+\"DC\\t\"+getValue()+\" V\";\n }", "public String getCvv() {\n return cvv;\n }", "public String getIDFV() {\n return this.IDFV;\n }", "public String toString( ) {\n return \"v\" + id;\n }", "public Vector<String> getIdentifiers()\n\t{\n\t\tfinal Vector<String> rets = new Vector<String>();\n\t\trets.add(identifier);\n\t\treturn rets;\n\t}", "@Override\n public String getName() {\n return \"NVD CVE Analyzer\";\n }", "public int getvID() {\n return vID;\n }", "public long getId() {\n\t\treturn graphicFrame.getNvGraphicFramePr().getCNvPr().getId();\n\t}", "public String generateVSVID();", "public String getCVCTG_NOMBRE(){\n\t\treturn this.myCvctg_nombre;\n\t}", "protected List<String> getVclassIds(VitroRequest vreq) {\n\t\tString[] vclassIds = vreq.getParameterValues(\"vclassId\");\n\t\tif ((vclassIds == null) || (vclassIds.length == 0)) {\n\t\t\tlog.error(\"parameter vclassId expected but not found\");\n\t\t\tthrow new IllegalStateException(\"parameter vclassId expected \");\n\t\t}\n\n\t\tfor (String vclassId : vclassIds) {\n\t\t\tinstantiateVclass(vclassId, vreq);\n\t\t}\n\n\t\treturn Arrays.asList(vclassIds);\n\t}", "@Schema(description = \"Identifiers of the CP instances attached to the constituent VNFs and PNFs or the SAP instances of the VNFFG. See note. \")\n public List<NsInstancesNsInstanceNsCpHandle> getNsCpHandle() {\n return nsCpHandle;\n }", "public int getConstituentIndex() {\n return this.constituentIndex;\n }", "public abstract java.lang.String getIdpcTV();", "private void createNVertices() {\n\t\tfor (int i = 0; i < this.numNVertices; i++) {\n\t\t\tvertices.add(new Vertex('n', this.countNID++));\n\t\t}\n\t}", "@Override\n public Set<DataFact> visitInstanceof(CGNode n, SSAInstanceofInstruction instruction, DataFact fact) {\n\n return Collections.singleton(fact);\n }", "@Override\n\tpublic String inspectPrimaryKey() {\n\t\treturn \"INDV_ELG: \" + \"bnft_pin_num=\" + bnft_pin_num + \",\" + \"bnft_case_num=\" + bnft_case_num + \",\" + \"cat_cd=\" + cat_cd + \",\" + \"scat_cd=\"\n\t\t\t\t+ scat_cd + \",\" + \"scat_seq_num=\" + scat_seq_num + \",\" + \"cur_elg_ind=\" + cur_elg_ind + \",\" + \"pymt_beg_dt=\" + pymt_beg_dt;\n\t}", "public String getViveId()\n\t{\n\t\treturn viveId;\n\t}", "public String toString() {\n StringBuffer sb = new StringBuffer();\n sb.append(\"[\");\n sb.append(fiIdCv);\n sb.append(\"]:\");\n sb.append(fiIdHoso);\n sb.append(\"|\");\n sb.append(fiMaHoso);\n sb.append(\"|\");\n sb.append(fiCoQuanCap);\n sb.append(\"|\");\n sb.append(fiSoCongVan);\n sb.append(\"|\");\n sb.append(fiNgayKy);\n sb.append(\"|\");\n sb.append(fiNguoiKy);\n sb.append(\"|\");\n sb.append(fiNgayHetHl);\n sb.append(\"|\");\n sb.append(fiLoaiDon);\n sb.append(\"|\");\n sb.append(fiHoatdong);\n sb.append(\"|\");\n sb.append(fiNguoitao);\n sb.append(\"|\");\n sb.append(fiNgaytao);\n sb.append(\"|\");\n sb.append(fiNgCapnhat);\n return sb.toString();\n }", "public String getCtvTag() {\n\t\treturn ctvTag;\n\t}", "public IString getVariableIdentifier() {\n\treturn VARIABLE_IDENTIFIER.get(getNd(), this.address);\n }", "@Schema(required = true, description = \"An identifier that is unique for the respective type within a VNF instance, but may not be globally unique. \")\n public String getId() {\n return id;\n }", "@Override\n\tpublic String svctypeId() throws Exception{\n\t\treturn null;\n\t}", "public void generateCpnIDs() {\n\t\t// for all places, generate a cpnID\n\t\tIterator places = this.getPlaces().iterator();\n\t\twhile (places.hasNext()) {\n\t\t\tColoredPlace place = (ColoredPlace) places.next();\n\t\t\tplace.setCpnID(ManagerID.getNewID());\n\t\t}\n\t\t// for all transitions, generate a cpnID\n\t\tIterator transitions = this.getTransitions().iterator();\n\t\twhile (transitions.hasNext()) {\n\t\t\tColoredTransition transition = (ColoredTransition) transitions.next();\n\t\t\ttransition.setCpnID(ManagerID.getNewID());\n\t\t}\n\t}", "@DISPID(14)\n\t// = 0xe. The runtime will prefer the VTID if present\n\t@VTID(23)\n\tjava.lang.String name();", "@DISPID(10) //= 0xa. The runtime will prefer the VTID if present\r\n @VTID(17)\r\n java.lang.String[] getNames();", "@Override\n public String toString(){\n return \"G(\"+this.getVidas()+\")\";\n }", "public String toString() {\n\t\treturn thisInstance.getInstanceClass().getName() + \" : \" + thisInstance.getInstanceInObject().getObjectId() ;\n\t}", "public String getStringOfGene()\n {\n String print = \"\";\n for(int x = 0; x < numOfCoef; x++)\n {\n print = print +\"||\"+ vectOfCoef.get(x);\n }\n return print;\n }", "public String getS_c_n() {\n return s_c_n;\n }", "public java.lang.String getCsp_Nif() {\n return csp_Nif;\n }", "@DISPID(6)\n\t// = 0x6. The runtime will prefer the VTID if present\n\t@VTID(13)\n\tint id();", "public String getCsVin() {\n return csVin;\n }", "public String getvCodtmon() {\n return vCodtmon;\n }", "public String bkE() {\n return this.rE.bkA().getString(\"existing_instance_identifier\", \"\");\n }", "public String getInstanceIdentifier();", "@DISPID(80)\r\n\t// = 0x50. The runtime will prefer the VTID if present\r\n\t@VTID(78)\r\n\tint id();", "@DISPID(45)\r\n\t// = 0x2d. The runtime will prefer the VTID if present\r\n\t@VTID(43)\r\n\tint instancesExecuting();", "public ArrayList<String> getAllVarNames() {\n\t\tArrayList<String> names = new ArrayList<String>();\n\t\tfor (NameSSA n : name.values()){\n\t\t\tString root = n.name();\n\t\t\tfor (int i=0;i<=n.cpt;i++)\n\t\t\t\tnames.add(root+\"_\"+i);\n\t\t}\n\t\treturn names;\n\t}", "@Override\n public String toString()\n {\n return instanceName;\n }", "@Override\n public String toString()\n {\n return instanceName;\n }", "public java.lang.String getCivNo () {\n\t\treturn civNo;\n\t}", "@Override\r\n\tpublic String getPID() {\n\t\treturn \"GY\"+getID();\r\n\t}", "public String toString()\n\t{\n\t\treturn getClass().getName() +\n\t\t\t\"[hgap=\" + hgap + \",vgap=\" + vgap + \"]\";\n\t}", "public String toString() {\n\t\treturn \"(constant-value \" + constantValueIndex + \")\";\n\t}", "public String getvCodtupa() {\n return vCodtupa;\n }", "public String getIsontv() {\r\n return isontv;\r\n }", "public List<Integer> getNeighbourIds() {\n List<Integer> neighbours = new ArrayList<>();\n // get references from the neighbouring cells.\n for (VoronoiHalfEdge halfEdge : halfEdges) {\n VoronoiEdge edge = halfEdge.getEdge();\n if (edge.getLeftSite() != null && edge.getLeftSite().getIdentifier() != site.getIdentifier()) {\n neighbours.add(edge.getLeftSite().getIdentifier());\n } else if (edge.getRightSite() != null && edge.getRightSite().getIdentifier() != site.getIdentifier()) {\n neighbours.add(edge.getRightSite().getIdentifier());\n }\n }\n return neighbours;\n }", "public double[] ClassVect() {\n\t\treturn class_vect;\n\t}", "final public void ClassName() throws ParseException {\n jj_consume_token(IDENTIFIER);\n label_24:\n while (true) {\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case 88:\n case 98:\n ;\n break;\n default:\n jj_la1[104] = jj_gen;\n break label_24;\n }\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case 88:\n jj_consume_token(88);\n jj_consume_token(IDENTIFIER);\n break;\n case 98:\n jj_consume_token(98);\n jj_consume_token(IDENTIFIER);\n break;\n default:\n jj_la1[105] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n }\n }", "public com.vmail.external.ups.hh.ws.EVNTType[] getEVNT() {\r\n return EVNT;\r\n }", "public String toString() {\n\t\treturn getClass().getName() + \"[nLattine=\" + nLattine + \", nGettoni=\" + nGettoni +\"]\";\n\t}", "@DISPID(83)\r\n\t// = 0x53. The runtime will prefer the VTID if present\r\n\t@VTID(81)\r\n\tasci.activebatch.enumInstanceStateDetail instanceStateDetail();", "public java.util.List<String> getReservedInstancesIds() {\n if (reservedInstancesIds == null) {\n reservedInstancesIds = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();\n reservedInstancesIds.setAutoConstruct(true);\n }\n return reservedInstancesIds;\n }", "@Nonnull\n public List<C> getConstituents() {\n return constituents;\n }", "public String getId() {\n switch (this.getType()) {\n case BGP:\n /*return this.bgpConfig.getNeighbors().get(\n this.bgpConfig.getNeighbors().firstKey()).getLocalAs().toString();*/\n case OSPF:\n return this.vrf.getName();\n case STATIC:\n return this.staticConfig.getNetwork().getStartIp().toString();\n }\n return this.vrf.getName();\n }", "@DISPID(81)\r\n\t// = 0x51. The runtime will prefer the VTID if present\r\n\t@VTID(79)\r\n\tasci.activebatch.enumInstanceType instanceType();", "@DISPID(5)\n\t// = 0x5. The runtime will prefer the VTID if present\n\t@VTID(11)\n\tjava.lang.String name();", "public String getConteIdseq() {\n return (String) getAttributeInternal(CONTEIDSEQ);\n }", "@Override\n public String toString() {\n return getAcideAmine()+\", \"+ getCodon() +\", \"+ getNucleotide1()+ \", \"\n + getNucleotide2() +\", \"+ getNucleotide3();\n }", "@DISPID(38)\r\n\t// = 0x26. The runtime will prefer the VTID if present\r\n\t@VTID(43)\r\n\tint id();", "public int getIDINTERNODC() {\n return idinternodc;\n }", "public ArrayList< Edge > incidentEdges( ) {\n return incidentEdges;\n }", "@DISPID(9)\r\n\t// = 0x9. The runtime will prefer the VTID if present\r\n\t@VTID(15)\r\n\tjava.lang.String name();", "public String getVehID() {\r\n\t\treturn vehID;\r\n\t}", "public short getIdentTurretee() {\n\n return m_identTurretee;\n }", "public String getConstraintInstance() {\n\t\treturn getAttribute(\"ConstraintInstance\", \"\");\n\t}", "public TreeMap<String,VersionID> \n getVersionIDs()\n {\n TreeMap<String,VersionID> versions = new TreeMap<String,VersionID>();\n for(String name : pVersionFields.keySet()) {\n JCollectionField field = pVersionFields.get(name);\n versions.put(name, pVersionIDs.get(name).get(field.getSelectedIndex()));\n }\n return versions;\n }", "protected ArrayList<String> getVariableNames() {\n ArrayList<String> varNames = new ArrayList<String>();\n \n Element ncElement = getNetcdfElement();\n List<Element> vars = ncElement.getChildren(\"variable\", ncElement.getNamespace()); \n for (Element element : vars) {\n String name = getVariableName(element);\n varNames.add(name);\n }\n\n return varNames;\n }", "public java.lang.CharSequence getVar216() {\n return var216;\n }", "public String getCGClassID() {\n return cgClassID;\n }", "public String getCGG_CVCTG_CODIGO(){\n\t\treturn this.myCgg_cvctg_codigo;\n\t}", "public String getCVCTG_CODIGO(){\n\t\treturn this.myCvctg_codigo;\n\t}", "public java.util.List<Identifier> identifier() {\n return getList(Identifier.class, FhirPropertyNames.PROPERTY_IDENTIFIER);\n }", "public java.util.List<Identifier> identifier() {\n return getList(Identifier.class, FhirPropertyNames.PROPERTY_IDENTIFIER);\n }", "public SelectedPeptideIdentifications() {\n iPeptideIdentifications = new ArrayList();\n }", "private static Set<String> getCurrentStableIdentifiers(MySQLAdaptor dba) throws Exception {\n\t\tCollection<GKInstance> stableIdentifierInstances = dba.fetchInstancesByClass(ReactomeJavaConstants.StableIdentifier);\n\t\tSet<String> currentStableIdentifiersSet = new HashSet<>();\n\t\tfor (GKInstance stableIdentifierInst : stableIdentifierInstances) {\n\t\t\tcurrentStableIdentifiersSet.add(stableIdentifierInst.getAttributeValue(ReactomeJavaConstants.identifier).toString());\n\t\t}\n\t\treturn currentStableIdentifiersSet;\n\t}", "public String variableValues() {\n\t\tif (name.values().size()==0)\n\t\t\treturn \"Symbol table is empty\";\n\t\tString s = \"Variable values\\n\";\n\t\tfor (NameSSA n : name.values()) {\n\t\t\tVariable v = var.get(n.current());\n\t\t\tif (v.isConstant())\n\t\t\t\ts += n.current() + \":\" + v.constantNumber();\n\t\t\telse \n\t\t\t\ts += n.current() + \":\" + \" unknown\";\n\t\t\ts+=\" \";\n\t\t}\n\t\treturn s;\n\t}", "public int getIdCompI() {\n\t\treturn ID_COMP_I;\n\t}", "public int getVcCount() {\n return vc_.size();\n }", "public int getConstantCount() {\r\n return EnthalpyVapour.CONSTANT_COUNT;\r\n }", "public DBSequence getNotiId() {\r\n return (DBSequence)getAttributeInternal(NOTIID);\r\n }", "public String getvNumreg() {\n return vNumreg;\n }", "@Override\n public int hashCode() {\n return ASNID;\n }", "public java.lang.String getCvNumber() {\r\n return cvNumber;\r\n }", "@Override\r\n public final Integer getIdentifier() {\r\n return getIdent();\r\n }", "private ArrayList<Integer> generateVoltageLabelKeys() {\r\n\t\t// duct tape workaround. I don't really want to hard-code the values in,\r\n\t\t//(what happens if Jason changes the name of a key in the TelemDataPacket?), \r\n\t\t//but it works for now. If we anticipate changes, we can update this\r\n\t\t//to generate it dynamically. \r\n\t\tArrayList<Integer> keys = new ArrayList();\r\n\t\tkeys.add(0);\r\n\t\tkeys.add(1);\r\n\t\tkeys.add(2);\r\n\t\tkeys.add(3);\r\n\t\treturn keys;\r\n\t}", "@Override\r\n\tpublic String getPID() {\n\t\treturn \"NYXQYZ\"+getID();\r\n\t}", "public BigDecimal getXNPV() {\r\n return XNPV;\r\n }", "public String[] getNomEquips(){\n\t\tString[] noms= new String[n_equips];\n\t\tNode aux = primer; \n\t\tint i=0;\n\t\twhile((aux!=null)&&(i<n_equips)) {\n\t\t\tnoms[i] = aux.info.getNom();\n\t\t\taux=aux.Nodeseguent;\n\t\t\ti++;\n\t\t}\n\t\treturn noms;\n\t}", "public java.lang.CharSequence getVar215() {\n return var215;\n }", "public String getCurSpiceInstID() {\n return mVMStrID;\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn \"Classification [imageUUID=\" + imageUUID + \", speciesName=\" + speciesName + \"]\";\r\n\t}" ]
[ "0.63661623", "0.6271304", "0.6098995", "0.5841622", "0.56411016", "0.55400765", "0.54080707", "0.5403264", "0.5373823", "0.52977556", "0.5259554", "0.525756", "0.52106476", "0.5207239", "0.5205963", "0.5063831", "0.50532746", "0.5034664", "0.5008436", "0.49713767", "0.49643514", "0.4945496", "0.4927323", "0.49076694", "0.48868802", "0.4883777", "0.48737565", "0.4865588", "0.48644146", "0.486102", "0.4859542", "0.48582155", "0.48297122", "0.48283583", "0.48218316", "0.48173326", "0.48040596", "0.4802719", "0.47941455", "0.4793508", "0.47785833", "0.47734818", "0.4763077", "0.47550794", "0.47400635", "0.47347397", "0.47322133", "0.47322133", "0.47275057", "0.47157428", "0.4711467", "0.46997967", "0.46753713", "0.46721256", "0.4670359", "0.46661958", "0.46652243", "0.466448", "0.4662528", "0.46612594", "0.46561944", "0.46558872", "0.4653617", "0.46528715", "0.46492508", "0.46491584", "0.46484384", "0.4644979", "0.4640183", "0.4634314", "0.46323875", "0.462947", "0.46292692", "0.46287003", "0.46236297", "0.46232572", "0.46193007", "0.46162495", "0.46158478", "0.46100023", "0.45957592", "0.45957592", "0.45923862", "0.45891017", "0.4571456", "0.45658442", "0.45655656", "0.45612538", "0.45609763", "0.45582572", "0.45503688", "0.4546715", "0.4544109", "0.4543736", "0.45431957", "0.4542154", "0.4541532", "0.454013", "0.45371595", "0.4536046" ]
0.71739674
0
Identifier(s) of the constituent PNF instance(s) of this VNFFG instance.
@Schema(description = "Identifier(s) of the constituent PNF instance(s) of this VNFFG instance. ") public List<String> getPnfdInfoId() { return pnfdInfoId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Schema(required = true, description = \"Identifier(s) of the constituent VNF instance(s) of this VNFFG instance. \")\n public List<String> getVnfInstanceId() {\n return vnfInstanceId;\n }", "@Schema(description = \"Identifier(s) of the constituent VL instance(s) of this VNFFG instance. \")\n public List<String> getNsVirtualLinkInfoId() {\n return nsVirtualLinkInfoId;\n }", "@Schema(description = \"An identifier that is unique for the respective type within a VNF instance, but may not be globally unique. \")\n public String getCpInstanceId() {\n return cpInstanceId;\n }", "@Schema(required = true, description = \"An identifier that is unique within a NS descriptor. Representation: string of variable length. \")\n public String getVnffgdId() {\n return vnffgdId;\n }", "@Schema(required = true, description = \"An identifier with the intention of being globally unique. \")\n public String getVnfInstanceId() {\n return vnfInstanceId;\n }", "public ConstellationIdentifier identifier();", "@Schema(description = \"Identifiers of the CP instances attached to the constituent VNFs and PNFs or the SAP instances of the VNFFG. See note. \")\n public List<NsInstancesNsInstanceNsCpHandle> getNsCpHandle() {\n return nsCpHandle;\n }", "public SortedSet<WVnfInstance> getAllVnfInstances ()\n\t{\n\t\treturn n.getResources().stream().filter(r->!r.getType().contains(WNetConstants.LISTSEPARATORANDINVALIDNAMECHARACTER)).map(r->new WVnfInstance(r)).collect(Collectors.toCollection(TreeSet::new));\n\t}", "public void generateCpnIDs() {\n\t\t// for all places, generate a cpnID\n\t\tIterator places = this.getPlaces().iterator();\n\t\twhile (places.hasNext()) {\n\t\t\tColoredPlace place = (ColoredPlace) places.next();\n\t\t\tplace.setCpnID(ManagerID.getNewID());\n\t\t}\n\t\t// for all transitions, generate a cpnID\n\t\tIterator transitions = this.getTransitions().iterator();\n\t\twhile (transitions.hasNext()) {\n\t\t\tColoredTransition transition = (ColoredTransition) transitions.next();\n\t\t\ttransition.setCpnID(ManagerID.getNewID());\n\t\t}\n\t}", "public long getId() {\n\t\treturn graphicFrame.getNvGraphicFramePr().getCNvPr().getId();\n\t}", "@Override\r\n\tpublic String getPID() {\n\t\treturn \"GY\"+getID();\r\n\t}", "public java.lang.String getCsp_Nif() {\n return csp_Nif;\n }", "@Override\r\n\tpublic String getPID() {\n\t\treturn \"NYXQYZ\"+getID();\r\n\t}", "public String getCpnID() {\n\t\treturn this.CpnID;\n\t}", "public SelectedPeptideIdentifications() {\n iPeptideIdentifications = new ArrayList();\n }", "public String getS_c_n() {\n return s_c_n;\n }", "public void getPIDF() {\n p = SmartDashboard.getNumber(\"P \" + name, p);\n i = SmartDashboard.getNumber(\"I \" + name, i);\n d = SmartDashboard.getNumber(\"D \" + name, d);\n f = SmartDashboard.getNumber(\"F \" + name, f);\n setPIDF(p, i, d, f);\n }", "public String toString() {\n\t\treturn thisInstance.getInstanceClass().getName() + \" : \" + thisInstance.getInstanceInObject().getObjectId() ;\n\t}", "public String getInstprgid() {\r\n return instprgid;\r\n }", "public String getIDFV() {\n return this.IDFV;\n }", "@Override\n public String toString() {\n return getAcideAmine()+\", \"+ getCodon() +\", \"+ getNucleotide1()+ \", \"\n + getNucleotide2() +\", \"+ getNucleotide3();\n }", "public String bkE() {\n return this.rE.bkA().getString(\"existing_instance_identifier\", \"\");\n }", "public XCN getExecutingPhysicianID() { \r\n\t\tXCN retVal = this.getTypedField(29, 0);\r\n\t\treturn retVal;\r\n }", "@Override\n public Set<DataFact> visitInstanceof(CGNode n, SSAInstanceofInstruction instruction, DataFact fact) {\n\n return Collections.singleton(fact);\n }", "public abstract java.lang.String getIdpcTV();", "public Vector<String> getIdentifiers()\n\t{\n\t\tfinal Vector<String> rets = new Vector<String>();\n\t\trets.add(identifier);\n\t\treturn rets;\n\t}", "public int getConstituentIndex() {\n return this.constituentIndex;\n }", "@Override\n public String toString() {\n return \"V\"+this.VS_ID+\"\\tNodes: \"+getNodes()[0]+\" & \"+getNodes()[1]+\"\\t\"+\"DC\\t\"+getValue()+\" V\";\n }", "public abstract java.lang.String getIdpc();", "public DBSequence getNotiId() {\r\n return (DBSequence)getAttributeInternal(NOTIID);\r\n }", "public void printPIDF() {\n SmartDashboard.putNumber(\"P \" + name, p);\n SmartDashboard.putNumber(\"I \" + name, i);\n SmartDashboard.putNumber(\"D \" + name, d);\n SmartDashboard.putNumber(\"F \" + name, f);\n }", "public IString getVariableIdentifier() {\n\treturn VARIABLE_IDENTIFIER.get(getNd(), this.address);\n }", "@Override\n\tpublic String inspectPrimaryKey() {\n\t\treturn \"INDV_ELG: \" + \"bnft_pin_num=\" + bnft_pin_num + \",\" + \"bnft_case_num=\" + bnft_case_num + \",\" + \"cat_cd=\" + cat_cd + \",\" + \"scat_cd=\"\n\t\t\t\t+ scat_cd + \",\" + \"scat_seq_num=\" + scat_seq_num + \",\" + \"cur_elg_ind=\" + cur_elg_ind + \",\" + \"pymt_beg_dt=\" + pymt_beg_dt;\n\t}", "public Integer getAgcProIDType() {\n\t\treturn agcProIDType;\n\t}", "public int getIDINTERNODC() {\n return idinternodc;\n }", "public String toString() {\n\t\treturn getClass().getName() + \"[nLattine=\" + nLattine + \", nGettoni=\" + nGettoni +\"]\";\n\t}", "public String getInstanceIdentifier();", "public String getCVCTG_NOMBRE(){\n\t\treturn this.myCvctg_nombre;\n\t}", "private void createNVertices() {\n\t\tfor (int i = 0; i < this.numNVertices; i++) {\n\t\t\tvertices.add(new Vertex('n', this.countNID++));\n\t\t}\n\t}", "public String getCGClassID() {\n return cgClassID;\n }", "@Override\n public String toString()\n {\n return instanceName;\n }", "@Override\n public String toString()\n {\n return instanceName;\n }", "public String getPQcIdseq() {\n return (String) getAttributeInternal(PQCIDSEQ);\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn \"Classification [imageUUID=\" + imageUUID + \", speciesName=\" + speciesName + \"]\";\r\n\t}", "public BigDecimal getXNPV() {\r\n return XNPV;\r\n }", "public int numericName()\n {\n return Factory.getID(this);\n }", "@Override\n public String toString() {\n return \"DetectorNode[\" + factory.getReportedBugPatternCodes() + \"]\";\n }", "public int getNid() {\r\n\t\treturn nid;\r\n\t}", "public java.util.List<Identifier> identifier() {\n return getList(Identifier.class, FhirPropertyNames.PROPERTY_IDENTIFIER);\n }", "public java.util.List<Identifier> identifier() {\n return getList(Identifier.class, FhirPropertyNames.PROPERTY_IDENTIFIER);\n }", "@Override\n public String getName() {\n return \"NVD CVE Analyzer\";\n }", "public String getNIF() { return this.NIF; }", "public String toString() {\n/* 127 */ StringBuilder sb = new StringBuilder(this.dictionary.getNameAsString(COSName.SUBTYPE));\n/* 128 */ sb.append('{');\n/* 129 */ PDDeviceNProcess process = getProcess();\n/* 130 */ if (process != null) {\n/* */ \n/* 132 */ sb.append(getProcess());\n/* 133 */ sb.append(' ');\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ try {\n/* 139 */ Map<String, PDSeparation> colorants = getColorants();\n/* 140 */ sb.append(\"Colorants{\");\n/* 141 */ for (Map.Entry<String, PDSeparation> col : colorants.entrySet()) {\n/* */ \n/* 143 */ sb.append('\"');\n/* 144 */ sb.append(col.getKey());\n/* 145 */ sb.append(\"\\\": \");\n/* 146 */ sb.append(col.getValue());\n/* 147 */ sb.append(' ');\n/* */ } \n/* 149 */ sb.append('}');\n/* */ }\n/* 151 */ catch (IOException e) {\n/* */ \n/* 153 */ sb.append(\"ERROR\");\n/* */ } \n/* 155 */ sb.append('}');\n/* 156 */ return sb.toString();\n/* */ }", "public ArrayList<String> getAllVarNames() {\n\t\tArrayList<String> names = new ArrayList<String>();\n\t\tfor (NameSSA n : name.values()){\n\t\t\tString root = n.name();\n\t\t\tfor (int i=0;i<=n.cpt;i++)\n\t\t\t\tnames.add(root+\"_\"+i);\n\t\t}\n\t\treturn names;\n\t}", "@Override\n public int hashCode() {\n return ASNID;\n }", "@DISPID(45)\r\n\t// = 0x2d. The runtime will prefer the VTID if present\r\n\t@VTID(43)\r\n\tint instancesExecuting();", "public String getStringOfGene()\n {\n String print = \"\";\n for(int x = 0; x < numOfCoef; x++)\n {\n print = print +\"||\"+ vectOfCoef.get(x);\n }\n return print;\n }", "public String toString( ) {\n return \"v\" + id;\n }", "public String getSEQN() {\n return SEQN;\n }", "public XCN getPsl29_ExecutingPhysicianID() { \r\n\t\tXCN retVal = this.getTypedField(29, 0);\r\n\t\treturn retVal;\r\n }", "@Schema(required = true, description = \"An identifier that is unique for the respective type within a VNF instance, but may not be globally unique. \")\n public String getId() {\n return id;\n }", "public FactIdentifier getIdentifier() {\r\n return localIdentifier;\r\n }", "public short getIdentTurretee() {\n\n return m_identTurretee;\n }", "public int getIdenti() {\r\n return identi;\r\n }", "@Override\r\n public final Integer getIdentifier() {\r\n return getIdent();\r\n }", "public java.lang.String getCsp_Identificador() {\n return csp_Identificador;\n }", "@Override\n\tpublic String svctypeId() throws Exception{\n\t\treturn null;\n\t}", "public java.lang.CharSequence getVar215() {\n return var215;\n }", "public String getNpCod() {\n return (String)getAttributeInternal(NPCOD);\n }", "public SNPList get_snps () {\n return current_contig.snps;\r\n }", "public java.lang.CharSequence getVar216() {\n return var216;\n }", "public String toString() {\r\n\t\treturn \"P\";\r\n\t}", "public Integer getIdentType() {\n return identType;\n }", "public Map<String, List<ExprNodeDesc>> getNonFinalCandidates() {\n return nonFinalPreds;\n }", "public String[] getNomEquips(){\n\t\tString[] noms= new String[n_equips];\n\t\tNode aux = primer; \n\t\tint i=0;\n\t\twhile((aux!=null)&&(i<n_equips)) {\n\t\t\tnoms[i] = aux.info.getNom();\n\t\t\taux=aux.Nodeseguent;\n\t\t\ti++;\n\t\t}\n\t\treturn noms;\n\t}", "public String toString() {\n StringBuffer sb = new StringBuffer();\n sb.append(\"[\");\n sb.append(fiIdCv);\n sb.append(\"]:\");\n sb.append(fiIdHoso);\n sb.append(\"|\");\n sb.append(fiMaHoso);\n sb.append(\"|\");\n sb.append(fiCoQuanCap);\n sb.append(\"|\");\n sb.append(fiSoCongVan);\n sb.append(\"|\");\n sb.append(fiNgayKy);\n sb.append(\"|\");\n sb.append(fiNguoiKy);\n sb.append(\"|\");\n sb.append(fiNgayHetHl);\n sb.append(\"|\");\n sb.append(fiLoaiDon);\n sb.append(\"|\");\n sb.append(fiHoatdong);\n sb.append(\"|\");\n sb.append(fiNguoitao);\n sb.append(\"|\");\n sb.append(fiNgaytao);\n sb.append(\"|\");\n sb.append(fiNgCapnhat);\n return sb.toString();\n }", "public String toString()\n\t{\n\t\treturn getClass().getName() +\n\t\t\t\"[hgap=\" + hgap + \",vgap=\" + vgap + \"]\";\n\t}", "public static LinkedList<String> collectBeliefIdsInDFormula(dFormula f) {\n\t\tLinkedList<String> eos = new LinkedList<String>();\n\t\tif (f instanceof ComplexFormula) {\n\t\t\tComplexFormula cplxF = (ComplexFormula)f;\n\t\t\tfor (dFormula df : cplxF.forms) {\n\t\t\t\teos.addAll(collectBeliefIdsInDFormula(df));\n\t\t\t}\n\t\t}\n\t\telse if (f instanceof ModalFormula) {\n\t\t\tModalFormula mF = (ModalFormula)f;\n\t\t\tif (mF.op.equals(IntentionManagement.beliefLinkModality)) {\n\t\t\t\tif (mF.form instanceof ElementaryFormula) {\n\t\t\t\t\tElementaryFormula eF = (ElementaryFormula)mF.form;\n\t\t\t\t\teos.add(eF.prop);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn eos;\n\t}", "public String getNatAquiferCd() {\n\t\treturn natAquiferCd;\n\t}", "public String getConteIdseq() {\n return (String) getAttributeInternal(CONTEIDSEQ);\n }", "public int getNatom() {\n return natom;\n }", "public int getCCN(){\n\t\treturn ccn;\n\t}", "public String getInsPgid() {\n return insPgid;\n }", "@Override\n\t\t\tpublic PIDSourceType getPIDSourceType() {\n\t\t\t\treturn PIDSourceType.kDisplacement;\n\t\t\t}", "public String getIdentNo() {\n return identNo;\n }", "@Override\n public String toString() { \n return super.getName() + getP1().toString() + \", \" + getP2().toString() \n + \", \" + getP3().toString();\n }", "public int[] getVIDPID() {\r\n if(deviceDescriptor==null) {\r\n log.warning(\"USBAEMonitor: getVIDPID called but device has not been opened\");\r\n return new int[2];\r\n }\r\n int[] n=new int[2];\r\n n[0]=deviceDescriptor.idVendor;\r\n n[1]=deviceDescriptor.idProduct;\r\n return n;\r\n }", "public synchronized EntityList<Npc> getNpcs() {\n\t\treturn npcs;\n\t}", "@DISPID(81)\r\n\t// = 0x51. The runtime will prefer the VTID if present\r\n\t@VTID(79)\r\n\tasci.activebatch.enumInstanceType instanceType();", "public java.lang.CharSequence getVar215() {\n return var215;\n }", "@DISPID(6)\n\t// = 0x6. The runtime will prefer the VTID if present\n\t@VTID(13)\n\tint id();", "public synchronized final Vector getClassificationParams() {\n return getParams(CLASSIFICATION);\n }", "public MultiplicityInterval getOccurrences() {\n return occurrences;\n }", "public TF_IDF() {\r\n\t\tsuper();\r\n\t}", "@Override\n public String toString() {\n switch (this) {\n case CODE128_A:\n return \"code128A\";\n case CODE25INTER:\n return \"2/5 interleave\";\n default:\n return name();\n }\n }", "public java.lang.CharSequence getVar216() {\n return var216;\n }", "public String getInstanceNumber()\n {\n return m_instanceNumber;\n }", "public String getId() {\n switch (this.getType()) {\n case BGP:\n /*return this.bgpConfig.getNeighbors().get(\n this.bgpConfig.getNeighbors().firstKey()).getLocalAs().toString();*/\n case OSPF:\n return this.vrf.getName();\n case STATIC:\n return this.staticConfig.getNetwork().getStartIp().toString();\n }\n return this.vrf.getName();\n }", "identifierList getIdentifierList();", "final public void ClassName() throws ParseException {\n jj_consume_token(IDENTIFIER);\n label_24:\n while (true) {\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case 88:\n case 98:\n ;\n break;\n default:\n jj_la1[104] = jj_gen;\n break label_24;\n }\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case 88:\n jj_consume_token(88);\n jj_consume_token(IDENTIFIER);\n break;\n case 98:\n jj_consume_token(98);\n jj_consume_token(IDENTIFIER);\n break;\n default:\n jj_la1[105] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n }\n }" ]
[ "0.67614174", "0.5833585", "0.58052385", "0.57740134", "0.5543364", "0.55268574", "0.54965353", "0.5429565", "0.54084814", "0.5398682", "0.5275272", "0.5264518", "0.52422494", "0.51167464", "0.5093059", "0.5039149", "0.5011074", "0.49963003", "0.49912584", "0.49877036", "0.4976851", "0.49573338", "0.49541062", "0.4953005", "0.4940582", "0.49352232", "0.4920192", "0.4902112", "0.48832363", "0.4879293", "0.4878792", "0.48714983", "0.4862526", "0.4858847", "0.48555562", "0.48542604", "0.4848415", "0.483682", "0.4836042", "0.48302788", "0.4828839", "0.4828839", "0.4824027", "0.48229206", "0.4819004", "0.48141918", "0.48129344", "0.4806906", "0.47984934", "0.47984934", "0.4794982", "0.47932884", "0.47798327", "0.47563997", "0.47555926", "0.4751695", "0.47516575", "0.4750697", "0.47386742", "0.47340533", "0.47337785", "0.4733231", "0.47331265", "0.47285926", "0.47273335", "0.4723166", "0.4722719", "0.47153124", "0.47088742", "0.470334", "0.47007155", "0.46998948", "0.46891007", "0.4688672", "0.46884906", "0.46754542", "0.46746325", "0.46675158", "0.46672925", "0.4664916", "0.46630114", "0.46601647", "0.46598879", "0.46592927", "0.4658872", "0.4655009", "0.46509987", "0.46469745", "0.46421948", "0.4639728", "0.46393976", "0.46339026", "0.46322304", "0.46322072", "0.46319458", "0.46314657", "0.4628696", "0.46251875", "0.4617319", "0.4613138" ]
0.70426804
0
Identifier(s) of the constituent VL instance(s) of this VNFFG instance.
@Schema(description = "Identifier(s) of the constituent VL instance(s) of this VNFFG instance. ") public List<String> getNsVirtualLinkInfoId() { return nsVirtualLinkInfoId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Schema(required = true, description = \"Identifier(s) of the constituent VNF instance(s) of this VNFFG instance. \")\n public List<String> getVnfInstanceId() {\n return vnfInstanceId;\n }", "@Schema(description = \"Identifier(s) of the constituent PNF instance(s) of this VNFFG instance. \")\n public List<String> getPnfdInfoId() {\n return pnfdInfoId;\n }", "@Schema(required = true, description = \"An identifier that is unique within a NS descriptor. Representation: string of variable length. \")\n public String getVnffgdId() {\n return vnffgdId;\n }", "@Schema(required = true, description = \"An identifier with the intention of being globally unique. \")\n public String getVnfInstanceId() {\n return vnfInstanceId;\n }", "public int getvID() {\n return vID;\n }", "@Override\n public String toString() {\n return \"V\"+this.VS_ID+\"\\tNodes: \"+getNodes()[0]+\" & \"+getNodes()[1]+\"\\t\"+\"DC\\t\"+getValue()+\" V\";\n }", "public SortedSet<WVnfInstance> getAllVnfInstances ()\n\t{\n\t\treturn n.getResources().stream().filter(r->!r.getType().contains(WNetConstants.LISTSEPARATORANDINVALIDNAMECHARACTER)).map(r->new WVnfInstance(r)).collect(Collectors.toCollection(TreeSet::new));\n\t}", "public String toString( ) {\n return \"v\" + id;\n }", "@Override\n public String getName() {\n return \"NVD CVE Analyzer\";\n }", "public long getId() {\n\t\treturn graphicFrame.getNvGraphicFramePr().getCNvPr().getId();\n\t}", "public String getCvv() {\n return cvv;\n }", "@Schema(description = \"An identifier that is unique for the respective type within a VNF instance, but may not be globally unique. \")\n public String getCpInstanceId() {\n return cpInstanceId;\n }", "public String getViveId()\n\t{\n\t\treturn viveId;\n\t}", "@DISPID(14)\n\t// = 0xe. The runtime will prefer the VTID if present\n\t@VTID(23)\n\tjava.lang.String name();", "public abstract java.lang.String getIdpcTV();", "@DISPID(81)\r\n\t// = 0x51. The runtime will prefer the VTID if present\r\n\t@VTID(79)\r\n\tasci.activebatch.enumInstanceType instanceType();", "private ArrayList<Integer> generateVoltageLabelKeys() {\r\n\t\t// duct tape workaround. I don't really want to hard-code the values in,\r\n\t\t//(what happens if Jason changes the name of a key in the TelemDataPacket?), \r\n\t\t//but it works for now. If we anticipate changes, we can update this\r\n\t\t//to generate it dynamically. \r\n\t\tArrayList<Integer> keys = new ArrayList();\r\n\t\tkeys.add(0);\r\n\t\tkeys.add(1);\r\n\t\tkeys.add(2);\r\n\t\tkeys.add(3);\r\n\t\treturn keys;\r\n\t}", "protected List<String> getVclassIds(VitroRequest vreq) {\n\t\tString[] vclassIds = vreq.getParameterValues(\"vclassId\");\n\t\tif ((vclassIds == null) || (vclassIds.length == 0)) {\n\t\t\tlog.error(\"parameter vclassId expected but not found\");\n\t\t\tthrow new IllegalStateException(\"parameter vclassId expected \");\n\t\t}\n\n\t\tfor (String vclassId : vclassIds) {\n\t\t\tinstantiateVclass(vclassId, vreq);\n\t\t}\n\n\t\treturn Arrays.asList(vclassIds);\n\t}", "public String getIDFV() {\n return this.IDFV;\n }", "private void createNVertices() {\n\t\tfor (int i = 0; i < this.numNVertices; i++) {\n\t\t\tvertices.add(new Vertex('n', this.countNID++));\n\t\t}\n\t}", "public ConstellationIdentifier identifier();", "public String generateVSVID();", "@DISPID(38)\r\n\t// = 0x26. The runtime will prefer the VTID if present\r\n\t@VTID(43)\r\n\tint id();", "@DISPID(83)\r\n\t// = 0x53. The runtime will prefer the VTID if present\r\n\t@VTID(81)\r\n\tasci.activebatch.enumInstanceStateDetail instanceStateDetail();", "public Vector getFieldLabels() {\n\treturn _vcFieldLabels;\n }", "public Vector<String> getIdentifiers()\n\t{\n\t\tfinal Vector<String> rets = new Vector<String>();\n\t\trets.add(identifier);\n\t\treturn rets;\n\t}", "@DISPID(5)\n\t// = 0x5. The runtime will prefer the VTID if present\n\t@VTID(11)\n\tjava.lang.String name();", "public Enumeration incidentEdges(Position vp) throws InvalidPositionException;", "@DISPID(82)\r\n\t// = 0x52. The runtime will prefer the VTID if present\r\n\t@VTID(80)\r\n\tasci.activebatch.enumInstanceState instanceState();", "@DISPID(9)\r\n\t// = 0x9. The runtime will prefer the VTID if present\r\n\t@VTID(15)\r\n\tjava.lang.String name();", "@DISPID(6)\n\t// = 0x6. The runtime will prefer the VTID if present\n\t@VTID(13)\n\tint id();", "@Override\n public String toString(){\n return \"G(\"+this.getVidas()+\")\";\n }", "public String getCtvTag() {\n\t\treturn ctvTag;\n\t}", "@DISPID(80)\r\n\t// = 0x50. The runtime will prefer the VTID if present\r\n\t@VTID(78)\r\n\tint id();", "@DISPID(10) //= 0xa. The runtime will prefer the VTID if present\r\n @VTID(17)\r\n java.lang.String[] getNames();", "public long getVisaCaseNumber() {\n return visaCaseNumber;\n }", "public String getId() {\n switch (this.getType()) {\n case BGP:\n /*return this.bgpConfig.getNeighbors().get(\n this.bgpConfig.getNeighbors().firstKey()).getLocalAs().toString();*/\n case OSPF:\n return this.vrf.getName();\n case STATIC:\n return this.staticConfig.getNetwork().getStartIp().toString();\n }\n return this.vrf.getName();\n }", "public int getConstituentIndex() {\n return this.constituentIndex;\n }", "public Vivid() {\n super(\n new Color(229, 134, 6),\n new Color(93, 105, 177),\n new Color(82, 188, 163),\n new Color(153, 201, 69),\n new Color(204, 97, 176),\n new Color(36, 121, 108),\n new Color(218, 165, 27),\n new Color(47, 138, 196),\n new Color(118, 78, 159),\n new Color(237, 100, 90),\n new Color(204, 58, 142),\n new Color(165, 170, 153)\n\n );\n\n }", "public ArrayList<String> getAllVarNames() {\n\t\tArrayList<String> names = new ArrayList<String>();\n\t\tfor (NameSSA n : name.values()){\n\t\t\tString root = n.name();\n\t\t\tfor (int i=0;i<=n.cpt;i++)\n\t\t\t\tnames.add(root+\"_\"+i);\n\t\t}\n\t\treturn names;\n\t}", "public int getVcCount() {\n return vc_.size();\n }", "public int getVaoID() {\n\t\treturn vaoID;\n\t}", "@DISPID(32)\r\n\t// = 0x20. The runtime will prefer the VTID if present\r\n\t@VTID(37)\r\n\tjava.lang.String label();", "public String getCsVin() {\n return csVin;\n }", "public int numVertices() { return numV; }", "public Enumeration inIncidentEdges(Position vp) throws InvalidPositionException;", "public int getVitesse(){\n\t \treturn vitesse;\n\t }", "int getVida()\n\t{\n\t\treturn vida;\n\t}", "public int getConstantCount() {\r\n return EnthalpyVapour.CONSTANT_COUNT;\r\n }", "@Schema(required = true, description = \"An identifier that is unique for the respective type within a VNF instance, but may not be globally unique. \")\n public String getId() {\n return id;\n }", "public String getVerticesCount() {\n long res = 0;\n Iterator<Vertex> itty = g.vertices();\n Vertex v;\n while (itty.hasNext()) {\n v = itty.next();\n res++;\n }\n return Long.toString(res);\n }", "public String getVehID() {\r\n\t\treturn vehID;\r\n\t}", "public Enumeration vertices();", "public static int getNSectors()\n {\n return Disk.NUM_OF_SECTORS - ADisk.REDO_LOG_SECTORS - 1;\n }", "public ArrayList< Edge > incidentEdges( ) {\n return incidentEdges;\n }", "@DISPID(45)\r\n\t// = 0x2d. The runtime will prefer the VTID if present\r\n\t@VTID(43)\r\n\tint instancesExecuting();", "public java.lang.Integer getVaccinId () {\n\t\treturn vaccinId;\n\t}", "public String getIdVille() {\r\n\t\treturn idVille;\r\n\t}", "public IString getVariableIdentifier() {\n\treturn VARIABLE_IDENTIFIER.get(getNd(), this.address);\n }", "public java.util.List<? extends VDUOrBuilder> getVdusOrBuilderList() {\n return vdus_;\n }", "@Override\n\tpublic String inspectPrimaryKey() {\n\t\treturn \"INDV_ELG: \" + \"bnft_pin_num=\" + bnft_pin_num + \",\" + \"bnft_case_num=\" + bnft_case_num + \",\" + \"cat_cd=\" + cat_cd + \",\" + \"scat_cd=\"\n\t\t\t\t+ scat_cd + \",\" + \"scat_seq_num=\" + scat_seq_num + \",\" + \"cur_elg_ind=\" + cur_elg_ind + \",\" + \"pymt_beg_dt=\" + pymt_beg_dt;\n\t}", "public java.lang.String getCur_elg_ind() {\n\t\treturn cur_elg_ind;\n\t}", "@Override\n\tpublic String name() {\n\t\treturn \"Veg \" + super.name();\n\t}", "public java.lang.String getVTWEG() {\n return VTWEG;\n }", "public String getvNumreg() {\n return vNumreg;\n }", "public int getIdDetalle_Ventaf() {\n return idDetalle_Ventaf;\n }", "public String getModuleVLHId() throws BaseTechnicalError, RemoteException {\n \treturn JazzQAConstants.MODULE_PEDVALIDACAO_VLH;\n\t}", "public TreeMap<String,VersionID> \n getVersionIDs()\n {\n TreeMap<String,VersionID> versions = new TreeMap<String,VersionID>();\n for(String name : pVersionFields.keySet()) {\n JCollectionField field = pVersionFields.get(name);\n versions.put(name, pVersionIDs.get(name).get(field.getSelectedIndex()));\n }\n return versions;\n }", "public ArrayList<String> getCurrentVarNames() {\n\t\tArrayList<String> names = new ArrayList<String>();\n\t\tfor (NameSSA n : name.values())\n\t\t\tnames.add(n.current());\n\t\treturn names;\n\t}", "@DISPID(74)\r\n\t// = 0x4a. The runtime will prefer the VTID if present\r\n\t@VTID(72)\r\n\tjava.lang.String label();", "public String getCurSpiceInstID() {\n return mVMStrID;\n }", "public int[] getSV(){\r\n\t\treturn SV;\r\n\t}", "public String toString()\n\t{\n\t\treturn getClass().getName() +\n\t\t\t\"[hgap=\" + hgap + \",vgap=\" + vgap + \"]\";\n\t}", "public String vertexName();", "@Override\n\tpublic String getInformeVendedor() {\n\t\treturn \"Informe trimestre 3\";\n\t}", "public int getVdusCount() {\n return vdus_.size();\n }", "public String getDPHgVorname(){\n\t\treturn this.m_sDPHgVorname;\n\t}", "public String toString() {\n\t\treturn thisInstance.getInstanceClass().getName() + \" : \" + thisInstance.getInstanceInObject().getObjectId() ;\n\t}", "@JsonIgnore\n public String getWVId() {\n if (wvm == null || wvm == WVM.Microversion) {\n return null;\n }\n switch (wvm) {\n case Workspace:\n return workspaceId;\n default:\n return versionId;\n }\n }", "@DISPID(73)\r\n\t// = 0x49. The runtime will prefer the VTID if present\r\n\t@VTID(71)\r\n\tjava.lang.String name();", "public List<Integer> getNeighbourIds() {\n List<Integer> neighbours = new ArrayList<>();\n // get references from the neighbouring cells.\n for (VoronoiHalfEdge halfEdge : halfEdges) {\n VoronoiEdge edge = halfEdge.getEdge();\n if (edge.getLeftSite() != null && edge.getLeftSite().getIdentifier() != site.getIdentifier()) {\n neighbours.add(edge.getLeftSite().getIdentifier());\n } else if (edge.getRightSite() != null && edge.getRightSite().getIdentifier() != site.getIdentifier()) {\n neighbours.add(edge.getRightSite().getIdentifier());\n }\n }\n return neighbours;\n }", "public String getCVCTG_NOMBRE(){\n\t\treturn this.myCvctg_nombre;\n\t}", "Iterable<Long> vertices() {\n return nodes.keySet();\n }", "@Override\n public String toString() {\n switch (this) {\n case CODE128_A:\n return \"code128A\";\n case CODE25INTER:\n return \"2/5 interleave\";\n default:\n return name();\n }\n }", "private Set<String> getVertexContextRelevantLabels(VertexControllerContext context) {\n return Stream.ofAll(context.getBulkVertices())\n .take(1)\n .map(Element::label)\n .toJavaSet();\n }", "public String getViptype() {\n return viptype;\n }", "public int[] getVIDPID() {\r\n if(deviceDescriptor==null) {\r\n log.warning(\"USBAEMonitor: getVIDPID called but device has not been opened\");\r\n return new int[2];\r\n }\r\n int[] n=new int[2];\r\n n[0]=deviceDescriptor.idVendor;\r\n n[1]=deviceDescriptor.idProduct;\r\n return n;\r\n }", "public String getVatId()\n {\n return vatId;\n }", "public String toString() {\r\n\t\treturn \"VILLAGER:\" + name + \";GENDER:\" + gender + \";AGE:\" + age;\r\n\t}", "public Vector2d getVve() {\n return vve;\n }", "public int getIDINTERNODC() {\n return idinternodc;\n }", "public java.util.List<String> getReservedInstancesIds() {\n if (reservedInstancesIds == null) {\n reservedInstancesIds = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();\n reservedInstancesIds.setAutoConstruct(true);\n }\n return reservedInstancesIds;\n }", "public void setvID(int vID) {\n this.vID = vID;\n }", "public short getVcode() {\n return vcode;\n }", "public int ger_nrLuggageCovBelt(){\r\n return this.nrLuggageConvBelt;\r\n }", "public String toString()\n {\n return vis.name().toLowerCase() + \" \" + type + \" \" + name;\n }", "public Integer getVid() {\n return vid;\n }", "public String getInstanceIdentifier();", "public Collection<node_info> getV()\n{\n\treturn this.getNodes().values();\n}", "public LlvmValue visit(IdentifierType n){\n\t\tSystem.out.format(\"identifiertype*******\\n\");\n\t\t\n\t\t//%class.name\n\t\tStringBuilder name = new StringBuilder();\n\t\t\n\t\tname.append(n.name);\n\t\t\n\t\t//System.out.format(\"name: %s\\n\",name.toString());\n\t\t\n\t\t//Cria classType -> %class.name\n\t\tLlvmClassInfo classType = new LlvmClassInfo(name.toString());\t\n\n\t\treturn classType;\n\t}" ]
[ "0.68773407", "0.59596676", "0.56880826", "0.56680304", "0.5604851", "0.54695207", "0.54596514", "0.5304924", "0.52765316", "0.5273418", "0.5269981", "0.52505875", "0.5135577", "0.5115582", "0.51056236", "0.50934225", "0.50738823", "0.50608313", "0.50547165", "0.50517994", "0.5046447", "0.5007619", "0.5007207", "0.49989522", "0.49986088", "0.49881482", "0.49792367", "0.4966018", "0.49493825", "0.4949329", "0.49474308", "0.49467888", "0.49307537", "0.49204144", "0.4908824", "0.49023336", "0.48875153", "0.48820952", "0.48783636", "0.48674172", "0.48621935", "0.4853128", "0.48439172", "0.48207384", "0.4819259", "0.48149362", "0.48094305", "0.4791551", "0.47853345", "0.4782913", "0.4779074", "0.4766544", "0.47610387", "0.47548622", "0.4754595", "0.47526252", "0.47459802", "0.47458807", "0.4745614", "0.4738028", "0.47378707", "0.47375417", "0.4732939", "0.47228283", "0.4719618", "0.4712332", "0.47085312", "0.47083294", "0.4693392", "0.46902177", "0.46869028", "0.4683555", "0.46788928", "0.4667012", "0.46669865", "0.4665999", "0.46621633", "0.46608514", "0.46581626", "0.4655152", "0.4654641", "0.4651765", "0.46508133", "0.46389437", "0.4610602", "0.4607403", "0.46043253", "0.4594458", "0.45933905", "0.45918313", "0.45892993", "0.45881635", "0.4581272", "0.45780405", "0.45769238", "0.45746014", "0.4568832", "0.45657158", "0.4558957", "0.45556375" ]
0.6885089
0
Identifiers of the CP instances attached to the constituent VNFs and PNFs or the SAP instances of the VNFFG. See note.
@Schema(description = "Identifiers of the CP instances attached to the constituent VNFs and PNFs or the SAP instances of the VNFFG. See note. ") public List<NsInstancesNsInstanceNsCpHandle> getNsCpHandle() { return nsCpHandle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Schema(required = true, description = \"Identifier(s) of the constituent VNF instance(s) of this VNFFG instance. \")\n public List<String> getVnfInstanceId() {\n return vnfInstanceId;\n }", "@Schema(description = \"Identifier(s) of the constituent PNF instance(s) of this VNFFG instance. \")\n public List<String> getPnfdInfoId() {\n return pnfdInfoId;\n }", "public SortedSet<WVnfInstance> getAllVnfInstances ()\n\t{\n\t\treturn n.getResources().stream().filter(r->!r.getType().contains(WNetConstants.LISTSEPARATORANDINVALIDNAMECHARACTER)).map(r->new WVnfInstance(r)).collect(Collectors.toCollection(TreeSet::new));\n\t}", "@Schema(description = \"An identifier that is unique for the respective type within a VNF instance, but may not be globally unique. \")\n public String getCpInstanceId() {\n return cpInstanceId;\n }", "@Schema(description = \"Identifier(s) of the constituent VL instance(s) of this VNFFG instance. \")\n public List<String> getNsVirtualLinkInfoId() {\n return nsVirtualLinkInfoId;\n }", "public static ArrayList<InstanceEntity> getInstances() {\n ILifeCycleServiceRest resourceserviceproxy =\n ConsumerFactory.createConsumer(MsbUtil.getNsocLifecycleBaseUrl(),\n ILifeCycleServiceRest.class);\n String result = \"\";\n try {\n result = resourceserviceproxy.getVnfInstances();\n } catch (Exception e1) {\n LOG.error(\"query vim info faild.\", e1);\n return null;\n }\n if (ToolUtil.isEmptyString(result)) {\n return null;\n }\n\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<InstanceEntity>>() {}.getType();\n return gson.fromJson(result, listType);\n }", "public int getVcCount() {\n return vc_.size();\n }", "@DISPID(45)\r\n\t// = 0x2d. The runtime will prefer the VTID if present\r\n\t@VTID(43)\r\n\tint instancesExecuting();", "public int[] getVIDPID() {\r\n if(deviceDescriptor==null) {\r\n log.warning(\"USBAEMonitor: getVIDPID called but device has not been opened\");\r\n return new int[2];\r\n }\r\n int[] n=new int[2];\r\n n[0]=deviceDescriptor.idVendor;\r\n n[1]=deviceDescriptor.idProduct;\r\n return n;\r\n }", "public void generateCpnIDs() {\n\t\t// for all places, generate a cpnID\n\t\tIterator places = this.getPlaces().iterator();\n\t\twhile (places.hasNext()) {\n\t\t\tColoredPlace place = (ColoredPlace) places.next();\n\t\t\tplace.setCpnID(ManagerID.getNewID());\n\t\t}\n\t\t// for all transitions, generate a cpnID\n\t\tIterator transitions = this.getTransitions().iterator();\n\t\twhile (transitions.hasNext()) {\n\t\t\tColoredTransition transition = (ColoredTransition) transitions.next();\n\t\t\ttransition.setCpnID(ManagerID.getNewID());\n\t\t}\n\t}", "public final List<CharacterInstance> getInstances() {\n return instances;\n }", "public String getCvv() {\n return cvv;\n }", "private Collection getInstances() {\n \t\tCollection instances=null;\r\n\r\n //instances = cls.getInstances();\r\n \t\tRDFProperty ready = owlModel.getRDFProperty(oTab.namespacePrefix + \":\" + oTab.pReady);\r\n\r\n \t\tif ( ready != null )\r\n \t\t{\r\n \t\t\tinstances = owlModel.getRDFResourcesWithPropertyValue(ready, true);\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tSystem.out.println(\"*** Could not lookup property defintion for \" + oTab.namespacePrefix + \":\" + oTab.pReady + \" Ontology not imported\");\r\n \t\t}\r\n\r\n return instances;\r\n }", "public InstanceDescription[] getContainedInstances() {\n return m_containedInstances;\n }", "Collection<Instance> getInstances();", "public static void findSelectedInstances() {\n int selected = 0;\n for (int i = 0; i < allInstances.length; i++) {\n if (allInstances[i][2].equals(\"selected\")) selected++;\n }\n\n // create an array of just the selected instances\n selectedInstances = new String[selected][3];\n int j = 0;\n onlyLocalInstanceSelected = true;\n for (int i = 0; i < allInstances.length; i++) {\n if (allInstances[i][2].equals(\"selected\")) {\n selectedInstances[j][0] = allInstances[i][0];\n selectedInstances[j][1] = allInstances[i][1];\n selectedInstances[j][2] = allInstances[i][2];\n j++;\n if (!allInstances[i][1].toLowerCase().equals(getInstanceName().toLowerCase())) onlyLocalInstanceSelected = false;\n }\n }\n }", "public List<ProcessInstance> getProcessInstances() {\r\n return this.processInstances;\r\n }", "public static void main(String[] args) {\n int objectCount;\n //Now let create 4 instances of the countable class\n\n Countable obj1 = new Countable();\n Countable obj2 = new Countable();\n Countable obj3 = new Countable();\n Countable obj4 = new Countable();\n\n //Get the number of instances from\n //the class's static field\n\n objectCount = obj1.getInstanceCount(); //Here is the note it does not matter which obj1 or obj2 or obj3 or\n //obj4 assign objectCount. Result will be same\n System.out.println(objectCount + \" instances of the class were created.\");\n\n\n }", "public Object[] getCompInfo() {\n\t\tObject comp[] = new Object[2];\n\t\tcomp[0] = \"IBM\";\n\t\tcomp[1] = 1000;\n\t\t\n\t\treturn comp;\n\t}", "@RequestMapping(value = \"/discovery-client/instances\", method = RequestMethod.GET)\n public Map<String, Integer> getAllInstances() {\n final Map<String, Integer> response = new HashMap<>();\n\n final Applications applications = discoveryClient.getApplications();\n final List<Application> applicationList = applications.getRegisteredApplications();\n\n //TODO Java 8 Stream\n // Get instances from eureka\n for (final Application app : applicationList) {\n response.put(app.getName(), app.getInstances().size());\n }\n\n return response;\n }", "public java.util.List<String> getReservedInstancesIds() {\n if (reservedInstancesIds == null) {\n reservedInstancesIds = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();\n reservedInstancesIds.setAutoConstruct(true);\n }\n return reservedInstancesIds;\n }", "public SelectedPeptideIdentifications() {\n iPeptideIdentifications = new ArrayList();\n }", "public long getId() {\n\t\treturn graphicFrame.getNvGraphicFramePr().getCNvPr().getId();\n\t}", "public java.util.List<pb4client.ValueChange> getVcList() {\n return vc_;\n }", "public java.lang.String getCivNo () {\n\t\treturn civNo;\n\t}", "protected List<String> getVclassIds(VitroRequest vreq) {\n\t\tString[] vclassIds = vreq.getParameterValues(\"vclassId\");\n\t\tif ((vclassIds == null) || (vclassIds.length == 0)) {\n\t\t\tlog.error(\"parameter vclassId expected but not found\");\n\t\t\tthrow new IllegalStateException(\"parameter vclassId expected \");\n\t\t}\n\n\t\tfor (String vclassId : vclassIds) {\n\t\t\tinstantiateVclass(vclassId, vreq);\n\t\t}\n\n\t\treturn Arrays.asList(vclassIds);\n\t}", "public PairVector getCCs(){\r\n\t\treturn mccabe.getCCs(javaclass);\r\n\t}", "@Schema(required = true, description = \"An identifier with the intention of being globally unique. \")\n public String getVnfInstanceId() {\n return vnfInstanceId;\n }", "public Collection<Integer> getProgramCounterValues() {\n return Collections.unmodifiableSet(enteringPCValueAssignmentEdges.keySet());\n }", "public com.sforce.soap.enterprise.QueryResult getProcessInstances() {\r\n return processInstances;\r\n }", "public double[] ClassVect() {\n\t\treturn class_vect;\n\t}", "public abstract java.lang.String getIdpcTV();", "public Vector<String> getIdentifiers()\n\t{\n\t\tfinal Vector<String> rets = new Vector<String>();\n\t\trets.add(identifier);\n\t\treturn rets;\n\t}", "@DISPID(47)\r\n\t// = 0x2f. The runtime will prefer the VTID if present\r\n\t@VTID(45)\r\n\tint instancesSucceeded();", "@DISPID(46)\r\n\t// = 0x2e. The runtime will prefer the VTID if present\r\n\t@VTID(44)\r\n\tint instancesExecuted();", "@Override\n\tpublic List<VIP> findAllVIP() {\n\t\treturn vb.findAll();\n\t}", "private List<List<XGraph.XVertex>> getComponents() {\n scc = new SCC(graph);\n int componentCount = scc.findSSC();\n List<List<XGraph.XVertex>> components = new ArrayList<>();\n for (int i = 0; i < componentCount; i++) {\n components.add(new ArrayList<>());\n }\n for (Graph.Vertex vertex : graph) {\n CC.CCVertex component = scc.getCCVertex(vertex);\n components.get(component.cno - 1).add((XGraph.XVertex) vertex);\n }\n return components;\n }", "public java.lang.String getCsp_Nif() {\n return csp_Nif;\n }", "public int getCHVNumber()\r\n {\r\n return number_of_CHV;\r\n }", "public String getCsVin() {\n return csVin;\n }", "public int getIdCompI() {\n\t\treturn ID_COMP_I;\n\t}", "public List<String> mo13280v() {\n List<DmcDisclaimerLabel> list = this.f9145h0;\n if (list == null) {\n return null;\n }\n ArrayList arrayList = new ArrayList(C13187p.m40525a((Iterable) list, 10));\n for (DmcDisclaimerLabel X : list) {\n arrayList.add(X.mo12863X());\n }\n return arrayList;\n }", "@Override\n\tpublic Instances getInstances() {\n\t\treturn null;\n\t}", "public String getCurSpiceInstID() {\n return mVMStrID;\n }", "public CandidateValue getCompanyCVs() {\n\n return companyCVs;\n }", "public List<ServiceInstance<InstanceDetails>> listInstances() throws Exception {\n\t\tCollection<String> serviceNames = serviceDiscovery.queryForNames();\n\t\tSystem.out.println(serviceNames.size() + \" type(s)\");\n\t\tList<ServiceInstance<InstanceDetails>> list = new ArrayList<>();\n\t\tfor (String serviceName : serviceNames) {\n\t\t\tCollection<ServiceInstance<InstanceDetails>> instances = serviceDiscovery.queryForInstances(serviceName);\n\t\t\tSystem.out.println(serviceName);\n\t\t\tfor (ServiceInstance<InstanceDetails> instance : instances) {\n\t\t\t\toutputInstance(instance);\n\t\t\t\tlist.add(instance);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public TreeMap<String,VersionID> \n getVersionIDs()\n {\n TreeMap<String,VersionID> versions = new TreeMap<String,VersionID>();\n for(String name : pVersionFields.keySet()) {\n JCollectionField field = pVersionFields.get(name);\n versions.put(name, pVersionIDs.get(name).get(field.getSelectedIndex()));\n }\n return versions;\n }", "public String[] getNomEquips(){\n\t\tString[] noms= new String[n_equips];\n\t\tNode aux = primer; \n\t\tint i=0;\n\t\twhile((aux!=null)&&(i<n_equips)) {\n\t\t\tnoms[i] = aux.info.getNom();\n\t\t\taux=aux.Nodeseguent;\n\t\t\ti++;\n\t\t}\n\t\treturn noms;\n\t}", "public List<Integer> getConIds(ConProcess conProcess) throws AppException;", "public String[] contatos() {\n\t\treturn null;\r\n\t}", "public String[] verNumerosDeCuetas (){\r\n\t\tString[] cuentasPersona = new String[0];\r\n\t\tfor(int i =0;i<cuentas.length;i++){\r\n\t\t\tcuentasPersona=Arrays.copyOf(cuentasPersona, cuentasPersona.length+1);\r\n\t\t\tcuentasPersona[i]=cuentas[i].getNumeroCuenta();\r\n\t\t}\r\n\t\treturn cuentasPersona;\r\n\t}", "public CandidateValue getStatusCVs() {\n\n return statusCVs;\n }", "protected Set<Integer> getInnovations() {\n\t\treturn genes.keySet();\n\t}", "public String toString() {\n\t\treturn thisInstance.getInstanceClass().getName() + \" : \" + thisInstance.getInstanceInObject().getObjectId() ;\n\t}", "public String getvCodtmon() {\n return vCodtmon;\n }", "public Set<Vec3i> cisConnections();", "public String[] listFc() {\n\t\treturn new String[] { \"component\", \"counterResync\" };\n\t}", "public long getNClusters() {\n return cGetNClusters(this.cObject);\n }", "public String getCpnID() {\n\t\treturn this.CpnID;\n\t}", "public static BinaryClassificationInstances getTextInstances() {\n\t\tVWtoBinaryInstancesPipeline pipe = new VWtoBinaryInstancesPipeline(\n\t\t\t\ttextFile, (int) Math.pow(2, 18));\n\t\tBinaryClassificationInstances insts = pipe.next();\n\t\treturn insts;\n\t}", "public List<String> findActiveCongestionPointAddresses(LocalDate period) {\n return congestionPointConnectionGroupRepository.findActiveCongestionPointConnectionGroup(period).stream()\n .map(ConnectionGroup::getUsefIdentifier).collect(Collectors.toList());\n }", "@Override\n public Set<DataFact> visitInstanceof(CGNode n, SSAInstanceofInstruction instruction, DataFact fact) {\n\n return Collections.singleton(fact);\n }", "public String get_svm_ns_comm()\r\n\t{\r\n\t\treturn this.svm_ns_comm;\r\n\t}", "@Override\n public String toString() {\n return \"V\"+this.VS_ID+\"\\tNodes: \"+getNodes()[0]+\" & \"+getNodes()[1]+\"\\t\"+\"DC\\t\"+getValue()+\" V\";\n }", "private int[] countClasses(List<Instance> instances){\r\n\t\tint[] counters = new int[classes.size()];\r\n\t\tfor(Instance ins : instances){\r\n\r\n\t\t\tfor(String str : classes){\r\n\t\t\t\tif(ins.getClassAttribute().equals(str)){\r\n\t\t\t\t\tcounters[classes.indexOf(str)]++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\r\n\t\treturn counters;\r\n\t}", "public Map<Integer, EngineSpecifications> getMapOfEngineDisplacementCC() {\n\t\tengineDisplacementCCMap = new HashMap<>();\n\n\t\tfor (int i = 0; i < engineDisplacementCC.size(); i++) {\n\t\t\tengineDisplacementCCMap.put(engineDisplacementCC.get(i), engineTypeForEngineDisplacementCC.get(i));\n\t\t}\n\n\t\treturn engineDisplacementCCMap;\n\t}", "private void createNVertices() {\n\t\tfor (int i = 0; i < this.numNVertices; i++) {\n\t\t\tvertices.add(new Vertex('n', this.countNID++));\n\t\t}\n\t}", "public String getNumberOfInstances() {\n return numberOfInstances;\n }", "public int getNumComps(){\n return this.mFarm.getNumComps();\n }", "public int getInstanceCount() {\n return instanceCount;\n }", "public int getInstanceCount() {\n return instanceCount;\n }", "public int getIndicationReps() {\r\n \treturn this.getReps(19);\r\n }", "public MultiplicityInterval getOccurrences() {\n return occurrences;\n }", "public String getNOICAP_CCHN()\n {\n return this.NOICAP_CCHN;\n }", "public Collection<CV> getCvLookup() throws InvalidFormatException;", "public ArrayList< Edge > incidentEdges( ) {\n return incidentEdges;\n }", "@Schema(description = \"Type of the CP instance that is identified by cpInstanceId. Shall be present if \\\"cpInstanceId\\\" is present, and shall be absent otherwise. Permitted values: * VNFC_CP: The link port is connected to a VNFC CP * EXT_CP: The link port is associated to an external CP. \")\n public CpInstanceTypeEnum getCpInstanceType() {\n return cpInstanceType;\n }", "public List<VirtualMachineDescriptor> listVirtualMachines() {\n ArrayList<VirtualMachineDescriptor> result =\n new ArrayList<VirtualMachineDescriptor>();\n\n MonitoredHost host;\n Set<Integer> vms;\n try {\n host = MonitoredHost.getMonitoredHost(new HostIdentifier((String)null));\n vms = host.activeVms();\n } catch (Throwable t) {\n if (t instanceof ExceptionInInitializerError) {\n t = t.getCause();\n }\n if (t instanceof ThreadDeath) {\n throw (ThreadDeath)t;\n }\n if (t instanceof SecurityException) {\n return result;\n }\n throw new InternalError(t); // shouldn't happen\n }\n\n for (Integer vmid: vms) {\n String pid = vmid.toString();\n String name = pid; // default to pid if name not available\n boolean isAttachable = false;\n MonitoredVm mvm = null;\n try {\n mvm = host.getMonitoredVm(new VmIdentifier(pid));\n try {\n isAttachable = MonitoredVmUtil.isAttachable(mvm);\n // use the command line as the display name\n name = MonitoredVmUtil.commandLine(mvm);\n } catch (Exception e) {\n }\n if (isAttachable) {\n result.add(new HotSpotVirtualMachineDescriptor(this, pid, name));\n }\n } catch (Throwable t) {\n if (t instanceof ThreadDeath) {\n throw (ThreadDeath)t;\n }\n } finally {\n if (mvm != null) {\n mvm.detach();\n }\n }\n }\n return result;\n }", "public java.lang.String getCvNumber() {\r\n return cvNumber;\r\n }", "public ArrayList<String> getPageInstanceIDs() {\n\t\treturn this.pageInstanceIDs;\n\t}", "private static ArrayList<Integer> getInterestingHalPids() {\r\n try {\r\n IServiceManager serviceManager = IServiceManager.getService();\r\n ArrayList<IServiceManager.InstanceDebugInfo> dump =\r\n serviceManager.debugDump();\r\n HashSet<Integer> pids = new HashSet<>();\r\n for (IServiceManager.InstanceDebugInfo info : dump) {\r\n if (info.pid == IServiceManager.PidConstant.NO_PID) {\r\n continue;\r\n }\r\n\r\n if (Watchdog.HAL_INTERFACES_OF_INTEREST.contains(info.interfaceName) ||\r\n CAR_HAL_INTERFACES_OF_INTEREST.contains(info.interfaceName)) {\r\n pids.add(info.pid);\r\n }\r\n }\r\n\r\n return new ArrayList<Integer>(pids);\r\n } catch (RemoteException e) {\r\n return new ArrayList<Integer>();\r\n }\r\n }", "public com.vmail.external.ups.hh.ws.EVNTType[] getEVNT() {\r\n return EVNT;\r\n }", "@Override\n public String getName() {\n return \"NVD CVE Analyzer\";\n }", "public ArrayList<Integer> getIdentificationAlgorithms() {\n\n \n ArrayList<Integer> result = new ArrayList<>();\n\n for (HashMap<String, ArrayList<String>> advocateVersions : identificationAlgorithms.values()) {\n\n for (String advocateName : advocateVersions.keySet()) {\n\n Advocate advocate = Advocate.getAdvocate(advocateName);\n\n if (advocate == null) {\n\n throw new IllegalArgumentException(\"Identification algorithm \" + advocateName + \" not recognized.\");\n\n }\n\n int advocateId = advocate.getIndex();\n\n if (!result.contains(advocateId)) {\n\n result.add(advocateId);\n\n }\n }\n }\n\n return result;\n\n }", "public List getComponentIdentifierList() {\n return componentIdentifiers;\n }", "public int getVcCount() {\n if (vcBuilder_ == null) {\n return vc_.size();\n } else {\n return vcBuilder_.getCount();\n }\n }", "public int getvID() {\n return vID;\n }", "public Map<ServiceType, IdentifiedService> getIdentifiedServices() {\n return identifiedServices;\n }", "public static int getNSectors()\n {\n return Disk.NUM_OF_SECTORS - ADisk.REDO_LOG_SECTORS - 1;\n }", "public long getVisaCaseNumber() {\n return visaCaseNumber;\n }", "public String getCVCTG_NOMBRE(){\n\t\treturn this.myCvctg_nombre;\n\t}", "public Integer getEnt_cid() {\n return ent_cid;\n }", "public Long [] getCapManagedIds() {\n return this.CapManagedIds;\n }", "@Override\n\tpublic String inspectPrimaryKey() {\n\t\treturn \"INDV_ELG: \" + \"bnft_pin_num=\" + bnft_pin_num + \",\" + \"bnft_case_num=\" + bnft_case_num + \",\" + \"cat_cd=\" + cat_cd + \",\" + \"scat_cd=\"\n\t\t\t\t+ scat_cd + \",\" + \"scat_seq_num=\" + scat_seq_num + \",\" + \"cur_elg_ind=\" + cur_elg_ind + \",\" + \"pymt_beg_dt=\" + pymt_beg_dt;\n\t}", "public Vector getFieldLabels() {\n\treturn _vcFieldLabels;\n }", "@DISPID(10) //= 0xa. The runtime will prefer the VTID if present\r\n @VTID(17)\r\n java.lang.String[] getNames();", "public List<String> getCcs() {\r\n\t\treturn ccs;\r\n\t}", "private HashMap<String, ArrayList<String>> getInstanceIdsPerClientId(TSDBData[] tsdbData) {\n logger.trace(\"BEGIN HashMap<String,ArrayList<String>> getInstanceIdsPerClientId(TSDBData[] tsdbData)\");\n HashMap<String, ArrayList<String>> map = new HashMap<String, ArrayList<String>>();\n for (TSDBData obj : tsdbData) {\n ArrayList<String> columns = obj.getColumns();\n ArrayList<ArrayList<Object>> points = obj.getPoints();\n int clientidIndex = -1;\n int instanceidIndex = -1;\n for (int i = 0; i < columns.size(); i++) {\n if (columns.get(i).equals(\"clientId\"))\n clientidIndex = i;\n else if (columns.get(i).equals(\"instanceId\"))\n instanceidIndex = i;\n }\n for (int i = 0; i < points.size(); i++) {\n String clientId = points.get(i).get(clientidIndex).toString();\n String InstanceId = points.get(i).get(instanceidIndex).toString();\n if (!(map.containsKey(clientId))) {\n map.put(clientId, new ArrayList<String>());\n if (!(map.get(clientId).contains(InstanceId))) {\n map.get(clientId).add(InstanceId);\n }\n } else {\n if (!(map.get(clientId).contains(InstanceId))) {\n map.get(clientId).add(InstanceId);\n }\n\n }\n }\n }\n logger.trace(\"END HashMap<String,ArrayList<String>> getInstanceIdsPerClientId(TSDBData[] tsdbData)\");\n return map;\n }", "public String getVO_CO_REFERENCE() {\r\n return VO_CO_REFERENCE;\r\n }", "public ArrayList<CrimeCase> getCrimeCases()\n\t{\n\t\treturn CrimeList;\n\t}" ]
[ "0.63870734", "0.610348", "0.5900351", "0.58799064", "0.561089", "0.5411115", "0.5374121", "0.5248132", "0.5208899", "0.5171775", "0.5170599", "0.51341325", "0.50389284", "0.5019212", "0.50118524", "0.5009151", "0.49909857", "0.4984734", "0.49844792", "0.498216", "0.49799776", "0.49788755", "0.4959114", "0.49506217", "0.49183574", "0.49109918", "0.49060068", "0.49040514", "0.49024442", "0.4893532", "0.4889144", "0.48679885", "0.48547852", "0.4854455", "0.4853626", "0.48507756", "0.48351774", "0.48194033", "0.4818944", "0.4805585", "0.47973767", "0.47855058", "0.47848654", "0.47829306", "0.47752985", "0.4769813", "0.47683978", "0.47678587", "0.47649023", "0.4760838", "0.475447", "0.47523916", "0.47453102", "0.4743798", "0.47354916", "0.47297832", "0.47154057", "0.47144708", "0.47098953", "0.47059378", "0.47031826", "0.47025675", "0.46965942", "0.4688878", "0.4687787", "0.467709", "0.4672407", "0.466665", "0.4660339", "0.46545383", "0.46545383", "0.46533772", "0.464681", "0.4646175", "0.46433827", "0.46353114", "0.4635132", "0.46336436", "0.46310404", "0.46257257", "0.4624123", "0.46204814", "0.46060878", "0.45975846", "0.45967996", "0.4594425", "0.4588593", "0.4587846", "0.45877695", "0.45868462", "0.45866433", "0.45835167", "0.45785946", "0.45759597", "0.45741257", "0.4571157", "0.45699242", "0.45616326", "0.4561172", "0.45589417" ]
0.65171766
0
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPACES);\n }", "private String toIndentedString(Object o)\n/* */ {\n/* 128 */ if (o == null) {\n/* 129 */ return \"null\";\n/* */ }\n/* 131 */ return o.toString().replace(\"\\n\", \"\\n \");\n/* */ }", "private String toIndentedString( Object o )\n {\n if ( o == null )\n {\n return \"null\";\n }\n return o.toString().replace( \"\\n\", \"\\n \" );\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }" ]
[ "0.7885785", "0.75504416", "0.74982363", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563", "0.7462563" ]
0.0
-1
get the username from User.java Class
@Override public void onDataChange(@NonNull DataSnapshot snapshot) { User user = snapshot.getValue(User.class); //if the user exist in the database if (user != null) { String highScore = user.highScore; int i = Integer.parseInt(highScore); int j = Integer.parseInt(tCorrect); if (j >= i) { snapshot.getRef().child("highScore").setValue(tCorrect); } } }
{ "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 getUsername();", "String getUsername();", "String getUsername();", "String getUsername();", "String getUsername();", "String getUsername();", "String getUserName();", "String getUserName();", "@Override\n\tpublic String getUsername() {\n\t\treturn user.getUserName();\n\t}", "public String getUserName();", "String getUserUsername();", "@Override\n\tpublic String getUsername() {\n\t\treturn user.getUsername();\n\t}", "public final String getUser() {\n return username;\n }", "java.lang.String getUser();", "public String getUsername() {\n return username.get();\n }", "public User getUserByName(String username);", "public User getUserByName(String username);", "public Object username() {\n return this.username;\n }", "String getUserName() {\r\n\t\t\treturn username;\r\n\t\t}", "@Override\n\tpublic String getUserName() {\n\t\treturn model.getUserName();\n\t}", "@Override\n\tpublic String getUserName() {\n\t\treturn model.getUserName();\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 }", "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 }", "public String getUsername()\r\n\t{\r\n\t\treturn username;\r\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 String getName(){\n return username;\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 }", "@Override\r\n\tpublic String getUsername() {\n\t\treturn username;\r\n\t}", "public final String getUsername() {\n return username;\n }", "@Override public String getUsername()\r\n {\r\n return username;\r\n }", "@Override\n\tpublic String getUsername() {\n\t\treturn username;\n\t}", "@Override\n\tpublic String getUsername() {\n\t\treturn username;\n\t}", "String getUser();", "String getUser();", "public String getUsername() {\r\n return this.username;\r\n }", "public String getUsername(){\r\n\t\treturn username;\r\n\t}", "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() {\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() {\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() {\r\n return username;\r\n }", "public String getUsername()\r\n {\r\n return username;\r\n }", "public String get_username()\r\n\t{\r\n\t\treturn this.username;\r\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 }", "@AutoEscape\n\t@Override\n\tpublic String getUserName();", "@AutoEscape\n\t@Override\n\tpublic String getUserName();", "public String getUsername() {\n return username;\r\n }", "public String getUsername()\n {\n return username;\n }", "public String getUsername()\n {\n return username;\n }", "public java.lang.CharSequence getUsername() {\n return username;\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 String getUsername()\n {\n return this.username;\n }", "public String getUsername()\n {\n return this.username;\n }", "public String getUsername()\r\n {\r\n return this.username; \r\n }", "@Override\n public java.lang.String getUserName() {\n return _partido.getUserName();\n }", "@Override\n public String getUsername() {\n return username;\n }", "public String getUsername()\n\t{\n\t\treturn username;\n\t}", "@Override\n\tpublic String getUsername() {\n\t\treturn this.username;\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 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 String getUserName()\n {\n return userName;\n }", "public abstract String getUserName();", "public java.lang.CharSequence getUsername() {\n return username;\n }", "public String getUsername() {\n return this.username;\n }", "public String getUsername() {\n return this.username;\n }", "public String getUsername() {\n return this.username;\n }", "public String getUsername() {\n return username;\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 }" ]
[ "0.8727036", "0.8727036", "0.8727036", "0.8727036", "0.8727036", "0.8727036", "0.8727036", "0.8727036", "0.8727036", "0.8579823", "0.8579823", "0.8579823", "0.8267285", "0.8267285", "0.8267285", "0.8267285", "0.8267285", "0.8267285", "0.82072634", "0.82072634", "0.80953914", "0.80935955", "0.80586994", "0.8009202", "0.79981303", "0.79905957", "0.7845083", "0.7834779", "0.7834779", "0.78231525", "0.78177595", "0.7801292", "0.7801292", "0.77680457", "0.77680457", "0.77680457", "0.77680457", "0.77584684", "0.77584684", "0.77584684", "0.77584684", "0.77063733", "0.7697338", "0.76942855", "0.76868874", "0.76868874", "0.76868874", "0.76861095", "0.76850367", "0.76811564", "0.7678965", "0.7678965", "0.76785046", "0.76785046", "0.76771617", "0.76676345", "0.7663906", "0.7663906", "0.7663906", "0.7663906", "0.7663906", "0.7663906", "0.7663906", "0.7663906", "0.7663906", "0.7663906", "0.7663906", "0.7659686", "0.7659686", "0.7659663", "0.7659592", "0.7658468", "0.7658201", "0.7658201", "0.7656698", "0.7656132", "0.7656132", "0.7652892", "0.7651861", "0.7649261", "0.7649261", "0.7648449", "0.7644049", "0.764014", "0.76341444", "0.7629014", "0.762546", "0.762546", "0.762546", "0.76161367", "0.76145023", "0.7612633", "0.76083136", "0.76083136", "0.76083136", "0.76063657", "0.760474", "0.75988704", "0.75988704", "0.75988704", "0.75988704" ]
0.0
-1
Assigns a transmission id from a previously recorded journal item or does nothing if there is no previously recorded journal item.
protected void assignTransmissionId(AeB4PQueueObject aQueueObject, IAeTransmission aTransmission) throws AeBusinessProcessException { long transmissionId = removeInvokeTransmittedEntry(aQueueObject.getLocationId()); if (transmissionId != IAeTransmissionTracker.NULL_TRANSREC_ID) { // Restore the invoke's transmission. aTransmission.setTransmissionId(transmissionId); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UUID getTransmissionId();", "public void assignId(int id);", "public void setTransmission(Transmission transmission) {\n this.transmission = transmission;\n }", "public void setTransmittedSerialNumber(String transmittedSerialNumber) ;", "Transmission getTransmission(Long transmissionId);", "public int getId() {\n return txId;\n }", "public final ItemId getId() {\r\n return null;\r\n }", "java.lang.String getTxId();", "@Transient\n @Override\n public Integer getId()\n {\n return this.journalId;\n }", "void updateTransmission(Transmission transmission);", "public void setTransactionID(int tid) {\n m_TransactionID = tid;\n // setChanged(true);\n }", "long getID(Object item);", "void addId(II identifier);", "public TransactionID(){\r\nthis.id = transCount++;\r\n\r\n}", "public void setTitleID(String val){\n\t\ttid = val;\n\t}", "public void setTransactionID(long value) {\r\n this.transactionID = value;\r\n }", "public void setReceivedSerialNumber(String receivedSerialNumber) ;", "@Override\n\tpublic void setUniqueId(int id) {}", "long getTxid();", "public void setIdTransport(Integer idTransport) {\r\n this.idTransport = idTransport;\r\n }", "@Override\n\tpublic synchronized long assignNewId(RepositoryModel repository) {\n\t\tJedis jedis = pool.getResource();\n\t\ttry {\n\t\t\tString key = key(repository, KeyType.counter, null);\n\t\t\tString val = jedis.get(key);\n\t\t\tif (isNull(val)) {\n\t\t\t\tlong lastId = 0;\n\t\t\t\tSet<Long> ids = getIds(repository);\n\t\t\t\tfor (long id : ids) {\n\t\t\t\t\tif (id > lastId) {\n\t\t\t\t\t\tlastId = id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tjedis.set(key, \"\" + lastId);\n\t\t\t}\n\t\t\tlong ticketNumber = jedis.incr(key);\n\t\t\treturn ticketNumber;\n\t\t} catch (JedisException e) {\n\t\t\tlog.error(\"failed to assign new ticket id in Redis @ \" + getUrl(), e);\n\t\t\tpool.returnBrokenResource(jedis);\n\t\t\tjedis = null;\n\t\t} finally {\n\t\t\tif (jedis != null) {\n\t\t\t\tpool.returnResource(jedis);\n\t\t\t}\n\t\t}\n\t\treturn 0L;\n\t}", "public void setIdentifier(String artist, String album, String track, String title, String remix) {\n\t\tsuper.setIdentifier(new SubmittedSong(artist, album, track, title, remix).getIdentifier());\n\t\tthis.release = album;\n\t\tthis.track = track;\n\t\tthis.title = title;\n\t\tthis.remix = remix;\n\t\tif (submittedRelease != null) {\n\t\t\tReleaseIdentifier releaseId = submittedRelease.getReleaseIdentifier();\n\t\t\treleaseId = new ReleaseIdentifier(((SongIdentifier)identifier).getArtistNames(), releaseId.getReleaseTitle());\n\t\t\tsubmittedRelease.setIdentifier(releaseId);\n\t\t}\t\t\n\t}", "public void setTransactionid(long value) {\n this.transactionid = value;\n }", "public void cacheSubjectIdentifier(final ILocator l, ITopic t) {\r\n\t\tif (subjectIdentifiers == null) {\r\n\t\t\tsubjectIdentifiers = HashUtil.getHashMap();\r\n\t\t}\r\n\t\tsubjectIdentifiers.put(l, t);\r\n\t}", "public void setId(int i) { id = i; }", "void setItemId(String itemId);", "public void setAtomicId(AtomicInteger atomicId) { this.atomicId = atomicId; }", "@Override\n\t\tpublic void setId(final String identifier) {\n\t\t}", "void setTransactionId( long txId )\n {\n this.transactionId = txId;\n }", "@Test\r\n\tpublic void testIdItem() {\r\n\r\n\t\ttry {\r\n\t\t\tItem itemDes = new Item(idItem, \"elixir de Destreza\", 0, 0, 0, 0, 0, 0, null, null);\r\n\r\n\t\t\tAssert.assertEquals(12321, itemDes.getIdItem());\r\n\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}\t\t\r\n\r\n\t}", "public void setID() throws IOException;", "public void setId(String i) {\n\t\tid = i;\n\t}", "public String getUniqueID ( ) { return _uniqueID; }", "Transfer updateTransactionNumber(Long id, String transactionNumber);", "public void setID(String idIn) {this.id = idIn;}", "protected int getUniqueID() {\n\t\treturn uniqueID;\n\t}", "public void setId(java.lang.String param) {\n localIdTracker = true;\n\n this.localId = param;\n }", "public void setId(java.lang.String param) {\n localIdTracker = true;\n\n this.localId = param;\n }", "public void setIdTutorIndustrial(long idTutorIndustrial) {\n this.id = this.idTutorIndustrial = idTutorIndustrial;\n }", "public Text getIdAttachHolder()\r\n\t{\r\n\t\treturn idAttachHolder;\r\n\t}", "int insert(TSubjectInfo record);", "protected void setId(UiAction uiAction, ResultSet rs, int rowNumber) throws SQLException{\n\t\t\n\t\tString id = rs.getString(UiActionTable.COLUMN_ID);\n\t\t\n\t\tif(id == null){\n\t\t\t//do nothing when nothing found in database\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tuiAction.setId(id);\n\t}", "public void setMTID (byte[] m) {\n\t\tmtid = m;\n\t}", "int getSendid();", "public Builder setTxId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n txId_ = value;\n onChanged();\n return this;\n }", "int getItemID();", "public void setArtId(DBSequence value) {\n setAttributeInternal(ARTID, value);\n }", "public int getIdSubject() {\n\t\treturn idSubject;\n\t}", "private synchronized int generateItemID(){\r\n\t\tint i;\r\n\t\tfor(i = 1; items.containsKey(i) || finishedItems.containsKey(i);i++);\r\n\t\treturn i;\r\n\t}", "public java.lang.Long getSeqTairObjectId() {\n return ((Est)dto).getSeqTairObjectId();\n }", "public void getOriginalUID(int seqid, String uid);", "void xsetSetupID(com.microsoft.schemas.office.x2006.digsig.STUniqueIdentifierWithBraces setupID);", "private void updateMediaPackageID(MediaPackage mp, InputStream is) throws IOException {\n DublinCoreCatalog dc = DublinCores.read(is);\n EName en = new EName(DublinCore.TERMS_NS_URI, \"identifier\");\n String id = dc.getFirst(en);\n if (id != null) {\n mp.setIdentifier(new IdImpl(id));\n }\n }", "public Object setID(int iD)\r\n/* */ {\r\n\t\t\t\tlogger.info(count++ + \" About to setId : \" + \"Agent\");\r\n/* 51 */ \tthis.myID = iD;\r\n/* 52 */ \treturn this;\r\n/* */ }", "@Override\r\n public void setItemId(int itemId) {\n this.itemId = itemId;\r\n }", "public void setIdSubject(int idSubject) {\n\t\tthis.idSubject = idSubject;\n\t}", "java.lang.String getID();", "org.hl7.fhir.Identifier addNewIdentifier();", "@Override\r\n\tpublic int selectNewId() {\n\t\treturn messageMapper.selectNewId();\r\n\t}", "public String getItemId(){\r\n\t\treturn \"\";\r\n\t}", "public void setId(String tmp) {\n this.setId(Integer.parseInt(tmp));\n }", "int insertSelective(TSubjectInfo record);", "public void setReceiverId(int v) \n {\n \n if (this.receiverId != v)\n {\n this.receiverId = v;\n setModified(true);\n }\n \n \n }", "@Override\n\tpublic int toNotAudit(int receptionID) {\n\t\treturn settlementDao.toAudit(false,receptionID);\n\t}", "public String getItemId() {\r\n return itemId;\r\n }", "public int getID(OrderItem oi){\n int id;\n id=findID(oi);\n return id;\n }", "void setTransaction(final INodeReadTrx pRtx);", "public void addIdentification_to_quantitation(Identification_to_quantitation lQuantLinker){\n iQuantitationLinkers.add(lQuantLinker);\n }", "public java.lang.String getTxId() {\n java.lang.Object ref = txId_;\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 txId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public void setTid(int tid);", "public void setID(String newID)\r\n {\r\n id=newID;\r\n }", "String getAcctgTransEntrySeqId();", "private void receiveId() throws Exception {\n\t\tint id = in.readInt();\n\t\t//intByteBuffer.clear();\n\t\t\n\t //if(numOfBytes < 0)\n\t // throw new Exception(\"Connection to server lost\");\n\t \n\t //if(numOfBytes < 4) {\n\t // System.err.println(\"Received only \" + numOfBytes + \" bytes in receiveId\");\n\t // return;\n\t //}\n\t \n\t GameActivity.getInstance().model().player().setId(id);\n\t \n\t System.out.println(\"id: \" + GameActivity.getInstance().model().player().id());\n\t}", "long getTruckId();", "public String getISBN() {\r\n return super.getUniqueID();\r\n }", "public int getItemId() {\n\t\treturn id;\n\t}", "public String getItemId() {\n return itemId;\n }", "@Override\n\tpublic void setId(Integer arg0) {\n\n\t}", "@java.lang.Override\n public long getItemId() {\n return itemId_;\n }", "TradeItem getTradeItem(long id);", "protected Object getId(Modulo t) {\n\t\treturn t.getId();\n\t}", "public void seti_ordertrx_temp_ID (int i_ordertrx_temp_ID);", "public void setTrid(int trid) {\n this.trid = trid;\n }", "public long getTransactionID() {\r\n return transactionID;\r\n }", "public void setPrimaryKey(long primaryKey) {\n\t\t_tempNoTiceShipMessage.setPrimaryKey(primaryKey);\n\t}", "public int obtId() {\r\n\t\treturn id;\r\n\t}", "public gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId addNewTextseqId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId target = null;\r\n target = (gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId)get_store().add_element_user(TEXTSEQID$0);\r\n return target;\r\n }\r\n }", "public gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId addNewTextseqId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId target = null;\r\n target = (gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId)get_store().add_element_user(TEXTSEQID$0);\r\n return target;\r\n }\r\n }", "public gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId addNewTextseqId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId target = null;\r\n target = (gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId)get_store().add_element_user(TEXTSEQID$0);\r\n return target;\r\n }\r\n }", "public gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId addNewTextseqId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId target = null;\r\n target = (gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId)get_store().add_element_user(TEXTSEQID$0);\r\n return target;\r\n }\r\n }", "public gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId addNewTextseqId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId target = null;\r\n target = (gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId)get_store().add_element_user(TEXTSEQID$0);\r\n return target;\r\n }\r\n }", "public gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId addNewTextseqId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId target = null;\r\n target = (gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId)get_store().add_element_user(TEXTSEQID$0);\r\n return target;\r\n }\r\n }", "public gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId addNewTextseqId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId target = null;\r\n target = (gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId)get_store().add_element_user(TEXTSEQID$0);\r\n return target;\r\n }\r\n }", "public gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId addNewTextseqId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId target = null;\r\n target = (gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId)get_store().add_element_user(TEXTSEQID$0);\r\n return target;\r\n }\r\n }", "public gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId addNewTextseqId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId target = null;\r\n target = (gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId)get_store().add_element_user(TEXTSEQID$0);\r\n return target;\r\n }\r\n }", "public gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId addNewTextseqId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId target = null;\r\n target = (gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId)get_store().add_element_user(TEXTSEQID$0);\r\n return target;\r\n }\r\n }", "public gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId addNewTextseqId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId target = null;\r\n target = (gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId)get_store().add_element_user(TEXTSEQID$0);\r\n return target;\r\n }\r\n }", "public gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId addNewTextseqId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId target = null;\r\n target = (gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId)get_store().add_element_user(TEXTSEQID$0);\r\n return target;\r\n }\r\n }", "public gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId addNewTextseqId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId target = null;\r\n target = (gov.nih.nlm.ncbi.www.TextseqIdDocument.TextseqId)get_store().add_element_user(TEXTSEQID$0);\r\n return target;\r\n }\r\n }", "public int getUniqueId() {\r\n\t\treturn uniqueId;\r\n\t}" ]
[ "0.6051971", "0.5654358", "0.549141", "0.54753506", "0.5390828", "0.5207353", "0.5204421", "0.5195952", "0.5106321", "0.50751096", "0.50739205", "0.50713795", "0.50706613", "0.50520676", "0.5027506", "0.50211275", "0.5005877", "0.49952242", "0.4912998", "0.4910927", "0.48829335", "0.4851416", "0.4832379", "0.48292434", "0.48284888", "0.48243913", "0.48080412", "0.48017478", "0.48008943", "0.4800009", "0.47956458", "0.4786", "0.4778355", "0.47735596", "0.47728992", "0.47712913", "0.4766615", "0.4766615", "0.4766382", "0.4764461", "0.47558904", "0.47452018", "0.47349834", "0.473159", "0.47259954", "0.47258058", "0.47246194", "0.4723115", "0.47227672", "0.47185585", "0.47142705", "0.4711455", "0.47088617", "0.4702023", "0.46996826", "0.4694995", "0.4694987", "0.46943995", "0.46937597", "0.46892288", "0.46863428", "0.4683801", "0.46648082", "0.4662823", "0.46626255", "0.46620554", "0.46598575", "0.46594903", "0.46484268", "0.4646749", "0.46445552", "0.46429032", "0.4639696", "0.4637781", "0.4637181", "0.46359724", "0.46322912", "0.46216133", "0.46196008", "0.46194842", "0.4619256", "0.4614103", "0.46130183", "0.4611469", "0.4609786", "0.46091434", "0.46082076", "0.46080223", "0.46080223", "0.46080223", "0.46080223", "0.46080223", "0.46080223", "0.46080223", "0.46080223", "0.46080223", "0.46080223", "0.46080223", "0.46080223", "0.46078643" ]
0.6328093
0
Create GLHelper and Surface
void init(){ if(DEBUG) Log.d(TAG, "Creating GlHelper and Surface"); mGLHelper = new GLHelper(); int mDefaultTextureID = 10001; SurfaceTexture st = new SurfaceTexture(mDefaultTextureID); st.setDefaultBufferSize(mWidth, mHeight); mGLHelper.init(st); textureID = mGLHelper.createOESTexture(); sTexture = new SurfaceTexture(textureID); sTexture.setOnFrameAvailableListener(this); surface = new Surface(sTexture); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GL createSurface(SurfaceHolder holder) {\r\n if (MotoConfig.KEY_LOG) {\r\n Log.w(\"EglHelper\", \"createSurface() tid=\" + Thread.currentThread().getId());\r\n }\r\n /*\r\n * Check preconditions.\r\n */\r\n if (mEgl == null) {\r\n throw new RuntimeException(\"egl not initialized\");\r\n }\r\n if (mEglDisplay == null) {\r\n throw new RuntimeException(\"eglDisplay not initialized\");\r\n }\r\n if (mEglConfig == null) {\r\n throw new RuntimeException(\"mEglConfig not initialized\");\r\n }\r\n /*\r\n * The window size has changed, so we need to create a new\r\n * surface.\r\n */\r\n if (mEglSurface != null && mEglSurface != EGL10.EGL_NO_SURFACE) {\r\n\r\n /*\r\n * Unbind and destroy the old EGL surface, if\r\n * there is one.\r\n */\r\n mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE,\r\n EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);\r\n mEGLWindowSurfaceFactory.destroySurface(mEgl, mEglDisplay, mEglSurface);\r\n }\r\n\r\n /*\r\n * Create an EGL surface we can render into.\r\n */\r\n mEglSurface = mEGLWindowSurfaceFactory.createWindowSurface(mEgl,\r\n mEglDisplay, mEglConfig, holder);\r\n\r\n if (mEglSurface == null || mEglSurface == EGL10.EGL_NO_SURFACE) {\r\n int error = mEgl.eglGetError();\r\n if (error == EGL10.EGL_BAD_NATIVE_WINDOW) {\r\n Log.e(\"EglHelper\", \"createWindowSurface returned EGL_BAD_NATIVE_WINDOW.\");\r\n }\r\n return null;\r\n }\r\n\r\n /*\r\n * Before we can issue GL commands, we need to make sure\r\n * the context is current and bound to a surface.\r\n */\r\n if (!mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext)) {\r\n throw new EglMakeCurrentException(\"eglMakeCurrent\");\r\n }\r\n\r\n GL gl = mEglContext.getGL();\r\n if (mGLWrapper != null) {\r\n gl = mGLWrapper.wrap(gl);\r\n }\r\n\r\n return gl;\r\n }", "Surface createSurface();", "public void onSurfaceCreated(GL10 unused, EGLConfig config) {\n GLES20.glClearColor(0.1f, 0.1f, 0.25f, 1.0f);\n RSGFXShaderManager.loadShaders();\n next_game_tick = SystemClock.elapsedRealtime();\n // No culling of back faces\n GLES20.glDisable(GLES20.GL_CULL_FACE);\n \n // No depth testing\n //GLES20.glDisable(GLES20.GL_DEPTH_TEST);\n setupRender();\n // Enable blending\n // GLES20.glEnable(GLES20.GL_BLEND);\n // GLES20.glBlendFunc(GLES20.GL_ONE, GLES20.GL_ONE);\n \n // Setup quad \n \t\t// Generate your vertex, normal and index buffers\n \t\t// vertex buffer\n \t\t_qvb = ByteBuffer.allocateDirect(_quadv.length\n \t\t\t\t* FLOAT_SIZE_BYTES).order(ByteOrder.nativeOrder()).asFloatBuffer();\n \t\t_qvb.put(_quadv);\n \t\t_qvb.position(0);\n\n \t\t// index buffer\n \t\t_qib = ByteBuffer.allocateDirect(_quadi.length\n \t\t\t\t* 4).order(ByteOrder.nativeOrder()).asIntBuffer();\n \t\t_qib.put(_quadi);\n \t\t_qib.position(0);\n }", "@Override\r\n\tpublic void onSurfaceCreated(GL10 gl, EGLConfig config) {\n\t\tLog.d(TAG, \"onSurfaceCreated\");\r\n//\t\tgl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Set color's clear-value to\r\n\t\tgl.glClearColor(0.f, 0.f, 0.f, 0.f);\r\n/////new/////\t\t\r\n\t\t gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA);\r\n\t\t gl.glEnable(gl.GL_BLEND);\r\n///////\t\t \r\n\t\tgl.glClearDepthf(1.0f); // Set depth's clear-value to farthest\r\n\t\tgl.glEnable(GL10.GL_DEPTH_TEST); // Enables depth-buffer for hidden\r\n\t\t\t\t\t\t\t\t\t\t\t// surface removal\r\n\t\tgl.glDepthFunc(GL10.GL_LEQUAL); // The type of depth testing to do\r\n\t\tgl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST); // nice\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// perspective\r\n\t\t// view\r\n\t\tgl.glShadeModel(GL10.GL_SMOOTH); // Enable smooth shading of color\r\n\t\tgl.glDisable(GL10.GL_DITHER); // Disable dithering for better\r\n\t\t\t\t\t\t\t\t\t\t// performance\r\n\t\t// You OpenGL|ES initialization code here\r\n\t\t// ......\r\n\t\tgl.glGenTextures(MAX_MODEL_NUM, texIDS, 0);\r\n\r\n//\t\tglview.loadTexture(gl); // Load image into Texture (NEW)\r\n\t\tgl.glEnable(gl.GL_TEXTURE_2D); // Enable texture (NEW)\r\n\t\t\r\n\t}", "@Override\n public void onSurfaceCreated(GL10 unused, EGLConfig config) {\n GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\n\n mTriangle = new Triangle();\n mSquare = new Square();\n }", "void createSurface(SurfaceTexture surfaceTexture);", "public void onSurfaceCreated(GL10 gl, EGLConfig config)\n {\n }", "public void onSurfaceCreated(GL10 glUnused, EGLConfig config) {\n Log.i(Focus.TAG, \"onSurfaceCreated, thread is \" + Thread.currentThread());\n\n root = new Root();\n renderable = new Triangle();\n\n try {\n shader = new ShaderLoader(context).load(\"plain\");\n renderable = new Triangle();\n renderable.setShaderProgram(shader);\n Log.i(Focus.TAG, \"shader found, id: \" + shader);\n } catch (IOException ex) {\n Log.e(Focus.TAG, \"error creating shader\", ex);\n }\n\n }", "@Override\n public void onSurfaceCreated(GL10 gl, EGLConfig config) {\n Log.d(LOGTAG, \"GLRenderer.onSurfaceCreated\");\n\n initRendering();\n\n vuforiaAppSession.onSurfaceCreated();\n }", "@Override\n public void onSurfaceCreated(GL10 unused, EGLConfig config) {\n float[] backgroundColor = new float[]{0.2f, 0.2f, 0.2f, 1.0f};\n //float[] backgroundColor = main.getModelActivity().getBackgroundColor();\n GLES20.glClearColor(backgroundColor[0], backgroundColor[1], backgroundColor[2], backgroundColor[3]);\n\n // Use culling to remove back faces.\n // Don't remove back faces so we can see them\n GLES20.glEnable(GLES20.GL_CULL_FACE);\n\n // Enable depth testing for hidden-surface elimination.\n GLES20.glEnable(GLES20.GL_DEPTH_TEST);\n// Create the GLText\n\t\t/*glText = new GLText(unused,context.getAssets());\n\n\t\t// Load the font from file (set size + padding), creates the texture\n\t\t// NOTE: after a successful call to this the font is ready for rendering!\n\t\tglText.load( \"Roboto-Regular.ttf\", 14, 2, 2 ); // Create Font (Height: 14 Pixels / X+Y Padding 2 Pixels)\n*/\n // Enable blending for combining colors when there is transparency\n GLES20.glEnable(GLES20.GL_BLEND);\n GLES20.glBlendFunc(GLES20.GL_ONE, GLES20.GL_ONE_MINUS_SRC_ALPHA);\n\n // This component will draw the actual models using OpenGL\n drawer = new DrawerFactory();\n }", "@Override\n\tpublic void onSurfaceCreated(GL10 unused, EGLConfig config) {\n\t\tGLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\n\n\t\tmTriangle = new M15_OpenGLES20Triangle();\n\t\tmQuadrat = new M15_OpenGLES20Quadrat();\n\t}", "private void initOpenGL()\n\t{\n\t\t// Create an OpenGL ES 2.0 context.\n\t\tsetEGLContextClientVersion(2);\n\n\t\t// Set the drawing quality.\n\t\t// Alpha isn't needed and the color choice is limited anyway, so we can get away with this setting.\n\t\tgetHolder().setFormat(PixelFormat.RGB_565);\n\t\tsetEGLConfigChooser(5, 6, 5, 0, 0, 0);\n\n\t\t// Prepare the renderer.\n\t\trenderer = new GLRenderer();\n\t\tsetRenderer(renderer);\n\n\t\t// Choose to only render the view on demand.\n\t\tsetRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);\n\n\t\t// Disable the unneeded depth test and stencil test.\n\t\tGLES20.glDisable(GLES20.GL_DEPTH_TEST);\n\t\tGLES20.glDisable(GLES20.GL_STENCIL_TEST);\n\n\t\t// Render the canvas for the first time.\n\t\trequestRender();\n\t}", "@Override\n public void onSurfaceCreated(GL10 unused, EGLConfig config) {\n GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\n \n // Do backface culling\n GLES20.glEnable(GLES20.GL_CULL_FACE);\n GLES20.glFrontFace(GLES20.GL_CCW);\n // Why using GL_BACK won't work is a mystery\n GLES20.glCullFace(GLES20.GL_BACK);\n // Enable depth buffer\n GLES20.glEnable(GLES20.GL_DEPTH_TEST);\n GLES20.glDepthFunc(GLES20.GL_LEQUAL);\n GLES20.glDepthMask(true);\n \n for (int i = 0; i < NUM_CARS; i++) {\n mCarBody[i] = new CarBody((float) Math.random(),\n (float) Math.random(),\n (float) Math.random());\n mCarWheels[i] = new CarWheels();\n }\n \n // Create transformation matrices for each car\n for (int i = 0; i < NUM_CARS; i++) {\n mCarXOffsets[i] = (i % NUM_LANES) * 1.1f;\n mCarZOffsets[i] = ((i / NUM_LANES) * -2) + ((i % NUM_LANES) * 1.3f);\n }\n \n road = new Square(0.6f, 0.6f, 0.6f);\n land = new Square(0.1f, 0.6f, 0.1f);\n sky = new Square(0.6f, 0.6f, 0.9f);\n background = new Sprite(mActivityContext);\n \n }", "@Override\r\n\tpublic void surfaceCreated(GL10 gl) {\n\t\tgl.glDisable(GL10.GL_DITHER);\r\n\t\t\r\n\t\t// One-time OpenGL initialization based on context...\r\n gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT,\r\n GL10.GL_NICEST);\r\n\t\t\r\n gl.glClearColor(0, 0, 0, 1); \r\n gl.glEnable(GL10.GL_CULL_FACE);\r\n gl.glCullFace(GL10.GL_BACK);\r\n gl.glEnable(GL10.GL_DEPTH_TEST);\r\n gl.glEnable(GL10.GL_LIGHTING);\r\n gl.glDepthFunc(GL10.GL_LEQUAL);\r\n gl.glShadeModel(GL10.GL_SMOOTH);\r\n \r\n if(scene != null && use_vbos) {\r\n \t\t// TODO messy...\r\n \t\tscene.forgetHardwareBuffers();\r\n \t\tscene.generateHardwareBuffers(gl);\r\n }\r\n }", "public interface IGLWrapper {\n\n /** Indicates that the color buffer should be cleared. */\n int GL_COLOR_BUFFER_BIT = 0x00004000;\n /** Indicates that elements should be drawn as triangles using indices. */\n int GL_TRIANGLES = 0x0004;\n /** Indicates that the texture should be loaded to 2D. */\n int GL_TEXTURE_2D = 0x0DE1;\n /** Indicates that the data type is an unsigned short. */\n int GL_UNSIGNED_SHORT = 0x1403;\n /** Indicates that the data type is a float. */\n int GL_FLOAT = 0x1406;\n /** Indicates that the fragment shader should be loaded. */\n int GL_FRAGMENT_SHADER = 0x8B30;\n /** Indicates that the vertex shader should be loaded. */\n int GL_VERTEX_SHADER = 0x8B31;\n /** Indicates that the nearest neighbor should be used for interpolation. */\n int GL_NEAREST = 0x2600;\n /** Indicates that the texture magnification filter should be modified. */\n int GL_TEXTURE_MAG_FILTER = 0x2800;\n /** Indicates that the texture minification filter should be modified. */\n int GL_TEXTURE_MIN_FILTER = 0x2801;\n /** The 0th texture location. */\n int GL_TEXTURE0 = 0x84C0;\n\n /**\n * Checks whether the application is on desktop or Android.\n * @return True if the application is on desktop, false if on Android.\n */\n boolean isDesktopGL();\n\n /**\n * Sets the active texture index.\n * @param texture The active texture index.\n */\n void glActiveTexture(int texture);\n\n /**\n * Attaches a shader to a shader program.\n * @param program The program to attach the shader to.\n * @param shader The shader to attach to the program.\n */\n void glAttachShader(int program, int shader);\n\n /**\n * Binds a texture to a texture index.\n * @param target The texture index to bind to.\n * @param texture The texture to bind.\n */\n void glBindTexture(int target, int texture);\n\n /**\n * Sets the background color.\n * @param mask A bitmask containing the background color.\n */\n void glClear(int mask);\n\n /**\n * Sets the background color.\n * @param red The red component of the color.\n * @param green The green component of the color.\n * @param blue The blue component of the color.\n * @param alpha The alpha component of the color.\n */\n void glClearColor(float red, float green, float blue, float alpha);\n\n /**\n * Compiles a shader.\n * @param shader The shader to compile.\n */\n void glCompileShader(int shader);\n\n /**\n * Creates a shader program.\n * @return The created shader program.\n */\n int glCreateProgram();\n\n /**\n * Initializes a shader.\n * @param type The type of shader to initialize.\n * @return The initialized shader.\n */\n int glCreateShader(int type);\n\n /**\n * Disables a vertex attribute.\n * @param index The vertex attribute to disable.\n */\n void glDisableVertexAttribArray(int index);\n\n /**\n * Draws vertices on the screen.\n * @param mode The drawing mode to use.\n * @param count The number of vertices to draw.\n * @param type The primitive data type of the vertices.\n * @param indices The vertices to draw.\n * @param bufferIndex The index of the buffer handle to use.\n * @param bufferSize The size of the triangle buffer.\n */\n void glDrawElements(int mode, int count, int type,\n Buffer indices, int bufferIndex, int bufferSize);\n\n /**\n * Enables a vertex attribute.\n * @param index The vertex attribute to enable.\n */\n void glEnableVertexAttribArray(int index);\n\n /**\n * Generates textures in a given array.\n * @param n The number of textures to generate.\n * @param textures The array to generate textures in.\n * @param offset The offset for the starting position in the array to generate textures at.\n */\n void glGenTextures(int n, int[] textures, int offset);\n\n /**\n * Gets a shader attribute.\n * @param program The program to get the shader attribute from.\n * @param name The name of the shader attribute to get.\n * @return The specified shader attribute.\n */\n int glGetAttribLocation(int program, String name);\n\n /**\n * Gets a uniform shader attribute.\n * @param program The program to get the shader attribute from.\n * @param name The name of the uniform shader attribute to get.\n * @return The specified uniform shader attribute.\n */\n int glGetUniformLocation(int program, String name);\n\n /**\n * Links a shader program to OpenGL.\n * @param program The program to link.\n */\n void glLinkProgram(int program);\n\n /**\n * Loads shader code into a shader.\n * @param shader The shader to load code into.\n * @param string The shader code to load.\n */\n void glShaderSource(int shader, String string);\n\n /**\n * Sets the texture paramters for OpenGL.\n * @param target The type of the currently active texture.\n * @param pname The parameter to set.\n * @param param The value to set the parameter to.\n */\n void glTexParameteri(int target, int pname, int param);\n\n /**\n * Sets a uniform shader attribute.\n * @param location The attribute to set.\n * @param x The value to set the attribute to.\n */\n void glUniform1i(int location, int x);\n\n /**\n * Sets a uniform shader attribute.\n * @param location The attribute to set.\n * @param count The number of elements in the new value.\n * @param v The value to set the attribute to.\n * @param offset The offset of the starting index to set.\n */\n void glUniform4fv(int location, int count, float[] v, int offset);\n\n /**\n * Sets a matrix attribute.\n * @param location The matrix attribute to set.\n * @param count The number of elements in the array of matrices.\n * @param transpose Whether to transpose the matrix.\n * @param value The value to set the matrix to.\n * @param offset The offset of the starting index to set in the array of matrices.\n */\n void glUniformMatrix4fv(int location, int count, boolean transpose,\n float[] value, int offset);\n\n /**\n * Sets a shader program to be used by OpenGL.\n * @param program The program to use.\n */\n void glUseProgram(int program);\n\n /**\n * Sets the initial vertices in the vertex shader.\n * @param indx The vertex attribute to use.\n * @param size The number of coordinates per vertex.\n * @param type The type of primitive that the vertices are stored as.\n * @param normalized Whether the vertices are normalized.\n * @param stride The number of bytes per vertex.\n * @param ptr The vertex array.\n * @param bufferIndex The index of the buffer handle to use.\n * @param bufferSize The size of the vertex array in bytes.\n */\n void glVertexAttribPointer(int indx, int size, int type, boolean normalized,\n int stride, Buffer ptr, int bufferIndex, int bufferSize);\n\n /**\n * Sets the viewport of the camera.\n * @param x The x coordinate of the viewport's center.\n * @param y The y coordinate of the viewport's center.\n * @param width The width of the viewport.\n * @param height The height of the viewport.\n */\n void glViewport(int x, int y, int width, int height);\n\n /**\n * Loads a texture into OpenGL.\n * @param target The texture to load the bitmap to.\n * @param level The detail level of the image.\n * @param resourceId The image file to load from\n * @param border 0.\n */\n void texImage2D(int target, int level, int resourceId, int border);\n\n /**\n * Cleans up OpenGL after closing the desktop application.\n */\n void exit(int vertexShader, int fragmentShader);\n}", "@Override\n\tpublic void onSurfaceCreated(GL10 gl, EGLConfig config) {\n\t\tgl.glClearColor(0,0,0,1); \n\t\t//enable vertex array for vertex pointer\n\t\tgl.glEnableClientState(GL10.GL_VERTEX_ARRAY); \n\t\t//enable normal array\n\t\tgl.glEnableClientState(GL10.GL_NORMAL_ARRAY);\n\t\t//enable DepthTest\n\t\tgl.glEnable(GL10.GL_DEPTH_TEST); \n\t\t//enable Blend\n\t\tgl.glEnable(GL10.GL_BLEND);\n\t\t//set blend function\n\t\tgl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);\n\t\t//Gen texture\n\t\t//initialize array\n\t\tint textureIds[] = new int[1];\n\t\t//generate 1 texture return handle to textureIds\n\t\tgl.glGenTextures(1, textureIds, 0);\n\t\t//get handle from array to an int\n\t\ttextureId = textureIds[0];\n\t\t//bind using array\n\t\tgl.glBindTexture(GL10.GL_TEXTURE_2D, textureId);\n\t\t//copy image pixels data to texture buffer on video mem\n\t\tGLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);\n\t\t//filter for minif\n\t\tgl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);\n\t\t//filter for magnif\n\t\tgl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_NEAREST);\n\t\t//unbind texture buffer\n\t\tgl.glBindTexture(GL10.GL_TEXTURE_2D, 0);\n\t\t//bitmap.recycle(); just if not used anymore \n\t}", "private void init(Context context) {\n setEGLContextClientVersion(3);\n\n mRenderer = new MyGLRenderer(context);\n\n // Set the Renderer for drawing on the GLSurfaceView\n setRenderer(mRenderer);\n// setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);\n }", "@Override\n\tpublic void onSurfaceCreated(GL10 gl, EGLConfig config) {\n\t\tLibNative.init();\n\t}", "@Override\n public void onSurfaceCreated(GL10 gl, EGLConfig config) {\n gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Set color's clear-value to black\n gl.glClearDepthf(1.0f); // Set depth's clear-value to farthest\n gl.glEnable(GL10.GL_DEPTH_TEST); // Enables depth-buffer for hidden surface removal\n gl.glDepthFunc(GL10.GL_LEQUAL); // The type of depth testing to do\n gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST); // nice perspective view\n gl.glShadeModel(GL10.GL_SMOOTH); // Enable smooth shading of color\n gl.glDisable(GL10.GL_DITHER); // Disable dithering for better performance\n \n // You OpenGL|ES initialization code here\n\n \n \n }", "public void onSurfaceCreated(int vertexShader, int gridShader, int passthroughShader) {\r\n \tstuff();\r\n program = GLES20.glCreateProgram();\r\n GLES20.glAttachShader(program, vertexShader);\r\n if (this instanceof GLSelectableObject) {\r\n GLES20.glAttachShader(program, passthroughShader);\r\n } else {\r\n GLES20.glAttachShader(program, gridShader);\r\n }\r\n GLES20.glLinkProgram(program);\r\n GLES20.glUseProgram(program);\r\n\r\n checkGLError(\"Floor program\");\r\n\r\n modelParam = GLES20.glGetUniformLocation(program, \"u_Model\");\r\n modelViewParam = GLES20.glGetUniformLocation(program, \"u_MVMatrix\");\r\n modelViewProjectionParam = GLES20.glGetUniformLocation(program, \"u_MVP\");\r\n lightPosParam = GLES20.glGetUniformLocation(program, \"u_LightPos\");\r\n\r\n positionParam = GLES20.glGetAttribLocation(program, \"a_Position\");\r\n normalParam = GLES20.glGetAttribLocation(program, \"a_Normal\");\r\n colorParam = GLES20.glGetAttribLocation(program, \"a_Color\");\r\n\r\n GLES20.glEnableVertexAttribArray(positionParam);\r\n GLES20.glEnableVertexAttribArray(normalParam);\r\n GLES20.glEnableVertexAttribArray(colorParam);\r\n\r\n checkGLError(\"Floor program params\");\r\n Matrix.setIdentityM(model, 0);\r\n Matrix.translateM(model, 0, -xPos, -yPos, -zPos); // Floor appears\r\n // below user.\r\n\r\n }", "@Override\n public void onSurfaceCreated(GL10 unused, EGLConfig config) {\n GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\n \n // initialize a triangle\n mTriangle = new Triangle();\n // initialize a rect\n mRect = new Rect(mContext.getResources());\n\n mPicture = new Picture(mContext.getResources());\n mBlackAndWhitePicture = new BlackAndWhitePicture(mContext.getResources());\n }", "@Override\n public void onSurfaceCreated(GL10 gl, EGLConfig config) {\n Log.i(\"kike\", \"onSurfaceCreated\");\n }", "@Override\n public void onSurfaceCreated(GL10 unused, javax.microedition.khronos.egl.EGLConfig config) {\n GLES20.glClearColor(Player.colorBG[0], Player.colorBG[1], Player.colorBG[2], 1.0f);\n // initialize a triangle\n mHat = new Hat();\n robe = new Robe();\n // initialize a square\n mSquare = new Square(Player.PLAYER_ONE);\n mHat2 = new Hat();\n robe2 = new Robe();\n // initialize a square\n mSquare2 = new Square(Player.PLAYER_TWO);\n\n\n\n float[] colorWhite = {1f, 1f, 1f, 1.0f};\n p1Eye = new Circle(colorWhite);\n p2Eye = new Circle(colorWhite);\n\n }", "@Override\n public void onSurfaceCreated(EGLConfig config) {\n Log.i(TAG, \"onSurfaceCreated\");\n GLES20.glClearColor(0.1f, 0.1f, 0.1f, 0.5f); // Dark background so text shows up well\n\n ByteBuffer bb = ByteBuffer.allocateDirect(squareVertices.length * 4);\n bb.order(ByteOrder.nativeOrder());\n vertexBuffer = bb.asFloatBuffer();\n vertexBuffer.put(squareVertices);\n vertexBuffer.position(0);\n\n ByteBuffer dlb = ByteBuffer.allocateDirect(drawOrder.length * 2);\n dlb.order(ByteOrder.nativeOrder());\n drawListBuffer = dlb.asShortBuffer();\n drawListBuffer.put(drawOrder);\n drawListBuffer.position(0);\n\n ByteBuffer bb2 = ByteBuffer.allocateDirect(textureVertices.length * 4);\n bb2.order(ByteOrder.nativeOrder());\n textureVerticesBuffer = bb2.asFloatBuffer();\n textureVerticesBuffer.put(textureVertices);\n textureVerticesBuffer.position(0);\n\n int vertexShader = loadGLShader(GLES20.GL_VERTEX_SHADER, vertexShaderCode);\n int fragmentShader = loadGLShader(GLES20.GL_FRAGMENT_SHADER, fragmentShaderCode);\n\n mProgram = GLES20.glCreateProgram(); // create empty OpenGL ES Program\n GLES20.glAttachShader(mProgram, vertexShader); // add the vertex shader to program\n GLES20.glAttachShader(mProgram, fragmentShader); // add the fragment shader to program\n GLES20.glLinkProgram(mProgram);\n\n texture = createTexture();\n startCamera(texture);\n }", "public void onSurfaceCreated(GL10 gl, EGLConfig config) {\n\t\tLog.d(LOG_TAG, \"onSurfaceCreated()\");\r\n\t\tsetGL(gl);\r\n\t\tinitOpenGL(gl);\r\n\t\tinitTrackball();\r\n//\t\tupdateData(gl);\r\n\t}", "public void onSurfaceCreated(GL10 gl, EGLConfig config) {\n gl.glDisable(GL10.GL_DITHER);\n\n /*\n * Some one-time OpenGL initialization can be made here\n * probably based on features of this particular context\n */\n gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT,\n GL10.GL_FASTEST);\n\n float ratio = (float) width / height;\n gl.glMatrixMode(GL10.GL_PROJECTION);\n gl.glLoadIdentity();\n gl.glFrustumf(-ratio, ratio, -1, 1, 1, 10);\n\n if (mTranslucentBackground) {\n gl.glClearColor(0,0,0,0);\n } else {\n gl.glClearColor(0.07f, 0.639f, 0.7f, 1f);\n }\n gl.glMatrixMode(GL10.GL_MODELVIEW);\n gl.glEnable(GL10.GL_CULL_FACE);\n gl.glShadeModel(GL10.GL_FLAT);\n gl.glLineWidth(2f);\n\n //lighting\n // Define the ambient component of the first light\n gl.glEnable(GL10.GL_LIGHTING);\n gl.glEnable(GL10.GL_LIGHT0);\n gl.glEnable(GL10.GL_LIGHT1);\n gl.glEnable(GL10.GL_LIGHT2);\n\n float lightColor[] = {0.07f, 0.639f, 0.7f, 1f};\n FloatBuffer light0Ambient = FloatBuffer.wrap(lightColor);\n float light1PositionVector[] = {1f, 0f, 0f, 0f};\n FloatBuffer light1Position = FloatBuffer.wrap(light1PositionVector);\n float light2PositionVector[] = {-1f, 0f, 0f, 0f};\n FloatBuffer light2Position = FloatBuffer.wrap(light2PositionVector);\n\n gl.glLightfv(GL10.GL_LIGHT1, GL10.GL_AMBIENT, light0Ambient);\n gl.glLightfv(GL10.GL_LIGHT1, GL10.GL_POSITION, light1Position);\n gl.glLightfv(GL10.GL_LIGHT2, GL10.GL_AMBIENT, light0Ambient);\n gl.glLightfv(GL10.GL_LIGHT2, GL10.GL_POSITION, light2Position);\n }", "@Override\n\tpublic void onSurfaceCreated(GL10 gl, EGLConfig config) {\n Bitmap bm = this.getDrawingBitmap();\n\n\t\tsquare.loadGLTexture(gl, this.context, bm);\n\t\t\n\t\tgl.glEnable(GL10.GL_TEXTURE_2D);\t\t\t//Enable Texture Mapping ( NEW )\n\t\tgl.glShadeModel(GL10.GL_SMOOTH); \t\t\t//Enable Smooth Shading\n\t\tgl.glClearColor(0.0f, 0.0f, 0.0f, 0.5f); \t//Black Background\n\t\tgl.glClearDepthf(1.0f); \t\t\t\t\t//Depth Buffer Setup\n\t\tgl.glEnable(GL10.GL_DEPTH_TEST); \t\t\t//Enables Depth Testing\n\t\tgl.glDepthFunc(GL10.GL_LEQUAL); \t\t\t//The Type Of Depth Testing To Do\n\t\t\n\t\t//Really Nice Perspective Calculations\n\t\tgl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST); \n\n\t}", "private void initGL() {\n\t\ttry {\n\t\t\tDisplay.setDisplayMode(new DisplayMode(displayWidth, displayHeight));\n\t\t\tDisplay.setVSyncEnabled(true);\n\t\t\tDisplay.setTitle(\"Shooter\");\n\t\t\tDisplay.create();\n\t\t} catch (LWJGLException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t\n\t\t// init OpenGL\n\t\tglEnable(GL_TEXTURE_2D);\n\t\t\n\t\tglClearColor(0.0f, 0.0f, 0.0f, 0.0f);\n\t\t\n\t\t// enable alpha blending\n\t\tglEnable(GL_BLEND);\n\t\tglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\n\t\t\n\t\tglViewport(0, 0, displayWidth, displayHeight);\n\t\t\n\t\tglMatrixMode(GL_PROJECTION);\n\t\tglLoadIdentity();\n\t\tglOrtho(0, displayWidth, displayHeight, 0, 1, -1);\n\t\tglMatrixMode(GL_MODELVIEW);\n\t}", "@Override\r\n\tpublic void onSurfaceCreated(GL10 gl, EGLConfig config) {\n\r\n\t\tgl.glDisable(GL10.GL_DITHER);\r\n\t\tgl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\r\n\t\tgl.glEnable(GL10.GL_DEPTH_TEST);\r\n\t\tgl.glDepthFunc(GL10.GL_LEQUAL);\r\n\t\tgl.glClearDepthf(1f);\r\n\t}", "@Override\r\n\tpublic void init(GL10 gl, EGLConfig config) {\n try {\r\n loadGLTextures(gl);\t\t\t\t\t\t\t\t\t\t// Jump To Texture Loading Routine ( NEW )\r\n } catch (IOException e) {\r\n \tLog.e(\"120\", \"An error occured!\");\r\n e.printStackTrace();\r\n }\r\n\r\n gl.glEnable(GL10.GL_TEXTURE_2D);\t\t\t\t\t\t\t\t\t// Enable Texture Mapping ( NEW )\r\n gl.glShadeModel(GL10.GL_SMOOTH);\t\t\t\t\t\t\t\t\t// Enable Smooth Shading\r\n gl.glClearColor(0.0f, 0.0f, 0.0f, 0.5f);\t\t\t\t\t\t// Black Background\r\n gl.glClearDepthf(1.0f);\t\t\t\t\t\t\t\t\t\t\t// Depth Buffer Setup\r\n gl.glEnable(GL10.GL_DEPTH_TEST);\t\t\t\t\t\t\t\t\t// Enables Depth Testing\r\n gl.glDepthFunc(GL10.GL_LEQUAL);\t\t\t\t\t\t\t\t\t\t// The Type Of Depth Testing To Do\r\n gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST);\t\t\t// Really Nice Perspective Calculations\r\n\t}", "public void onSurfaceCreated(GL10 gl, EGLConfig config) {\n gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\n \n bgTex = new Texture(gl);\n bgTex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.game_bg));\n playerTex = new Texture(gl);\n playerTex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.player));\n scoreTex = new Texture(gl);\n scoreTex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.score));\n enemyTex = new Texture(gl);\n enemyTex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.enemy));\n invincTex = new Texture(gl);\n invincTex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.invincible));\n slowmoTex = new Texture(gl);\n slowmoTex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.slowdown));\n minisquareTex = new Texture(gl);\n minisquareTex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.smallsquare));\n plus1000Tex = new Texture(gl);\n plus1000Tex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.plus1000));\n evilTex = new Texture(gl);\n evilTex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.evil));\n speedTex = new Texture(gl);\n speedTex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.speedup));\n bigsquareTex = new Texture(gl);\n bigsquareTex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.bigsquare));\n minus1000Tex = new Texture(gl);\n minus1000Tex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.minus1000));\n }", "@Override\n\tpublic void onSurfaceCreated(GL10 gl,EGLConfig config){\n\t\t//OpenGL-ES version check\n\t\tString glesVersion = gl.glGetString(GL10.GL_VERSION);\n\t\tSystem.out.println(\"RTR:\" + glesVersion);\n\t\t\n\t\tString glslVersion = gl.glGetString(GLES32.GL_SHADING_LANGUAGE_VERSION);\n\t\tSystem.out.println(\"RTR: Shading lang version:\"+ glslVersion);\n\t\t\n\t\tinitialize(gl);\n\t}", "public void onSurfaceCreated(GL10 gl, EGLConfig config)\r\n {\r\n DebugLog.LOGD(\"GLRenderer::onSurfaceCreated\");\r\n \r\n // Call native function to initialize rendering:\r\n initRendering();\r\n \r\n // Call QCAR function to (re)initialize rendering after first use\r\n // or after OpenGL ES context was lost (e.g. after onPause/onResume):\r\n QCAR.onSurfaceCreated();\r\n \r\n // Call native function to store information about the Java environment\r\n // It is important that we make this call from this thread (the rendering thread)\r\n // as the native code will want to make callbacks from this thread\r\n initNativeCallback();\r\n }", "public void previewOglRender();", "@Override\n public void onSurfaceCreated(GL10 glUnused, EGLConfig config) {\n glClearColor(0.0f, 0.0f, 0.0f, 0.0f);\n \n String vertexShaderSource = TextResourceReader.readTextFileFromResource(context, R.raw.simple_vertex_shader);\n String fragmentShaderSource = TextResourceReader.readTextFileFromResource(context, R.raw.simple_fragment_shader);\n \n int vertexShaderId = ShaderHelper.compileVertexShader(vertexShaderSource);\n int fragmentShaderId = ShaderHelper.compileFragmentShader(fragmentShaderSource);\n \n program = ShaderHelper.linkProgram(vertexShaderId, fragmentShaderId);\n \n if(LoggerConfig.ON){\n \tShaderHelper.validateProgram(program);\n }\n glUseProgram(program);\n uColorLocation = glGetUniformLocation(program, U_COLOR);\n aPositionLocation = glGetAttribLocation(program, A_POSITION);\n \n vertexData.position(0);\n glVertexAttribPointer(aPositionLocation, POSITION_COMPONENT_COUNT, GL_FLOAT, false, 0, vertexData);\n glEnableVertexAttribArray(aPositionLocation); \n }", "@Override\n public void onSurfaceCreated(final GL10 gl, final EGLConfig config) {\n this.gl = gl;\n\n if(mMoon != null){\n this.mMoon.loadGLTexture(gl, this.mContext, R.drawable.moon);\n } else if(mEarth != null){\n this.mEarth.loadGLTexture(gl, this.mContext, R.drawable.earth);\n } else if(mMars != null){\n this.mMars.loadGLTexture(gl, this.mContext, R.drawable.mars_map);\n } else if(mJupiter != null){\n this.mJupiter.loadGLTexture(gl, this.mContext, R.drawable.jupiter_map);\n } else if(mVenus != null){\n this.mVenus.loadGLTexture(gl, this.mContext, R.drawable.venus_map);\n } else if(mNeptune != null){\n this.mNeptune.loadGLTexture(gl, this.mContext, R.drawable.neptune_map);\n } else if(mSun != null){\n this.mSun.loadGLTexture(gl, this.mContext, R.drawable.sun);\n } else if(mSaturn != null){\n this.mSaturn.loadGLTexture(gl, this.mContext, R.drawable.saturn_map);\n } else if(mMercury != null){\n this.mMercury.loadGLTexture(gl, this.mContext, R.drawable.mercury_map);\n } else if(mUran != null){\n this.mUran.loadGLTexture(gl, this.mContext, R.drawable.uranus_map);\n }\n\n gl.glEnable(GL10.GL_TEXTURE_2D);\n gl.glShadeModel(GL10.GL_SMOOTH);\n gl.glClearColor(CLEAR_RED, CLEAR_GREEN, CLEAR_BLUE, CLEAR_ALPHA);\n gl.glClearDepthf(1.0f);\n gl.glEnable(GL10.GL_DEPTH_TEST);\n gl.glDepthFunc(GL10.GL_LEQUAL);\n gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST);\n }", "public void onSurfaceCreated(GL10 glUnused, EGLConfig config) {\n\t\tGLES20.glBlendFunc(GLES20.GL_SRC_ALPHA, GLES20.GL_ONE_MINUS_SRC_ALPHA);\n\t\tmVertexShader = RawResourceReader.readTextFileFromRawResource(mContext,\n\t\t\t\tde.moliso.shelxle.R.raw.atoms_vetrex_shader);\n\t\tmFragmentShader = RawResourceReader.readTextFileFromRawResource(\n\t\t\t\tmContext, de.moliso.shelxle.R.raw.atoms_fragment_shader);\n\n\t\tmProgram = createProgram(mVertexShader, mFragmentShader);\n\t\tif (mProgram == 0) {\n\t\t\treturn;\n\t\t}\n\t\ttry{\n\t\t\tversionName = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0).versionName;\n\t\t}catch (NameNotFoundException e){\n\t\t\t//wurst\n\t\t}\n\t\ttexturH = GLES20.glGetUniformLocation(mProgram, \"text\");\n\t\tellipsoidH = GLES20.glGetUniformLocation(mProgram, \"eli\");\n\t\tlichtH = GLES20.glGetUniformLocation(mProgram, \"lighting\");\n\n\t\tvertexAttr1 = GLES20.glGetAttribLocation(mProgram, \"vertex\");\n\n\t\tnormalAttr1 = GLES20.glGetAttribLocation(mProgram, \"normal\");\n\t\tmatrixUniform1 = GLES20.glGetUniformLocation(mProgram, \"matrix\");\n\t\tinvmatrixUniform1 = GLES20.glGetUniformLocation(mProgram, \"invmatrix\");\n\t\tcolorUniform1 = GLES20.glGetUniformLocation(mProgram, \"col\");\n\n\t\tmTextureLoc = GLES20.glGetUniformLocation(mProgram, \"textureSampler\");\n\t\tMatrix.setIdentityM(mv, 0);\n\t\tMatrix.scaleM(mv, 0, 9.0f, 9.0f, 9.0f);\n\n\t\t// Matrix.setLookAtM(mVMatrix, 0, 0, 0, -5, 0f, 0f, 0f, 0f, 1.0f, 0.0f);\n\n\t}", "private void init()\n {\n holder = getHolder();\n holder.addCallback(this);\n holder.setType(SurfaceHolder.SURFACE_TYPE_GPU);\n }", "abstract public void init(GL gl);", "private native static void initSurface(long instance, long avi);", "private void initOpenGlView() {\n setEGLContextClientVersion(2);\n setPreserveEGLContextOnPause(true);\n System.out.println(\"************************************************************* init OpenGlView ********************\");\n// setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);\n// setEGLConfigChooser(8, 8, 8, 8, 0, 0); // added 10.05\n// getHolder().setFormat(PixelFormat.TRANSLUCENT); // // added 10.05\n }", "public native void Initialize(Surface surface);", "public static void init() {\n // init quad VAO\n vao = glGenVertexArrays();\n glBindVertexArray(vao);\n int positionVbo = glGenBuffers();\n FloatBuffer fb = BufferUtils.createFloatBuffer(2 * 4);\n fb.put(0.0f).put(0.0f);\n fb.put(1.0f).put(0.0f);\n fb.put(1.0f).put(1.0f);\n fb.put(0.0f).put(1.0f);\n fb.flip();\n glBindBuffer(GL_ARRAY_BUFFER, positionVbo);\n glBufferData(GL_ARRAY_BUFFER, fb, GL_STATIC_DRAW);\n glVertexAttribPointer(Main.shader.inPositionLoc, 2, GL_FLOAT, false, 0, 0L);\n glEnableVertexAttribArray(Main.shader.inPositionLoc);\n glBindBuffer(GL_ARRAY_BUFFER, 0);\n glBindVertexArray(0);\n \n // init texture\n IntBuffer width = BufferUtils.createIntBuffer(1);\n IntBuffer height = BufferUtils.createIntBuffer(1);\n IntBuffer components = BufferUtils.createIntBuffer(1);\n byte[] dataArr = Main.loadResource(\"resources/font DF.png\");\n ByteBuffer data = BufferUtils.createByteBuffer(dataArr.length);\n data.put(dataArr).rewind();\n data = Objects.requireNonNull(stbi_load_from_memory(data, width, height, components, 1));\n int imgWidth = width.get();\n int imgHeight = height.get();\n charWidth = imgWidth / 16;\n charHeight = imgHeight / 16;\n \n texture = glGenTextures();\n glBindTexture(GL_TEXTURE_2D, texture);\n glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\n glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);\n glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, imgWidth, imgHeight, 0, GL_RED, GL_UNSIGNED_BYTE, data);\n stbi_image_free(data);\n \n // set texScale uniform\n glUniform2f(Main.shader.texScaleLoc, 1/16f, 1/16f);\n }", "@Override\n public void onSurfaceCreated(final GL10 pGL10, final EGLConfig pEGLConfig) {\n\n\n\n Moin2dJni.init(this.mScreenWidth, this.mScreenHeight);\n this.mLastTickInNanoSeconds = System.nanoTime();\n\n if(mlogic != null)\n {\n mlogic.onCreate();\n }\n\n }", "@Override\n\tpublic void onSurfaceCreated(GL10 gl, EGLConfig arg1) {\n\t\tcirculo = new Circulo(0.8f, 360, false);\n\t\tcruz = new cruz();\n\t\tray = new ray();\n\t\tgl.glClearColor(235f / 255, 124f / 255, 20f / 255, 0); // color de fondo\n\t}", "public void init(GL2 gl) {\n\t}", "@Override\n\tpublic void initCameraGlSurfaceView() {\n\t\t\n\t}", "public void onSurfaceCreated(EGLConfig config) {\r\n Log.i(TAG, \"onSurfaceCreated\");\r\n GLES20.glClearColor(0.8f, 0.8f, 0.8f, 0.5f); // Dark background so text\r\n // shows up well.\r\n\r\n vertexShader = loadGLShader(GLES20.GL_VERTEX_SHADER, R.raw.light_vertex);\r\n gridShader = loadGLShader(GLES20.GL_FRAGMENT_SHADER, R.raw.grid_fragment);\r\n passthroughShader = loadGLShader(GLES20.GL_FRAGMENT_SHADER, R.raw.passthrough_fragment);\r\n\r\n\r\n for (GLSelectableObject cube : cubes) {\r\n cube.onSurfaceCreated(vertexShader, gridShader, passthroughShader);\r\n }\r\n\r\n floor.onSurfaceCreated(vertexShader, gridShader, passthroughShader);\r\n GLES20.glEnable(GLES20.GL_DEPTH_TEST);\r\n\r\n checkGLError(\"onSurfaceCreated\");\r\n }", "public GLRenderer(Context context){\n\n lastTime=System.currentTimeMillis();\n mCuboid=new ndCuboid();\n\n\n }", "void createDummyPbufferSurface();", "GlprotoFactory getGlprotoFactory();", "private void mkMesh()\n\t{\n\t\t/* this initialises the the two FloatBuffer objects */\n\t\n\t\tfloat vertices[] = {\n\t\t\t-0.5f, -0.5f, 0.0f,\t\t// V1 - bottom left\n\t\t\t-0.5f, 0.5f, 0.0f,\t\t// V2 - top left\n\t\t\t 0.5f, -0.5f, 0.0f,\t\t// V3 - bottom right\n\t\t\t 0.5f, 0.5f, 0.0f\t\t\t// V4 - top right\n\t\t\t};\n\t\tfloat texture[] = { \t\t\n\t\t\t// Mapping coordinates for the vertices\n\t\t\t0.0f, 1.0f,\t\t// top left\t\t(V2)\n\t\t\t0.0f, 0.0f,\t\t// bottom left\t(V1)\n\t\t\t1.0f, 1.0f,\t\t// top right\t(V4)\n\t\t\t1.0f, 0.0f\t\t// bottom right\t(V3)\n\t\t\t};\n\t\t/* cache the number of floats in the vertices data */\n\t\tvertexCount = vertices.length;\n\t\t\n\t\t// a float has 4 bytes so we allocate for each coordinate 4 bytes\n\t\tByteBuffer byteBuffer = ByteBuffer.allocateDirect(vertices.length * 4);\n\t\tbyteBuffer.order(ByteOrder.nativeOrder());\n\t\t\n\t\t// allocates the memory from the byte buffer\n\t\tvertexBuffer = byteBuffer.asFloatBuffer();\n\t\t\n\t\t// fill the vertexBuffer with the vertices\n\t\tvertexBuffer.put(vertices);\n\t\t\n\t\t// set the cursor position to the beginning of the buffer\n\t\tvertexBuffer.position(0);\n\t\t\n\t\tbyteBuffer = ByteBuffer.allocateDirect(texture.length * 4);\n\t\tbyteBuffer.order(ByteOrder.nativeOrder());\n\t\ttextureBuffer = byteBuffer.asFloatBuffer();\n\t\ttextureBuffer.put(texture);\n\t\ttextureBuffer.position(0);\n\t}", "public void onSurfaceCreated(GL10 unused, EGLConfig config)\n {\n GLES20.glClearColor(1.0f, 0.2f, 0.2f, 1.0f);\n //mSquare = ne\n bigStar = new Star(0.2f);\n //bigStar.setColor(0,0,1,0.5f);\n for (int i = 0; i < instantiateNumber; i++)\n {\n symbols.add(new Star(0.1f));\n //symbols.get(i).setColor(0, (i * 0.015f),0);\n trail.add(new Vec2(0,0));\n }\n }", "private void initOpenGL(){\n\t\tcaps = GL.createCapabilities();\n\t\tglViewport(0,0,WIDTH,HEIGHT);\n\t\tif(caps.OpenGL44)System.out.println(\"All OK\");\n\t\tglEnable(GL_DEPTH_TEST);\n\t\t//glPolygonMode(GL_BACK, GL_LINE);\n\t\tglClearColor(0.0f, 0.0f, 0.0f, 0.0f);\n\t}", "public void onSurfaceCreated(GL10 gl, EGLConfig config)\n {\n // Call native function to initialize rendering:\n initRendering();\n\n // Call QCAR function to (re)initialize rendering after first use\n // or after OpenGL ES context was lost (e.g. after onPause/onResume):\n QCAR.onSurfaceCreated();\n }", "public void createBufferObjects(GL gl) {\n int[] vboIds = new int[2];\r\n GL11 gl11 = (GL11) gl;\r\n gl11.glGenBuffers(2, vboIds, 0);\r\n mVertexBufferObjectId = vboIds[0];\r\n mElementBufferObjectId = vboIds[1];\r\n\r\n // Upload the vertex data\r\n gl11.glBindBuffer(GL11.GL_ARRAY_BUFFER, mVertexBufferObjectId);\r\n mVertexByteBuffer.position(0);\r\n gl11.glBufferData(GL11.GL_ARRAY_BUFFER, mVertexByteBuffer.capacity(), mVertexByteBuffer, GL11.GL_STATIC_DRAW);\r\n\r\n gl11.glBindBuffer(GL11.GL_ELEMENT_ARRAY_BUFFER, mElementBufferObjectId);\r\n mIndexBuffer.position(0);\r\n gl11.glBufferData(GL11.GL_ELEMENT_ARRAY_BUFFER, mIndexBuffer.capacity() * CHAR_SIZE, mIndexBuffer, GL11.GL_STATIC_DRAW);\r\n\r\n // We don't need the in-memory data any more\r\n mVertexBuffer = null;\r\n mVertexByteBuffer = null;\r\n mIndexBuffer = null;\r\n }", "public void onSurfaceCreated( GL10 gl, EGLConfig config ) {\n\t\tgl.glClearColor(0.0f, 0.0f, 0.0f, 0.5f); \n\n\t\tgl.glClearDepthf(1.0f);\n\t\tgl.glEnable(GL10.GL_DEPTH_TEST);\n\t\tgl.glDepthFunc(GL10.GL_LEQUAL);\n\n\t\tgl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT,\n\t\t\t\tGL10.GL_NICEST);\n\t}", "public interface RendererListener\n{\n public void onSurfaceCreated(final GLState pGlState);\n public void onSurfaceChanged(final GLState pGlState, final int pWidth, final int pHeight);\n}", "private native void nativeSurfaceInit(Object surface);", "public static void create() {\n SharedLibrary EGL;\n switch (Platform.get()) {\n case LINUX:\n EGL = Library.loadNative(EGL.class, \"org.lwjgl.egl\", Configuration.EGL_LIBRARY_NAME, \"libEGL.so.1\");\n break;\n case MACOSX:\n EGL = Library.loadNative(EGL.class, \"org.lwjgl.egl\", Configuration.EGL_LIBRARY_NAME, \"EGL\");\n break;\n case WINDOWS:\n EGL = Library.loadNative(EGL.class, \"org.lwjgl.egl\", Configuration.EGL_LIBRARY_NAME, \"libEGL\", \"EGL\");\n break;\n default:\n throw new IllegalStateException();\n }\n create(EGL);\n }", "public void setupOpenGL() {\n try {\n PixelFormat pixelFormat = new PixelFormat();\n ContextAttribs contextAtrributes = new ContextAttribs(3, 2)\n .withForwardCompatible(true)\n .withProfileCore(true);\n\n DisplayMode displayMode = new DisplayMode(WIDTH, HEIGHT);\n Display.setDisplayMode(displayMode);\n Display.setTitle(WINDOW_TITLE);\n Display.create(pixelFormat, contextAtrributes);\n\n GL11.glEnable(GL11.GL_DEPTH_TEST);\n GL11.glDepthFunc(GL11.GL_LEQUAL);\n\n GL11.glViewport(0, 0, WIDTH, HEIGHT);\n } catch (LWJGLException e) {\n e.printStackTrace();\n System.exit(-1);\n }\n\n // Setup an XNA like background color\n GL11.glClearColor(0.4f, 0.6f, 0.9f, 0f);\n\n // Map the internal OpenGL coordinate system to the entire screen\n GL11.glViewport(0, 0, WIDTH, HEIGHT);\n\n this.exitOnGLError(\"Error in setupOpenGL\");\n }", "@Override\r\n public void surfaceCreated(SurfaceHolder holder) {\r\n Log.v(\"SDL\", \"surfaceCreated()\");\r\n holder.setType(SurfaceHolder.SURFACE_TYPE_GPU);\r\n }", "public void initEgl(Surface surface, EGLContext eglContext) {\n mEgl = (EGL10) EGLContext.getEGL();\n\n /*\n * Get to the default display.\n */\n mEglDisplay = mEgl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);\n\n if (mEglDisplay == EGL10.EGL_NO_DISPLAY) {\n throw new RuntimeException(\"eglGetDisplay failed(egl获取显示设备失败)\");\n }\n\n /*\n * We can now initialize EGL for that display\n * 初始化默认显示设备\n */\n int[] version = new int[2];\n if (!mEgl.eglInitialize(mEglDisplay, version)) {\n throw new RuntimeException(\"eglInitialize failed(初始化默认显示设备失败)\");\n }\n\n /**\n * 设置属性\n */\n\n int[] attribute = new int[]{\n EGL10.EGL_RED_SIZE, 8,\n EGL10.EGL_GREEN_SIZE, 8,\n EGL10.EGL_BLUE_SIZE, 8,\n EGL10.EGL_ALPHA_SIZE, 8,\n EGL10.EGL_DEPTH_SIZE, 8,//深度大小\n EGL10.EGL_STENCIL_SIZE, 8,//模板大小\n EGL10.EGL_RENDERABLE_TYPE, 4,//2.0版本 值为4\n EGL10.EGL_NONE //以此结尾\n };\n //5.\n int[] num_config = new int[1];\n if (!mEgl.eglChooseConfig(mEglDisplay, attribute, null, 1, num_config)) {\n throw new IllegalArgumentException(\"eglChooseConfig failed(从系统中获取对应的属性失败)\");\n }\n\n int numConfigs = num_config[0];\n\n if (numConfigs <= 0) {\n throw new IllegalArgumentException(\n \"No configs match configSpec(没有匹配到相应的属性)\");\n }\n\n EGLConfig[] configs = new EGLConfig[numConfigs];\n if (!mEgl.eglChooseConfig(mEglDisplay, attribute, configs, numConfigs,\n num_config)) {\n throw new IllegalArgumentException(\"eglChooseConfig#2 failed\");\n }\n\n\n //6,\n int[] attrib_list = {EGL14.EGL_CONTEXT_CLIENT_VERSION, 2,\n EGL10.EGL_NONE};\n\n\n if (eglContext != null) {\n //如果不是null,\n mEglContext = mEgl.eglCreateContext(mEglDisplay,\n configs[0], eglContext, attrib_list);\n } else {\n //如果是null,创建一个新的eglContext\n mEglContext = mEgl.eglCreateContext(mEglDisplay,\n configs[0], EGL10.EGL_NO_CONTEXT, attrib_list);\n }\n\n //7.\n mEglSurface = mEgl.eglCreateWindowSurface(mEglDisplay,\n configs[0],\n surface,\n null\n );\n\n if (mEglSurface == null || mEglSurface == EGL10.EGL_NO_SURFACE) {\n int error = mEgl.eglGetError();\n if (error == EGL10.EGL_BAD_NATIVE_WINDOW) {\n Log.e(\"EglHelper\", \"createWindowSurface returned EGL_BAD_NATIVE_WINDOW.(创建surface失败)\");\n }\n }\n\n //8\n\n\n if (!mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext)) {\n throw new IllegalArgumentException(\"eglMakeCurrent failed \" + mEgl.eglGetError());\n }\n\n }", "@Override\n\t\tpublic void onSurfaceCreated(GL10 unused, EGLConfig config)\n\t\t{\n\t\t\tupdateBackgroundColor();\n\n\t\t\t// Get pointers to the shaders.\n\t\t\tint vertexShader = renderer.loadShader(GLES20.GL_VERTEX_SHADER,\tGLProgram.vertexShaderCode);\n\t\t\tint fragmentShader = renderer.loadShader(GLES20.GL_FRAGMENT_SHADER,\tGLProgram.fragmentShaderCode);\n\n\t\t\t// Create a new OpenGL program.\n\t\t\tGLProgram.glProgram = GLES20.glCreateProgram();\n\n\t\t\t// Add a vertex shader.\n\t\t\tGLES20.glAttachShader(GLProgram.glProgram, vertexShader);\n\n\t\t\t// Add a fragment shader.\n\t\t\tGLES20.glAttachShader(GLProgram.glProgram, fragmentShader);\n\n\t\t\t// Compile the program.\n\t\t\tGLES20.glLinkProgram(GLProgram.glProgram);\n\n\t\t\t// Use it.\n\t\t\tGLES20.glUseProgram(GLProgram.glProgram);\n\n\t\t\t// Initialize the project if it hasn't been done already.\n\t\t\t// Use a posted Runnable since NotepadActivity.initProject() should run on the UI thread.\n\t\t\tif (project == null)\n\t\t\t{\n\t\t\t\tpost(new Runnable()\n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run()\n\t\t\t\t\t{\n\t\t\t\t\t\tproject = new Project();\n\t\t\t\t\t\tactivity.initProject();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}", "public MyGLRenderer(Context context, MyGLSurfaceView view) {\n this.view = view;\n this.context = context;\n // create model from specified .obj file\n model = new MyGLDrawModel(context, R.raw.step_00);\n }", "@Override\n\tpublic void init(GLAutoDrawable glDrawable) {\n\t\tGL2 gl = glDrawable.getGL().getGL2();\n\t\t\n\t\tint[] temp = new int[1];\n\t\tgl.glGetIntegerv(GL.GL_STENCIL_BITS, temp, 0);\n\t\t\n\t\t// set the matrix mode to projection\n\t\tgl.glMatrixMode(GL2.GL_PROJECTION);\n\t\t// initialize the matrix\n\t\tgl.glLoadIdentity();\n\t\t// set the view to a 2D view\n\t\tgl.glOrtho(-400, 400, -300, 300, 0, 1);\n\t\t\n\t\t// switch to the model view matrix\n\t\tgl.glMatrixMode(GL2.GL_MODELVIEW);\n\t\t// initialize the matrix\n\t\tgl.glLoadIdentity();\n\t\t\n\t\t// set the clear color to white\n\t\tgl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);\n\t\t// set the stencil clear value\n\t\tgl.glClearStencil(0);\n\t\t\n\t\t// disable depth testing since we are working in 2D\n\t\tgl.glDisable(GL.GL_DEPTH_TEST);\n\t\t// we dont need lighting either\n\t\tgl.glDisable(GL2.GL_LIGHTING);\n\t\t\n\t\t// enable blending for translucency\n\t\tgl.glEnable(GL.GL_BLEND);\n\t\tgl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);\n\t\t\t\t\n\t\t// set the swap interval to vertical-sync\n\t\tgl.setSwapInterval(1);\n\t}", "public GlRenderer(Context context) {\n\t\tthis.context = context;\n if (null != context) {\n this.bitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.bullet);\n }\n\t\t// initialise the square\n\t\tthis.square = new Square();\n\t}", "public void initialize()\r\n\t{\r\n\t\tgl.glClearColor(0.0F, 0.0F, 0.0F, 1.0F);\r\n\t\t// initialize blending for transparency\r\n\t\tgl.glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\r\n\t\tgl.glEnable(GL_DEPTH_TEST);\r\n\t\tgl.glEnable(GL_DITHER);\r\n\t\t//gl.disable(GL_ALPHA_TEST);\r\n\t\t//gl.disable(GL_COLOR_MATERIAL);\r\n\t\tgl.glShadeModel(GL_SMOOTH);\r\n\t\tgl.glDepthFunc( GL_LEQUAL );\r\n\t\tgl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);\r\n\t\tgl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);\r\n\t\tgl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);\r\n\t\tgl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\r\n\t\tgl.glPixelStorei(GL_UNPACK_ALIGNMENT, 1);\r\n\t\tgl.glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);\r\n\t\tgl.glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 1);\r\n\t\tglj.gljCheckGL();\r\n\t}", "public Surface(){\r\n\t\tsuper(SURFACE_TAG,\"\");\r\n\t\tthis.setRef(\"CG\");\r\n\t}", "public void init(GLAutoDrawable drawable) {\n drawable.setGL(new DebugGL(drawable.getGL())); //Ну может быть зачем-то он тут и нужен...\n\n final GL gl = drawable.getGL(); //Объект со всеми функциями.\n\n gl.glEnable(GL.GL_DEPTH_TEST); //Разрешаем z-буффер.\n gl.glDepthFunc(GL.GL_LEQUAL); //Задаем функцию глубины для z-буффера.\n\n gl.glShadeModel(GL.GL_SMOOTH); //Плавный переход цветов. Нужно чтобы тень красиво плавно переходила.\n gl.glClearColor(0f, 0f, 0.2f, 0f); //Задаем цвет затирания. Ну то-есть у нас это цвет фона.\n\n gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST); //Все настройки на максимум.\n gl.glHint(GL.GL_POINT_SMOOTH_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_LINE_SMOOTH_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_POLYGON_SMOOTH_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_TEXTURE_COMPRESSION_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_FRAGMENT_SHADER_DERIVATIVE_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_FOG_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_GENERATE_MIPMAP_HINT, GL.GL_NICEST);\n\n glu = new GLU(); //Глу он и есть глу.\n\n earth = new Earth();\n satellite = new Satellite();\n\n\n animator = new FPSAnimator(this, fps);\n animator.start(); //Создаем и запускаем аниматора.\n }", "public void init(GLAutoDrawable drawable) {\n\n GL gl = drawable.getGL();\n System.err.println(\"INIT GL IS: \" + gl.getClass().getName());\n gl.setSwapInterval(1);\n\n\n //wartości składowe oświetlenia i koordynaty źródła światła\n float ambientLight[] = { 0.3f, 0.3f, 0.3f, 1.0f };//swiatło otaczające\n float diffuseLight[] = { 0.7f, 0.7f, 0.7f, 1.0f };//światło rozproszone\n float specular[] = { 1.0f, 1.0f, 1.0f, 1.0f}; //światło odbite\n float lightPos[] = { 0.0f, 150.0f, 150.0f, 1.0f };//pozycja światła\n //(czwarty parametr określa odległość źródła:\n //0.0f-nieskończona; 1.0f-określona przez pozostałe parametry)\n gl.glEnable(GL.GL_LIGHTING); //uaktywnienie oświetlenia\n //ustawienie parametrów źródła światła nr. 0\n gl.glLightfv(GL.GL_LIGHT0,GL.GL_AMBIENT,ambientLight,0); //swiatło otaczające\n gl.glLightfv(GL.GL_LIGHT0,GL.GL_DIFFUSE,diffuseLight,0); //światło rozproszone\n gl.glLightfv(GL.GL_LIGHT0,GL.GL_SPECULAR,specular,0); //światło odbite\n gl.glLightfv(GL.GL_LIGHT0,GL.GL_POSITION,lightPos,0); //pozycja światła\n gl.glEnable(GL.GL_LIGHT0); //uaktywnienie źródła światła nr. 0\n gl.glEnable(GL.GL_COLOR_MATERIAL); //uaktywnienie śledzenia kolorów\n //kolory będą ustalane za pomocą glColor\n gl.glColorMaterial(GL.GL_FRONT, GL.GL_AMBIENT_AND_DIFFUSE);\n gl.glEnable(GL.GL_DEPTH_TEST);\n // Setup the drawing area and shading mode\n gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);\n gl.glShadeModel(GL.GL_SMOOTH);\n try\n {\n image1 = ImageIO.read(getClass().getResourceAsStream(\"/pokemon.jpg\"));\n image2 = ImageIO.read(getClass().getResourceAsStream(\"/android.jpg\"));\n }\n catch(Exception exc)\n {\n JOptionPane.showMessageDialog(null, exc.toString());\n return;\n }\n\n t1 = TextureIO.newTexture(image1, false);\n t2 = TextureIO.newTexture(image2, false);\n\n gl.glTexEnvi(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE, GL.GL_DECAL | GL.GL_MODULATE);\n gl.glEnable(GL.GL_TEXTURE_2D);\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT);\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT);\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);\n gl.glBindTexture(GL.GL_TEXTURE_2D, t1.getTextureObject());\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT);\ngl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT);\n\n\n \n\n }", "private static void initGL() {\n glClearColor(152/255f, 175/255f, 199/255f, 0.0f);\n glMatrixMode(GL_PROJECTION);\n glLoadIdentity();\n GLU.gluPerspective(100.0f, (float)displayMode.getWidth()/(float)\n displayMode.getHeight(), 0.1f, 500);\n glMatrixMode(GL_MODELVIEW);\n glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);\n glClearDepth(1.0f);\n glEnable(GL_DEPTH_TEST);\n glEnable(GL_TEXTURE_2D);\n glEnableClientState(GL_VERTEX_ARRAY);\n glEnableClientState(GL_COLOR_ARRAY);\n glEnableClientState(GL_TEXTURE_COORD_ARRAY);\n glEnable(GL_LIGHTING);\n glEnable(GL_LIGHT0);\n glEnable(GL_NORMALIZE);\n\n }", "public void surfaceCreated(SurfaceHolder holder)\n {\n System.out.println( \"surfaceCreated\" );\n ready = true;\n if (thread == null)\n {\n thread = new DriverThread(renderer);\n thread.start();\n }\n }", "@Override\n public void onSurfaceCreated(GL10 gl, EGLConfig config) {\n GLES20.glClearColor(0.15f, 0.15f, 0.15f, 0.15f);\n\n // Position the eye behind the origin.\n final float eyeX = 0.0f;\n final float eyeY = 0.0f;\n final float eyeZ = 1.5f;\n\n // We are looking toward the distance\n final float lookX = 0.0f;\n final float lookY = 0.0f;\n final float lookZ = -5.0f;\n\n // Set our up vector. This is where our head would be pointing were we holding the camera.\n final float upX = 0.0f;\n final float upY = 1.0f;\n final float upZ = 0.0f;\n\n Matrix.setLookAtM(mViewMatrix, 0, eyeX, eyeY, eyeZ, lookX,\n lookY, lookZ, upX, upY, upZ);\n\n String fragmentShader = \"precision mediump float; \\n\"\n // This is the color from the vertex shader interpolated across the\n + \"varying vec4 v_Color; \\n\"\n // triangle per fragment.\n + \"void main() \\n\"\n + \"{ \\n\"\n + \" gl_FragColor = v_Color; \\n\"\n + \"} \\n\";\n String vertexShader = \"uniform mat4 u_MVPMatrix; \\n\"\n // Per-vertex position information we will pass in.\n + \"attribute vec4 a_Position; \\n\"\n\n // Per-vertex color information we will pass in.\n + \"attribute vec4 a_Color; \\n\"\n\n // This will be passed into the fragment shader.\n + \"varying vec4 v_Color; \\n\"\n\n + \"void main() \\n\"\n + \"{ \\n\"\n\n // Pass the color through to the fragment shader.\n + \" v_Color = a_Color; \\n\"\n\n // gl_Position is a special variable used to store the final position.\n // Multiply the vertex by the matrix to get the final point in\n // normalized screen coordinates.\n + \" gl_Position = u_MVPMatrix \\n\"\n + \" * a_Position; \\n\"\n + \"} \\n\";\n\n program = new GLProgram(vertexShader, fragmentShader);\n\n String positionVariableName = \"a_Position\";\n program.declareAttribute(positionVariableName);\n\n String colorVariableName = \"a_Color\";\n program.declareAttribute(colorVariableName);\n\n program.declareUniform(U_MVP_MATRIX);\n\n // Tell OpenGL to use this program when rendering.\n program.activate();\n\n // This triangle is red, green, and blue.\n final float[] triangle1VerticesData = {\n // X, Y, Z,\n // R, G, B, A\n -0.5f, -0.25f, 0.0f,\n 0.5f, -0.25f, 0.0f,\n 0.0f, 0.559016994f, 0.0f,\n };\n\n final float[] triangleColorData = {\n 1.0f, 0.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n };\n\n VertexArray mTriangleVertices = new VertexArray(triangle1VerticesData,\n program.getVariableHandle(positionVariableName), true);\n /*\n Store our model data in a float buffer.\n */\n ColorArray mTriangleColors = new ColorArray(triangleColorData,\n program.getVariableHandle(colorVariableName), true);\n\n positionVbo = new VertexBufferObject(mTriangleVertices);\n colorVbo = new VertexBufferObject(mTriangleColors);\n }", "public static EglBase create() {\n return create(null /* shaderContext */, CONFIG_PLAIN);\n }", "public void prepare(){\n\t\tGL11.glEnable(GL11.GL_DEPTH_TEST);\n\t\tGL11.glClear( GL11.GL_COLOR_BUFFER_BIT|GL11.GL_DEPTH_BUFFER_BIT );\n\t\tGL11.glClearColor(1, 0, 0, 1);\n\t\t\n\t}", "private void initRendering() {\n ring = new Ring(0.3f, 0.7f);\n line = new Line(ImageTargets.screenWidth / 2, ImageTargets.screenHeight / 2);\n state_txt = createObject(68f, state_txt_cx, state_txt_cy, R.drawable.state);\n state_img = createObject(120f, state_img_cx, state_img_cy, R.drawable.open);\n record_txt = createObject(68f, record_txt_cx, record_txt_cy, R.drawable.record_txt);\n record_img = createObject(95f, record_img_cx, record_img_cy, R.drawable.record_img);\n recog_txt = createObject(68f, recog_txt_cx, recog_txt_cy, R.drawable.recog_txt);\n recog_img = createObject(155, recog_img_cx, recog_img_cy, R.drawable.person);\n record_num = createObject(85, record_num_cx, record_num_cy, R.drawable.num);\n\n histogram = createHistogram(85, 275.0f, 1150, 2.0f);\n histogram1 = createHistogram(85, 405, 1150, 2.2f);\n histogram2 = createHistogram(85, 540, 1150, 2.58f);\n histogram3 = createHistogram(85, 675, 1150, 0.9f);\n mRenderer = Renderer.getInstance();\n\n GLES20.glClearColor(0.0f, 0.0f, 0.0f, Vuforia.requiresAlpha() ? 0.0f\n : 1.0f);\n setBgTransparent();\n //初始化纹理\n initTexture(res);\n mActivity.loadingDialogHandler\n .sendEmptyMessage(LoadingDialogHandler.HIDE_LOADING_DIALOG);\n\n }", "public void onSurfaceChanged(GL10 gl, int width, int height)\n {\n\n nativeInitialize(width, height);\n }", "public \n\tBitsGLRenderer( \n\t\t\tfinal Context context ) {\n\t\t\n\t\tsuper( context );\n\t\t\n\t\tthis.mBitsGame = BitsGame.getInstance( );\n\n\t\tthis.setRenderer( this );\n\t\tthis.setFocusable(true);\n\t\tthis.setFocusableInTouchMode(true);\n\t\t\n\t\tthis.mVertexBufferSize = BitsApp.sRenderBufferSize;\n\t\tthis.mIndexBufferSize = BitsApp.sRenderBufferSize / 16 * BitsGLImage.INDICES_PER_SPRITE;\n\n\t\t//init the rotation array\n\t\tthis.mLastRotation[0] = 0f;\n\t\tthis.mLastRotation[1] = -1f;\n\t\tthis.mLastRotation[2] = -1f;\t\t\n\t\t\n\t\tthis.mVertices = new float[this.mVertexBufferSize];\n\t\tByteBuffer buffer = ByteBuffer.allocateDirect( this.mVertices.length * 16 ); //16 -> (X,Y,U,V) are 4 Float values -> Float is 4 Bytes long\n\t buffer.order( ByteOrder.nativeOrder() );\n\t this.mVertexBuffer = buffer.asFloatBuffer();\n\t \n\t //Pre-Filling the index buffer. The buffer content will never change.\n\t //This buffer always contains a sequence of 0,1,2,2,3,0 values that are used to render BitsImages efficiently.\n\t final short[] indices = new short[this.mIndexBufferSize];\n\t final int len = indices.length;\n\t short j = 0;\n\t for ( int i = 0; i < len; i+= BitsGLImage.INDICES_PER_SPRITE, j += BitsGLImage.VERTICES_PER_SPRITE ) {\n\t \tindices[i + 0] = (short)( j + 0 ); // Calculate Index 0 (first Triangle)\n\t indices[i + 1] = (short)( j + 1 ); // Calculate Index 1 (first Triangle)\n\t indices[i + 2] = (short)( j + 2 ); // Calculate Index 2 (first Triangle)\n\t indices[i + 3] = (short)( j + 2 ); // Calculate Index 3 (second Triangle)\n\t indices[i + 4] = (short)( j + 3 ); // Calculate Index 4 (second Triangle)\n\t indices[i + 5] = (short)( j + 0 ); // Calculate Index 5 (second Triangle)\n\t }\n buffer = ByteBuffer.allocateDirect( indices.length * (Short.SIZE / 8) ); //Short == 2 Bytes\n buffer.order( ByteOrder.nativeOrder() );\n this.mIndexBuffer = buffer.asShortBuffer();\n this.mIndexBuffer.clear();\n this.mIndexBuffer.put( indices );\n this.mIndexBuffer.flip();\n\t}", "public void createMesh(GL2 gl){\r\n\t\tfor(int x = 0; x < chunkSize; x++){\r\n\t\t\tfor(int y = 0; y < chunkHeight; y++){\r\n\t\t\t\tfor(int z = 0; z < chunkSize; z++){\r\n\t\t\t\t\tif(y + pos[1]*chunkHeight <= ChunkManager.map2D(x + pos[0]*chunkSize, z + pos[2]*chunkSize)){\r\n\t\t\t\t\t\tblocks[x][y][z] = (byte) (2.7*(y+pos[1]*chunkHeight)/13+1); // Initialize each block\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tblocks[x][y][z] = 0;\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\tvertexCount = 0;\r\n\t\t// Allocate the buffers (Change to one buffer, or use short/byte buffer for normals and color)\r\n\t\tvertexData = Buffers.newDirectFloatBuffer(chunkSize*chunkSize*chunkSize*18*3);\r\n\t\tnormalData = Buffers.newDirectFloatBuffer(chunkSize*chunkHeight*chunkSize*18*3);\r\n\t\tcolorsData = Buffers.newDirectFloatBuffer(chunkSize*chunkSize*chunkSize*18*3);\r\n\t\tfor(int x = 0; x < chunkSize; x++){\r\n\t\t\tfor(int y = 0; y < chunkHeight; y++){\r\n\t\t\t\tfor(int z = 0; z < chunkSize; z++){\r\n\t\t\t\t\tif(BlockType.isActive(blocks[x][y][z])){\r\n\t\t\t\t\t\tcreateCube(x, y, z); // If the cube is active, add it to the Buffer\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// correct the buffer size, and rewind\r\n\t\tnormalData.flip();\r\n\t\tvertexData.flip();\r\n\t\tcolorsData.flip();\r\n\t\tgl.glGenBuffers(3, buffer, 0); // allocate the buffers and get IDs\r\n\t\tgl.glBindBuffer(GL.GL_ARRAY_BUFFER, buffer[0]);\r\n\t\tgl.glBufferData(GL.GL_ARRAY_BUFFER, vertexCount*3*4, vertexData, GL.GL_DYNAMIC_DRAW);\r\n\t\tgl.glBindBuffer(GL.GL_ARRAY_BUFFER, buffer[1]);\r\n\t\tgl.glBufferData(GL.GL_ARRAY_BUFFER, vertexCount*3*4, normalData, GL.GL_DYNAMIC_DRAW);\r\n\t\tgl.glBindBuffer(GL.GL_ARRAY_BUFFER, buffer[2]);\r\n\t\tgl.glBufferData(GL.GL_ARRAY_BUFFER, vertexCount*3*4, colorsData, GL.GL_DYNAMIC_DRAW);\r\n\t\t// set buffer as null now that it's done being used, hope it will be garbage collected\r\n\t\tvertexData = null;\r\n\t\tnormalData = null;\r\n\t\tcolorsData = null;\t\t\r\n\t}", "GLMesh(BindStates bindStates, IOpenGL opengl)\n {\n this.bindStates = bindStates;\n this.opengl = opengl;\n }", "private void initializeBuffers()\n\t{\n\t\t// format vertex data so it can be passed to openGL\n\t\tFloatBuffer vertexBuffer = \n\t\t\t\tUtility.floatArrayToBuffer(mesh.vertexData);\n\t\t \n\t // create a buffer object and store the vertex data there\n\t\tvertexBufferObject = glGenBuffers();\n\t\tglBindBuffer(GL_ARRAY_BUFFER, vertexBufferObject);\n\t\tglBufferData(GL_ARRAY_BUFFER, vertexBuffer, GL_STATIC_DRAW);\n\t\tglBindBuffer(GL_ARRAY_BUFFER, 0);\n\t\t\n\t\t// format index data so it can be passed to openGL\n\t\tShortBuffer indexDataBuffer = \n\t\t\t\tUtility.shortArrayToBuffer(mesh.indexData);\n\t\t\n\t\t// create a buffer object and store the index data there\n\t\tindexBufferObject = glGenBuffers();\n\t\tglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indexBufferObject);\n\t\tglBufferData(GL_ELEMENT_ARRAY_BUFFER, indexDataBuffer, GL_STATIC_DRAW);\n\t\tglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);\n\t}", "public GLContext getContext();", "public void onSurfaceCreated(GL2 gl) {\r\n gl.glMatrixMode(GLMatrixFunc.GL_PROJECTION);\r\n gl.glLoadIdentity();\r\n\r\n // Perspective\r\n final int width = SCREEN_WIDTH;\r\n final int height = SCREEN_HEIGHT;\r\n aspectRatio = (float) width / (float) height;\r\n glu.gluPerspective(camera.getOpeningAngle(), aspectRatio, nearClippingPlane, farClippingPlane);\r\n\r\n // Viewport\r\n gl.glViewport(0, 0, width, height);\r\n gl.glMatrixMode(GLMatrixFunc.GL_MODELVIEW);\r\n\r\n // Depth\r\n gl.glEnable(GL2.GL_DEPTH_TEST);\r\n\r\n // which is the front? the one which is drawn counter clockwise\r\n gl.glFrontFace(GL2.GL_CCW);\r\n // which one should NOT be drawn\r\n gl.glCullFace(GL2.GL_BACK);\r\n\r\n // define the color we want to be displayed as the \"clipping wall\"\r\n gl.glClearColor((float) (CLEAR_COLOR.get(0)), (float) (CLEAR_COLOR.get(1)), (float) (CLEAR_COLOR.get(2)), OPAQUE);\r\n\r\n // Flat shading\r\n gl.glPolygonMode(GL2.GL_FRONT_AND_BACK, GL2.GL_FILL);\r\n\r\n // Set a light, just use the first one from the root node.\r\n if (renderFrame != null && renderFrame.getRoot().getNumberOfLightSources() > 0) {\r\n LightSource lightSource = renderFrame.getRoot().getLightSource(0);\r\n float lightAmbient[] = { 1, 1, 1, 1 };\r\n float lightSpecular[] = { 1, 1, 1, 1 };\r\n float lightPosition[] = lightSource.getPosition().floatData();\r\n float lightDiffuse[] = lightSource.getColor().floatData();\r\n gl.glEnable(GL2.GL_LIGHT0);\r\n gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_AMBIENT, lightAmbient, 0);\r\n gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_SPECULAR, lightSpecular, 0);\r\n gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_DIFFUSE, lightDiffuse, 0);\r\n gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_POSITION, lightPosition, 0);\r\n }\r\n\r\n updateView(gl);\r\n }", "public SurfaceTextureManager() {\n mTextureRender = new STextureRender();\n mTextureRender.surfaceCreated();\n\n mSurfaceTexture = new SurfaceTexture(mTextureRender.getTextureId());\n\n // This doesn't work if this object is created on the thread that CTS started for\n // these test cases.\n //\n // The CTS-created thread has a Looper, and the SurfaceTexture constructor will\n // create a Handler that uses it. The \"frame available\" message is delivered\n // there, but since we're not a Looper-based thread we'll never see it. For\n // this to do anything useful, OutputSurface must be created on a thread without\n // a Looper, so that SurfaceTexture uses the main application Looper instead.\n //\n // Java language note: passing \"this\" out of a constructor is generally unwise,\n // but we should be able to get away with it here.\n mSurfaceTexture.setOnFrameAvailableListener(this);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);//no title bar\n\t\tgetWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);//fullscreen\n\t\tglSurfaceView = new GLSurfaceView(this);//initialize GLSurfaceView\n\t\tglSurfaceView.setRenderer(new myRenderer());//set renderer\n\t\tsetContentView(glSurfaceView);//set surface as content\n\t}", "protected void initRender() {\n glActiveTexture(GL_TEXTURE0);\n // Bind the texture\n glBindTexture(GL_TEXTURE_2D, texture.getId());\n\n // Draw the mesh\n glBindVertexArray(vaoId);\n glEnableVertexAttribArray(0);\n glEnableVertexAttribArray(1);\n }", "public RenderEngine() {\n\t\twindow = Window.getInstance();\n\t\t\n\t\ttestEntity = new Entity(\"skull/skull.obj\", \"./res/models/skull/skull.png\", new Vector3f(0,0,0), new Vector3f(0,0,0));\n\t\ttestEntity.getWorldTransform().setScaling(new Vector3f(0.01f,0.01f,0.01f));\n\t\t\n\t\ttestEntity2 = new Entity(\"dummy/dummy.obj\", \"./res/models/dummy/dummy.jpg\", new Vector3f(0,8,0), new Vector3f(0,0,0));\n\t\ttestEntity2.getWorldTransform().setScaling(new Vector3f(0.05f,0.05f,0.05f));\n\t\t\n\t\ttestLight = new Light(new Vector3f(-5,5,-5), new Vector3f(1,1,1));\n\t\ttestLight.getWorldTransform().setScaling(new Vector3f(0.1f,0.1f,0.1f));\n\t\t\n\t\tsky = new SkyDome();\n\t\t\n\t}", "@Override\n public void onSurfaceCreated(GL10 gl10, EGLConfig eglConfig) {\n filter = new LutColorFilter(mContext);\n mTextureId = createTextureObject();\n mSurfaceTexture = new SurfaceTexture(mTextureId);\n\n\n try {\n Bitmap bitmap = BitmapFactory.decodeStream(mContext.getResources().getAssets().open(\"lut_01.png\"));\n filter.setBitmap(bitmap);\n }catch (IOException e){\n\n }\n\n }", "public void start() {\r\n if (MotoConfig.KEY_LOG) {\r\n Log.w(\"EglHelper\", \"start() tid=\" + Thread.currentThread().getId());\r\n }\r\n /*\r\n * Get an EGL instance\r\n */\r\n mEgl = (EGL10) EGLContext.getEGL();\r\n\r\n /*\r\n * Get to the default display.\r\n */\r\n mEglDisplay = mEgl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);\r\n\r\n if (mEglDisplay == EGL10.EGL_NO_DISPLAY) {\r\n throw new RuntimeException(\"eglGetDisplay failed\");\r\n }\r\n\r\n /*\r\n * We can now initialize EGL for that display\r\n */\r\n int[] version = new int[2];\r\n if(!mEgl.eglInitialize(mEglDisplay, version)) {\r\n throw new RuntimeException(\"eglInitialize failed\");\r\n }\r\n mEglConfig = mEGLConfigChooser.chooseConfig(mEgl, mEglDisplay);\r\n\r\n /*\r\n * Create an EGL context. We want to do this as rarely as we can, because an\r\n * EGL context is a somewhat heavy object.\r\n */\r\n mEglContext = mEGLContextFactory.createContext(mEgl, mEglDisplay, mEglConfig);\r\n if (mEglContext == null || mEglContext == EGL10.EGL_NO_CONTEXT) {\r\n mEglContext = null;\r\n throw new EglCreateContextException(\"createContext\");\r\n }\r\n if (MotoConfig.KEY_LOG) {\r\n Log.d(\"EglHelper\", \"createContext \" + mEglContext \r\n \t\t+ \" tid=\" + Thread.currentThread().getId());\r\n }\r\n\r\n mEglSurface = null;\r\n }", "@Override\n\tpublic void onSurfaceCreated(EGLConfig config) {\n\t\tLog.i(TAG, \"onSurfaceCreated\");\n\t}", "public void initGLState() {\n\n\t\tm.setPerspective(fovy, aspect, zNear, zFar);\n\t\tglMatrixMode(GL_PROJECTION);\n\t\tglLoadIdentity();\n\n\t\tm.get(fb);\n\n\t\tglLoadMatrixf(fb);\n\n\t\tglMatrixMode(GL_MODELVIEW);\n\t\tglLoadIdentity();\n\n\t\t/* Smooth-Shading soll benutzt werden */\n\t\tglEnable(GL_NORMALIZE);\n\t\tglShadeModel(GL_SMOOTH);\n\t\tinitLighting();\n\t}", "@Override\n public void init(GLAutoDrawable drawable) {\n GL2 gl = drawable.getGL().getGL2(); // get the OpenGL graphics context\n glu = new GLU(); // get GL Utilities\n gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); // set background (clear) color\n gl.glClearDepth(1.0f); // set clear depth value to farthest\n gl.glEnable(GL2.GL_DEPTH_TEST); // enables depth testing\n gl.glDepthFunc(GL2.GL_LEQUAL); // the type of depth test to do\n gl.glHint(GL2.GL_PERSPECTIVE_CORRECTION_HINT, GL2.GL_NICEST); // best perspective correction\n gl.glShadeModel(GL2.GL_SMOOTH); // blends colors nicely, and smoothes out lighting\n }", "public MyGLSurfaceView(Context context) {\r\n\t\tsuper(context);\r\n\t\tErrorCheck.SetContext(context);\r\n\t\tsetEGLContextClientVersion(2);\r\n\r\n\t\tmRenderer = new TexRenderer(((WindowManager) context.getSystemService(Activity.WINDOW_SERVICE)).getDefaultDisplay());\r\n\t\tmRenderer.SetRotationSensor(new MobileRotation(context, 30));\t// update interval <- 30 ms\r\n\t\tmRenderer.SetLocationSensor(new MobileLocation(context, 0));\r\n\t\tmRenderer.SetContext(context);\r\n\t\tsetRenderer(mRenderer);\r\n\t\t\r\n\t\t//setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);\r\n\t\t/*\r\n\t\tnew Thread(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tTcpBridge.TcpOpen();\r\n\t\t\t}\r\n\t\t}).start();\r\n\t\t\r\n\t\tuiViewHandler = new Handler();\r\n\t\t\r\n\t\tscheduler = (ScheduledThreadPoolExecutor)Executors.newScheduledThreadPool(1);\r\n\t\tscheduler.scheduleAtFixedRate(\r\n\t\t\tnew Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tTcpBridge.TcpFetchPosition();\r\n\t\t\t\t\tuiViewHandler.post(new Runnable() {\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\tfloat[] pos = TcpBridge.GetPosition();\r\n\t\t\t\t\t\t\tString output = \"New pos: (\" + pos[0] + \", \" + pos[1] + \", \" + pos[2] + \")\";\r\n\t\t\t\t\t\t\tSystem.out.println(output);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t3000,\r\n\t\t\t500,\r\n\t\t\tTimeUnit.MILLISECONDS);\r\n\t\t*/\r\n\t}", "public void init()\r\n {\r\n\t\t/* initialize the widget */\r\n\t\tint width = gl.getWidth();\r\n\t\tint height = gl.getHeight();\r\n\r\n\t\t// Initialize the rendering viewport size to OpenGL\r\n\t\tgl.viewport( 0, 0, width, height );\r\n\t\tgl.matrixMode( GL.PROJECTION );\t// Set up the camera mode\r\n\t\tgl.loadIdentity();\t\t\t\t\t// Reset the transformation matrix\r\n\t\tif (width <= height)\r\n\t\t\tgl.ortho (-50.0, 50.0, -50.0*(double)height/(double)width,\r\n\t\t\t\t 50.0*(double)height/(double)width, -1.0, 1.0);\r\n\t\telse\r\n\t\t\tgl.ortho (-50.0*(double)width/(double)height,\r\n\t\t\t 50.0*(double)width/(double)height, -50.0, 50.0, -1.0, 1.0);\r\n\t\tgl.matrixMode( GL.MODELVIEW );\t\t// Reset to model transforms\r\n }", "public void init(int width, int height) {\n try {\n Display.setDisplayMode(new DisplayMode(width, height));\n Display.create();\n } catch (LWJGLException ex) {\n System.exit(0);\n }\n\n GL11.glEnable(GL11.GL_TEXTURE_2D);\n GL11.glEnable(GL11.GL_BLEND);\n GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);\n GL11.glTexEnvf(GL11.GL_TEXTURE_ENV, GL11.GL_TEXTURE_ENV_MODE, GL11.GL_MODULATE);\n GL11.glMatrixMode(GL11.GL_PROJECTION);\n GL11.glLoadIdentity();\n GL11.glOrtho(0, GameConstants.WINDOW_WIDTH, 0, GameConstants.WINDOW_HEIGHT, 1, -1);\n GL11.glMatrixMode(GL11.GL_MODELVIEW);\n }", "static public void init() {\r\n\t\t\r\n\t\t\r\n\t\tfor(int i=MeshFrame.HEIGHT; i>=HeightScale;i-=HeightScale){\r\n\t\t\tGL11.glBegin(GL11.GL_TRIANGLE_STRIP);\r\n\t\t\tfor (int j = 0; j <= MeshFrame.WIDTH; j+=WidthScale) {\r\n\t\t\t\tGL11.glVertex3f(j, i, 0);\r\n\t\t\t\tGL11.glVertex3f(j, i-HeightScale, 0);\r\n\t\t\t}\r\n\t\t\tGL11.glEnd();\r\n\t\t\t\r\n\t\t}\t\t\r\n\t\t\r\n\t}", "private void initRendering() {\n\t\tmActivity.showDebugMsg(\" initRendering\");\n\t\tGLES20.glClearColor(0.0f, 0.0f, 0.0f, Vuforia.requiresAlpha() ? 0.0f : 1.0f);\n\n\t\tfor (Texture t : mTextures) {\n\t\t\tGLES20.glGenTextures(1, t.mTextureID, 0);\n\t\t\tGLES20.glBindTexture(GLES20.GL_TEXTURE_2D, t.mTextureID[0]);\n\t\t\tGLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR);\n\t\t\tGLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR);\n\t\t\tGLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGBA, t.mWidth, t.mHeight, 0, GLES20.GL_RGBA,\n\t\t\t\t\tGLES20.GL_UNSIGNED_BYTE, t.mData);\n\t\t}\n\n\t\tshaderProgramID = ArUtils.createProgramFromShaderSrc(\n\t\t\t\tShaders.CUBE_MESH_VERTEX_SHADER,\n\t\t\t\tShaders.CUBE_MESH_FRAGMENT_SHADER);\n\n\t\tvertexHandle = GLES20.glGetAttribLocation(shaderProgramID,\n\t\t\t\t\"vertexPosition\");\n\t\ttextureCoordHandle = GLES20.glGetAttribLocation(shaderProgramID,\n\t\t\t\t\"vertexTexCoord\");\n\t\tmvpMatrixHandle = GLES20.glGetUniformLocation(shaderProgramID,\n\t\t\t\t\"modelViewProjectionMatrix\");\n\t\ttexSampler2DHandle = GLES20.glGetUniformLocation(shaderProgramID,\n\t\t\t\t\"texSampler2D\");\n\n\t\tif (!mModelIsLoaded) {\n\t\t\t//object = new Teapot();\n\t\t\tobject = mActivity.get3DObject();\n\t\t\tobjectScaleFloat *= object.getDefScale();\n\t\t\t//minObjectScale *= object.getDefScale();\n\t\t\t//maxObjectScale *= object.getDefScale();\n\n\t\t\tmActivity.showDebugMsg(\"Loading model Teapot\");\n\t\t\t// Hide the Loading Dialog\n\t\t\t//mActivity.loadingDialogHandler.sendEmptyMessage(LoadingDialogHandler.HIDE_DIALOG);\n\t\t}\n\n\t}", "@Override\n public void surfaceCreated(SurfaceHolder holder) {\n Log.d(TAG, \"surfaceCreated\");\n mRenderingPaused = false;\n mHolder = holder;\n updateRenderingState();\n }", "public void init(GLAutoDrawable gLDrawable) {\n GL2 gl = gLDrawable.getGL().getGL2();\n \n gl.glClearDepth(1.0f); // Depth Buffer Setup\n gl.glEnable(GL2.GL_DEPTH_TEST); // Enables Depth Testing\n gl.setSwapInterval(1); // enable v-synch @ 60fps\n \n gl.glEnable(GL2.GL_CULL_FACE);\n \n gl.glColorMaterial (GL2.GL_FRONT_AND_BACK, GL2.GL_AMBIENT_AND_DIFFUSE);\n gl.glEnable (GL2.GL_COLOR_MATERIAL);\n \n // create a light source at 0, 100, 100\n EffectsManager.getManager().createLight(gl, new Vector3f(0, 100, 100), new Vector3f(), new Vector3f(1f, 1f, 1f), new Vector3f()); \n }" ]
[ "0.7435685", "0.70422626", "0.68278885", "0.6779946", "0.6758569", "0.6717796", "0.67108035", "0.6709299", "0.670318", "0.67016935", "0.67001987", "0.66976506", "0.666591", "0.6660974", "0.66560316", "0.6610447", "0.65848833", "0.65844786", "0.65356576", "0.65207225", "0.6503895", "0.65030766", "0.6474769", "0.6471402", "0.64416784", "0.6382161", "0.63596135", "0.63461846", "0.6331886", "0.6323534", "0.6308227", "0.6294013", "0.6282668", "0.6271105", "0.6263676", "0.6258762", "0.62551546", "0.62545574", "0.6233074", "0.6231116", "0.62224966", "0.6219456", "0.62045044", "0.6196996", "0.6187332", "0.6187059", "0.6185723", "0.61694324", "0.6166326", "0.61600244", "0.6143167", "0.6133653", "0.61325014", "0.6128148", "0.6125701", "0.61137617", "0.6102627", "0.6097162", "0.6088272", "0.6070912", "0.60617924", "0.6025845", "0.6019556", "0.6017582", "0.601294", "0.5998056", "0.5991064", "0.5988129", "0.59817916", "0.5977572", "0.5968756", "0.5968591", "0.5966253", "0.59600455", "0.595288", "0.59209585", "0.59204406", "0.59014523", "0.589346", "0.58876926", "0.5884607", "0.58846045", "0.5866696", "0.5861638", "0.58501214", "0.58466256", "0.5846049", "0.5834074", "0.58327085", "0.58020365", "0.5800709", "0.579145", "0.5787285", "0.578017", "0.5778131", "0.5777996", "0.5776537", "0.5773079", "0.5768669", "0.575677" ]
0.7906301
0
Get Bitmap, only once
Bitmap getBitmap(){ Bitmap bm = frame; frame = null; return bm; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Bitmap get() {\n Throwable throwable2222222;\n Object object;\n block4: {\n boolean bl2 = this.zali;\n if (bl2) return this.zalh;\n Object object2 = this.zalg;\n Object object3 = new ParcelFileDescriptor.AutoCloseInputStream(object2);\n object = new DataInputStream((InputStream)object3);\n int n10 = ((DataInputStream)object).readInt();\n object3 = new byte[n10];\n int n11 = ((DataInputStream)object).readInt();\n int n12 = ((DataInputStream)object).readInt();\n String string2 = ((DataInputStream)object).readUTF();\n string2 = Bitmap.Config.valueOf((String)string2);\n ((DataInputStream)object).read((byte[])object3);\n {\n catch (Throwable throwable2222222) {\n break block4;\n }\n catch (IOException iOException) {}\n {\n String string3 = \"Could not read from parcel file descriptor\";\n object2 = new IllegalStateException(string3, iOException);\n throw object2;\n }\n }\n BitmapTeleporter.zaa((Closeable)object);\n object = ByteBuffer.wrap((byte[])object3);\n object3 = Bitmap.createBitmap((int)n11, (int)n12, (Bitmap.Config)string2);\n object3.copyPixelsFromBuffer((Buffer)object);\n this.zalh = object3;\n this.zali = bl2 = true;\n return this.zalh;\n }\n BitmapTeleporter.zaa((Closeable)object);\n throw throwable2222222;\n }", "@Override\n\t\t\tpublic Bitmap getBitmap(String url) {\n\t\t\t\treturn cache.get(url);\n\t\t\t}", "public Bitmap getBitmap(){\n return bitmap;\n }", "public Bitmap getBitmap() {\n\t\treturn this.initialBitmap;\r\n\t}", "private Bitmap getBitmap(String url) {\n File file = diskCache.getData(url);\n Bitmap bitmap = decode(file);\n if (bitmap == null) {\n // If no then load it\n bitmap = loadAndCacheBitmap(file, url);\n } else {\n Log.d(\"HIHO\", \"bitmap from memory\");\n }\n\n return bitmap;\n }", "private void loadBitmap() {\n\n BitmapDrawable bitmapDrawable = (BitmapDrawable) this.getDrawable();\n\n if (bitmapDrawable != null)\n image = bitmapDrawable.getBitmap();\n }", "public Bitmap getBitmap() {\n\t\treturn mBitmap;\n\t}", "private Bitmap getBitmapFromMemCache(String key) {\n return mLruCache.get(key);\n }", "public Bitmap get(String url) {\n if(url!=null){\n synchronized (mBitmapCache) {\n\n // Get the image from the cache\n final Bitmap bitmap = mBitmapCache.get(url);\n\n // Check if the bitmap is in the cache\n if (bitmap != null) {\n return bitmap;\n }\n }\n }\n\n return null;\n }", "private Bitmap getBitmapFromLruCache(String key) {\r\n return mLruCache.get(key);\r\n }", "public Bitmap getBitmap(@NonNull final String key) {\n return getBitmap(key, null);\n }", "public synchronized Bitmap get(ImageInfo paramK) {\n\t\tBitmap bitmap;\n//\t\tif (wrap != null) {\n//\t\t\tbitmap = wrap.getWrap();\n//\t\t\tif (bitmap != null && !bitmap.isRecycled()) {\n//\t\t\t\twrap.hit();\n//\t\t\t\tLog.v(\"GetBitmap\", \"GetBitmap1\");\n//\t\t\t} else {\n//\t\t\t\tbitmap = read(paramK);\n//\t\t\t\twrap.setWrap(bitmap);\n//\t\t\t\tmemoryCache.put(paramK, wrap);\n//\t\t\t\tLog.v(\"GetBitmap\", \"GetBitmap2\");\n//\t\t\t}\n//\t\t\tLog.v(\"GetBitmap\", \"GetBitmap3\");\n//\t\t} else {\n//\t\t\tbitmap = read(paramK);\n//\t\t\tmemoryCache.put(paramK, new BitmapWrap(bitmap));\n//\t\t\tLog.v(\"GetBitmap\", \"GetBitmap4\");\n//\t\t}\n\t\tbitmap =getBitmapFromCache(paramK);\n\t\tif(bitmap==null)\n\t\t{\n\t\t\tbitmap = read(paramK);\n\t\t\tif(bitmap!=null)\n\t\t\t{\n\t\t\t\taddImage2Cache(paramK,bitmap);\n\t\t\t}\n\t\t}\n\t\treturn bitmap;\n\t}", "@Override\n\tpublic Bitmap fetch(String key) {\n\t\treturn (Bitmap) mMemoryCache.get(key);\n\t}", "public static Bitmap getBitmap(String path) {\n Bitmap bitmap = null;\n try {\n Log.i(\"FileManager\", \"GetBitmap: \" + path);\n FileInputStream imgIS = new FileInputStream(new File(path));\n BufferedInputStream bufIS = new BufferedInputStream(imgIS);\n bitmap = BitmapFactory.decodeStream(bufIS);\n Log.i(\"FileManager\", \"GetBitmap Finished: \" + bitmap);\n } catch (FileNotFoundException e) { //catch fileinputstream exceptions\n e.printStackTrace();\n } //trying to get wallpaper from display cycle node\n return bitmap;\n }", "Bitmap m7900a(Bitmap bitmap);", "public static Bitmap get(String key) {\n Bitmap bitmap = getFromMemory(key);\n if (bitmap == null) {\n bitmap = getFromDisk(key);\n }\n return bitmap;\n }", "public static Bitmap getImage(String url){\n\t\tBitmap image = BitmapFactory.decodeStream(\n\t\t\t\topenStream(url));\n\t\tLog.i(\"IMAGE\",\"Cache hit on \"+hashURL(url));\n\t\treturn image;\n\t}", "private Bitmap loadBitmap(String uri, int reqWidth, int reqHeight) {\n Bitmap bitmap = null;\n try {\n bitmap = ImageLoader.getImageDiskLruCache(mContext).get(uri, reqWidth, reqHeight);\n if (bitmap != null) {\n\n ImageLoader.getImageLruCache().put(MD5Utils.hashKeyFromUrl(uri), bitmap);\n return bitmap;\n } else {\n bitmap = loadBitmapFromHttp(uri, reqWidth, reqHeight);\n if (bitmap != null) {\n }\n\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (bitmap == null && !mIsDiskLruCacheCreated) {\n bitmap = NetworkUtils.downloadBitmapFromUrl(uri);\n }\n return bitmap;\n }", "public static Bitmap GetTempCardNumberBitmap()\r\n\t{\r\n\t\tBitmap image = null;\r\n\t\tif(CGameHelper.m_GameContext != null)\r\n\t\t{\r\n\t\t\tResources res = CGameHelper.m_GameContext.getResources();\r\n\t\t\tif(res == null)\r\n\t\t\t\treturn image; \r\n\r\n\t\t\tif(m_TempCardNumberBitmap == null)\r\n\t\t\t{\r\n\t\t\t\tm_TempCardNumberBitmap = BitmapFactory.decodeResource(res, R.drawable.z);\r\n\t\t\t}\r\n\t\t\timage = m_TempCardNumberBitmap;\r\n\t\t} \r\n\t\treturn image;\r\n\t}", "public byte[] bitmap();", "public boolean loadBitmap() {\n String str = TAG;\n StringBuilder sb = new StringBuilder();\n sb.append(\"loadBitmap: mBitmap=\");\n sb.append(this.mBitmap);\n Log.d(str, sb.toString());\n WallpaperManager wallpaperManager = this.mWallpaperManager;\n if (wallpaperManager != null && this.mBitmap == null) {\n this.mBitmap = wallpaperManager.getBitmap(false);\n this.mWcgContent = this.mWallpaperManager.wallpaperSupportsWcg(1);\n this.mWallpaperManager.forgetLoadedWallpaper();\n Bitmap bitmap = this.mBitmap;\n if (bitmap != null) {\n this.mSurfaceSize.set(0, 0, bitmap.getWidth(), this.mBitmap.getHeight());\n }\n }\n Log.d(TAG, \"loadBitmap done\");\n if (this.mBitmap != null) {\n return true;\n }\n return false;\n }", "private Bitmap getBitmap(String url){\n Bitmap result = null;\n try {\n InputStream in = new java.net.URL(url).openStream();\n final BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n // Calculate inSampleSize\n options.inSampleSize = 4;\n options.inJustDecodeBounds = false;\n result = BitmapFactory.decodeStream(in, null, options);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return result;\n }", "public Bitmap getBitmap(String imgPath) {\n // Get bitmap through image path\n BitmapFactory.Options newOpts = new BitmapFactory.Options();\n newOpts.inJustDecodeBounds = false;\n newOpts.inPurgeable = true;\n newOpts.inInputShareable = true;\n // Do not compress\n newOpts.inSampleSize = 1;\n newOpts.inPreferredConfig = Config.RGB_565;\n return BitmapFactory.decodeFile(imgPath, newOpts);\n }", "private Bitmap m6552d() {\n if (this.f5072i == null) {\n this.f5072i = m6555f();\n }\n return this.f5072i;\n }", "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 }", "private Bitmap getScreenshotBitmap() {\n if (!hasEnoughHeapMemoryForScreenshot()) return null;\n\n if (getWidth() <= 0 || getHeight() <= 0) return null;\n\n Bitmap bitmap = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);\n draw(new Canvas(bitmap));\n return bitmap;\n }", "private Bitmap postBitmap(Post p) {\n byte[] loadedBytes = Base64.decode(p.getImageURL(), Base64.DEFAULT);\n Bitmap loadedBitmap = BitmapFactory.decodeByteArray(loadedBytes, 0, loadedBytes.length);\n return loadedBitmap;\n }", "public Bitmap getBitmapIn() {\r\n\t\treturn bitmapIn;\r\n\t}", "public Bitmap getImage(){\n return images[currentFrame];\n }", "private Bitmap getBitmapFromNetwork(String code) {\n\t\ttry {\n\t\t\tBitmap bitmap = NetworkHelper.get().getBitmapFromNetwork(30000, code);\n\t\t\tif (bitmap == null) {\n\t\t\t\tthrow new IOException(\"Cannot GET Bitmap From Network.\");\n\t\t\t}\n\n\t\t\tString imgDirPath = MxApplication.getAppExternalCacheDir();\n\t\t\tFile imgDir = new File(imgDirPath);\n\t\t\tif (!imgDir.exists() || !imgDir.isDirectory()) {\n\t\t\t\tif (!imgDir.mkdirs()) {\n\t\t\t\t\tLog.e(ImageLoader.class.getSimpleName(), \"Cannot Save Image Cause By Creating File Failed.\");\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tFile imgFile = new File(imgDirPath + File.separator + code + IMG_SUFFIX);\n\t\t\tif (!imgFile.exists() || !imgFile.isFile()) {\n\t\t\t\tboolean createFile = false;\n\t\t\t\ttry {\n\t\t\t\t\tcreateFile = imgFile.createNewFile();\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tif (!createFile) {\n\t\t\t\t\tLog.e(ImageLoader.class.getSimpleName(), \"Cannot Save Image Cause By Creating File Failed.\");\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tFileOutputStream outputStream = new FileOutputStream(imgFile);\n\t\t\tbitmap.compress(Bitmap.CompressFormat.PNG, 100, outputStream);\n\t\t\tputToBitmapCache(code, bitmap);\n\t\t\treturn bitmap;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (TimeoutException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "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}", "public Bitmap getImage() {\n return image;\n }", "private Bitmap ensureGLCompatibleBitmap(Bitmap bitmap) {\n\t\tif (bitmap == null || bitmap.getConfig() != null) {\n\t\t\treturn bitmap;\n\t\t}\n\t\tBitmap newBitmap = bitmap.copy(Config.ARGB_8888, false);\n\t\tbitmap.recycle();\n\t\tSystem.gc();\n\t\t//Log.i(TAG, \"***bitmap**\" + (bitmap == null) + \" \" + (newBitmap == null));\n\t\treturn newBitmap;\n\t}", "public interface BitmapCache {\n void put(BitmapRequest bitmapRequest, Bitmap bitmap);\n\n Bitmap get(BitmapRequest bitmapRequest);\n\n boolean remove(BitmapRequest bitmapRequest);\n\n void clear();\n}", "public static Bitmap GetDealSpriteBitmap()\r\n\t{\r\n\t\t// Load background desktop image from resouce\r\n\t\tBitmap image = null;\r\n\t\tif(CGameHelper.m_GameContext != null)\r\n\t\t{\r\n\t\t\tResources res = CGameHelper.m_GameContext.getResources();\r\n\t\t\tif(res == null)\r\n\t\t\t\treturn image; \r\n\r\n\t\t\tif(m_DealSpriteBitmap == null)\r\n\t\t\t{\r\n\t\t\t\tm_DealSpriteBitmap = BitmapFactory.decodeResource(res, R.drawable.face);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\timage = m_DealSpriteBitmap;\r\n\t\t} \r\n\t\treturn image;\r\n\t}", "public static Bitmap recycle(Bitmap bitmap) {\n if (bitmap != null) {\n bitmap.recycle();\n }\n return null;\n }", "private Bitmap getBitmap(String id, String url) \n {\n\n \tFile f=new File(id);\n \n Bitmap b = decodeFile(f);\n if(b!=null)\n return b;\n \n// //from web\n// try \n// {\n// Bitmap bitmap = null;\n// \n// InputStream is = null;\n// \n// is = new URL(url).openStream();\n// \n// if(is != null)\n// {\n// \tOutputStream os = new FileOutputStream(f);\n// BitmapUtils.CopyStream(is, os);\n// os.close();\n// \n// bitmap = decodeFile(f);\n// }\n// return bitmap;\n// } \n// catch (Exception ex)\n// {\n// \tstopThread();\n// \tphotoLoaderThread.start();\n// ex.printStackTrace();\n// return null;\n// }\n// catch(Throwable e)\n// {\n// \tstopThread();\n// \tphotoLoaderThread.start();\n \t return null;\n// }\n }", "private static Bitmap getBitmap(String imageURL){\n\t\tBitmap bmp = null;\n\n\t\ttry {\n\t\t\tbmp = BitmapFactory.decodeStream((InputStream) new URL(imageURL).getContent());\n\t\t} catch (MalformedURLException e) {\n\t\t} catch (IOException e) {\n\t\t}\n\n\t\treturn bmp;\n\t}", "private static Bitmap m8222a(URLConnection uRLConnection) {\n InputStream inputStream = uRLConnection.getInputStream();\n try {\n Bitmap a = C2995v.f8235a.m8223a(inputStream);\n return a;\n } finally {\n inputStream.close();\n }\n }", "public static Bitmap GetSignsBitmap()\r\n\t{\r\n\t\tBitmap signBmp = null;\r\n\t\tif(CGameHelper.m_GameContext != null)\r\n\t\t{\r\n\t Resources res = CGameHelper.m_GameContext.getResources();\r\n\t if(res == null)\r\n\t \treturn signBmp;\r\n\t \r\n\t if(m_SignsBitmap == null)\r\n\t {\t\r\n\t \tm_SignsBitmap = BitmapFactory.decodeResource(res, R.drawable.signs);\r\n\t }\r\n\t signBmp = m_SignsBitmap;\r\n\t\t}\r\n\t\treturn signBmp;\r\n\t}", "public Bitmap getB(String name){\n\t\treturn BitmapFactory.decodeResource(activity.getResources(),\n\t\t\t\tactivity.getResources().getIdentifier(name, \"drawable\", activity.getPackageName()));\n\t\t\n\t}", "public final Class<Bitmap> mo2232mK() {\n return Bitmap.class;\n }", "public static Bitmap GetCardSoruceBitmap()\r\n\t{\r\n\t\tBitmap image = null;\r\n\t\tif(CGameHelper.m_GameContext != null)\r\n\t\t{\r\n\t\t\tResources res = CGameHelper.m_GameContext.getResources();\r\n\t\t\tif(res == null)\r\n\t\t\t\treturn image; \r\n\r\n\t\t\tif(IsPortraitMode())\r\n\t\t\t{\r\n\t\t\t\tif(m_CardBitmapProtrait == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tm_CardBitmapProtrait = BitmapFactory.decodeResource(res, R.drawable.card);\r\n\t\t\t\t}\r\n\t\t\t\timage = m_CardBitmapProtrait;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(m_CardBitmapLandscape == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tm_CardBitmapLandscape = BitmapFactory.decodeResource(res, R.drawable.card2);\r\n\t\t\t\t}\r\n\t\t\t\timage = m_CardBitmapLandscape;\r\n\t\t\t}\r\n\t\t} \r\n\t\treturn image;\r\n\t}", "Bitmap load(String id);", "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 }", "private Bitmap getCechaFromUrl(String url) {\n\t\treturn mLruCache.get(url);\r\n\t}", "private static Bitmap buildBitmap(Bitmap original, boolean canReuseInBitmap) {\n if (original == null)\n throw new NullPointerException(\"Blur bitmap original isn't null\");\n\n Bitmap.Config config = original.getConfig();\n if (config != Bitmap.Config.ARGB_8888 && config != Bitmap.Config.RGB_565) {\n throw new RuntimeException(\"Blur bitmap only supported Bitmap.Config.ARGB_8888 and Bitmap.Config.RGB_565.\");\n }\n\n // If can reuse in bitmap return this or copy\n Bitmap rBitmap;\n if (canReuseInBitmap) {\n rBitmap = original;\n } else {\n rBitmap = original.copy(config, true);\n }\n return (rBitmap);\n }", "public static Bitmap convertToMutable(Bitmap imgIn) {\n try {\n //this is the file going to use temporally to save the bytes.\n // This file will not be a imageView, it will store the raw imageView data.\n File file = new File(Environment.getExternalStorageDirectory() + File.separator + \"temp.tmp\");\n\n //Open an RandomAccessFile\n //Make sure you have added uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"\n //into AndroidManifest.xml file\n RandomAccessFile randomAccessFile = new RandomAccessFile(file, \"rw\");\n\n // get the width and height of the source bitmap.\n int width = imgIn.getWidth();\n int height = imgIn.getHeight();\n Bitmap.Config type = imgIn.getConfig();\n\n //Copy the byte to the file\n //Assume source bitmap loaded using options.inPreferredConfig = Config.ARGB_8888;\n FileChannel channel = randomAccessFile.getChannel();\n MappedByteBuffer map = channel.map(FileChannel.MapMode.READ_WRITE, 0, imgIn.getRowBytes()*height);\n imgIn.copyPixelsToBuffer(map);\n //recycle the source bitmap, this will be no longer used.\n imgIn.recycle();\n System.gc();// try to force the bytes from the imgIn to be released\n\n //Create a new bitmap to load the bitmap again. Probably the memory will be available.\n imgIn = Bitmap.createBitmap(width, height, type);\n map.position(0);\n //load it back from temporary\n imgIn.copyPixelsFromBuffer(map);\n //close the temporary file and channel , then delete that also\n channel.close();\n randomAccessFile.close();\n\n // delete the temp file\n file.delete();\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return imgIn;\n }", "public Bitmap getBitmapFromURL(String src) {\n try {\n Log.i(TAG,\"GetbitmapfromURL src \" + src);\n URL url = new URL(src);\n URLConnection connection = (URLConnection) url.openConnection();\n connection.connect();\n Log.i(TAG,\"bitmap returned\");\n return BitmapFactory.decodeStream(new BufferedInputStream(connection.getInputStream()));\n } catch (IOException e) {\n e.printStackTrace();\n Log.e(TAG,\"exception thrown getting bitmap url\");\n return null;\n }\n }", "private Bitmap loadAndCacheBitmap(File cacheFile, String url) {\n File tempFile = new File(cacheFile.getPath() + \"temp_file\");\n Bitmap bitmap = null;\n HttpURLConnection connection = null;\n OutputStream tempOs = null;\n OutputStream cacheOs = null;\n\n try {\n URL imageUrl = new URL(url);\n\n // Create connection\n connection = (HttpURLConnection) imageUrl.openConnection();\n connection.setConnectTimeout(CONNECTION_TIMEOUT);\n connection.setReadTimeout(CONNECTION_TIMEOUT);\n connection.setInstanceFollowRedirects(true);\n\n // Save image to temp file\n InputStream is = connection.getInputStream();\n tempOs = new FileOutputStream(tempFile);\n StreamUtils.copy(is, tempOs);\n\n Log.d(\"HIHO\", \"bitmap from web\");\n\n // Decode and scale image to reduce memory consumption\n bitmap = decodeAndScale(tempFile);\n\n // Save scaled bitmap to cache file\n cacheOs = new FileOutputStream(cacheFile);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, cacheOs);\n\n } catch (IOException e) {\n Log.e(TAG, \"Error while image was loaded and stored\", e);\n // Remove cached file if something go wrong\n cacheFile.delete();\n } finally {\n StreamUtils.closeQuietly(tempOs);\n StreamUtils.closeQuietly(cacheOs);\n // Remove temp file\n tempFile.delete();\n if (connection != null) connection.disconnect();\n }\n\n return bitmap;\n }", "public static Bitmap GetLargeFlowersBitmap()\r\n\t{\r\n\t\tBitmap image = null;\r\n\t\tif(CGameHelper.m_GameContext != null)\r\n\t\t{\r\n\t\t\tResources res = CGameHelper.m_GameContext.getResources();\r\n\t\t\tif(res == null)\r\n\t\t\t\treturn image; \r\n\r\n\t\t\tif(m_LargeFlowersBitmap == null)\r\n\t\t\t{\r\n\t\t\t\tm_LargeFlowersBitmap = BitmapFactory.decodeResource(res, R.drawable.flowerl);\r\n\t\t\t}\r\n\t\t\timage = m_LargeFlowersBitmap;\r\n\t\t} \r\n\t\treturn image;\r\n\t}", "void mo12205a(Bitmap bitmap);", "public Bitmap getFromCache(final String key) {\n\n\t\ttry {\n\t\t\tif (Constants.CACHE_DIR_PATH.endsWith(\"/\"))\n\t\t\t\treturn BitmapFactory.decodeFile(Constants.CACHE_DIR_PATH + key);\n\t\t\telse\n\t\t\t\treturn BitmapFactory.decodeFile(Constants.CACHE_DIR_PATH + \"/\"\n\t\t\t\t\t\t+ key);\n\t\t} catch (Error e) {\n\n\t\t\t//Logs.show(e);\n\n\t\t}\n\t\treturn null;\n\t}", "public static Bitmap GetBasicCardNumberBitmap()\r\n\t{\r\n\t\tBitmap image = null;\r\n\t\tif(CGameHelper.m_GameContext != null)\r\n\t\t{\r\n\t\t\tResources res = CGameHelper.m_GameContext.getResources();\r\n\t\t\tif(res == null)\r\n\t\t\t\treturn image; \r\n\r\n\t\t\tif(m_BasicCardNumberBitmap == null)\r\n\t\t\t{\r\n\t\t\t\tm_BasicCardNumberBitmap = BitmapFactory.decodeResource(res, R.drawable.number);\r\n\t\t\t}\r\n\t image = m_BasicCardNumberBitmap;\r\n\t\t} \r\n\t\treturn image;\r\n\t}", "public static Bitmap GetSmallFlowersBitmap()\r\n\t{\r\n\t\tBitmap image = null;\r\n\t\tif(CGameHelper.m_GameContext != null)\r\n\t\t{\r\n\t\t\tResources res = CGameHelper.m_GameContext.getResources();\r\n\t\t\tif(res == null)\r\n\t\t\t\treturn image; \r\n\r\n\t\t\tif(m_SmallFlowersBitmap == null)\r\n\t\t\t{\r\n\t\t\t\tm_SmallFlowersBitmap = BitmapFactory.decodeResource(res, R.drawable.flowers);\r\n\t\t\t}\r\n\t\t\timage = m_SmallFlowersBitmap;\r\n\t\t} \r\n\t\treturn image;\r\n\t}", "private Bitmap getBitmap(int drawableRes) {\n Drawable drawable = ResourcesCompat.getDrawable(getResources(), drawableRes, null);\n Canvas canvas = new Canvas();\n Bitmap bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);\n canvas.setBitmap(bitmap);\n drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());\n drawable.draw(canvas);\n\n return bitmap;\n }", "private static native void getPageImage(Bitmap bitmap);", "private void addBitmapToCache(String url, Bitmap bitmap) {\n if (bitmap != null) {\n synchronized (sHardBitmapCache) {\n sHardBitmapCache.put(url, bitmap);\n }\n }\n }", "public void getImage(){\n Cursor c = db.rawQuery(\"SELECT * FROM Stories\",null);\n if(c.moveToNext()){\n byte[] image = c.getBlob(0);\n Bitmap bmp = BitmapFactory.decodeByteArray(image,0,image.length);\n }\n}", "public Bitmap loadImageCache( String url ){\n\t\tString path = createPath(url, context);\n\t\tLog.i( TAG, \"loadImageCache: \" + path );\n\n\t\tBitmap bitmap = null;\n\t\tFile file = new File( path );\n\n \tif( file.exists() ) {\n \t\tLog.i( TAG, \"loadImageCache - Arquivo existe\" );\n\n\t\t\ttry {\n\t\t\t\tFileInputStream infile = new FileInputStream(file);\n\t\t\t\tbitmap = BitmapFactory.decodeStream(infile);\n\t\t\t\tinfile.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tLog.i( TAG, \"ERROR: loadImageCache: \" + e);\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\tLog.i( TAG, \"ERROR: loadImageCache: \" + e);\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n \treturn bitmap;\n\t}", "public void recycleBitmapData(){\n\t\tif(bmpData != null){\n\t\t\tbmpData.recycle();\n\t\t\tbmpData = null;\n\t\t}\n\t}", "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 }", "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}", "public static Bitmap obtenerBitmapDesdeUriDeUnidadInternaDeImagenes(Context ctx, Uri uri) {\n Bitmap bm = null;\n try {\n bm = MediaStore.Images.Media.getBitmap(ctx.getContentResolver(), uri);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return bm;\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 }", "@Override\n protected void onPostExecute(Bitmap bitmap) {\n if (isCancelled()) {\n bitmap = null;\n }\n\n // Add bitmap to cache\n if (bitmap != null) {\n synchronized (sHardBitmapCache) {\n sHardBitmapCache.put(resourceId, bitmap);\n }\n }\n\n if (imageViewReference != null) {\n ImageView imageView = imageViewReference.get();\n BitmapDownloaderTask bitmapDownloaderTask = getBitmapDownloaderTask(imageView);\n // Change bitmap only if this process is still associated with it\n if (this == bitmapDownloaderTask) {\n imageView.setImageBitmap(bitmap);\n }\n }\n }", "public Bitmap buildResultBitmap() {\n if(mTempBitmap!=null) return mTempBitmap;\n Bitmap bitmap ;\n if(mRotateAngle!=0) bitmap = Util.rotateBitmap(mDocumentBitmap,mRotateAngle);\n else bitmap = Bitmap.createBitmap(mDocumentBitmap);\n\n switch (mFilter) {\n case FILTER_MAGIC:\n bitmap = ScanUtils.getMagicColorBitmap(bitmap);\n break;\n case FILTER_GRAY_SCALE:\n bitmap = ScanUtils.getGrayBitmap(bitmap);\n break;\n case FILTER_BnW:\n bitmap = ScanUtils.getBWBitmap(bitmap);\n break;\n }\n\n return bitmap;\n }", "public Bitmap getCacheImage(String tag) {\n return getCacheImage(0, 0, tag);\n }", "public Bitmap mo8781b() {\n if (this.f1291g) {\n return this.f1287c;\n }\n return this.f1286b;\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 }", "public Bitmap loadPhotoIcon() {\n Assert.isWorkerThread();\n int photoSize = context.getResources().getDimensionPixelSize(R.dimen.contact_photo_size);\n return drawableToBitmap(getIcon(), photoSize, photoSize);\n }", "private Bitmap decodeMapBitmap() {\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = false;\n options.inScaled = false;\n options.outWidth = 2048;\n options.outHeight = 2048;\n\n return BitmapFactory.decodeResource(getResources(), R.drawable.map, options);\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 }", "@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 Image getHotImage () {\r\n\tcheckWidget();\r\n\treturn hotImage;\r\n}", "public static Bitmap getPhotoBitmap(String path) {\n File imgFile = new File(Environment.getExternalStorageDirectory(), path);\n Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());\n return myBitmap;\n }", "public static Bitmap GetScoreSourceBitmap()\r\n\t{\r\n\t\tBitmap image = null;\r\n\t\tif(CGameHelper.m_GameContext != null)\r\n\t\t{\r\n\t\t\tResources res = CGameHelper.m_GameContext.getResources();\r\n\t\t\tif(res == null)\r\n\t\t\t\treturn image; \r\n\r\n\t\t\t//image = BitmapFactory.decodeResource(res, R.drawable.scores);\r\n\t\t\tif(m_ScoreSourceBitmap == null)\r\n\t\t\t{\r\n\t\t\t\tm_ScoreSourceBitmap = BitmapFactory.decodeResource(res, R.drawable.scores);\r\n\t\t\t}\r\n\t\t\timage = m_ScoreSourceBitmap;\r\n\t\t} \r\n\t\treturn image;\r\n\t}", "@TargetApi(Build.VERSION_CODES.LOLLIPOP)\n public Uri getLocalBitmapUri() {\n Drawable drawable = getResources().getDrawable(R.drawable.rp_icon3);\n Bitmap bmp = null;\n// bmp =Utility.user.getProfilePic();\n\n if (drawable instanceof BitmapDrawable){\n bmp = ((BitmapDrawable) getResources().getDrawable(R.drawable.rp_icon3)).getBitmap();\n }\n else\n {\n return null;\n }\n // Store image to default external storage directory\n Uri bmpUri = null;\n try {\n\n File file = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DOWNLOADS), \"share_image_\" + System.currentTimeMillis() + \".png\");\n file.getParentFile().mkdirs();\n FileOutputStream out = new FileOutputStream(file);\n bmp.compress(Bitmap.CompressFormat.PNG, 90, out);\n out.close();\n bmpUri = Uri.fromFile(file);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return bmpUri;\n }", "public Bitmap getBitmapFromURL(String src) {\n try {\n\n java.net.URL url = new java.net.URL(src);\n HttpURLConnection connection = (HttpURLConnection) url\n .openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n Bitmap myBitmap = BitmapFactory.decodeStream(input);\n\n return myBitmap;\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "public Bitmap decodeImage() {\n\t\treturn image == null ? null : image.decodeBitmap();\n\t}", "private Bitmap takeShareableScreenshot() {\n // https://stackoverflow.com/questions/2661536/how-to-programmatically-take-a-screenshot-in-android\n// cameraActionLayout.setVisibility(View.GONE);\n// resultLayout.setVisibility(View.GONE);\n try {\n // create bitmap screen capture\n View v1 = getWindow().getDecorView().getRootView();\n v1.setDrawingCacheEnabled(true);\n return Bitmap.createBitmap(v1.getDrawingCache());\n } catch (Throwable e) {\n // Several error may come out with file handling or OOM\n e.printStackTrace();\n makeToast(e.toString());\n Timber.e(\"Error capturing screenshot: \" + e.toString());\n return null;\n }\n// finally {\n// cameraActionLayout.setVisibility(View.VISIBLE);\n// resultLayout.setVisibility(View.VISIBLE);\n// }\n }", "void setImage(Bitmap bitmap);", "private Bitmap getBitmapFromUri(Uri uri) {\n ParcelFileDescriptor parcelFileDescriptor = null;\n try {\n parcelFileDescriptor =\n getActivity().getContentResolver().openFileDescriptor(uri, \"r\");\n FileDescriptor fileDescriptor = parcelFileDescriptor.getFileDescriptor();\n Bitmap image = BitmapFactory.decodeFileDescriptor(fileDescriptor);\n parcelFileDescriptor.close();\n return image;\n } catch (Exception e) {\n imageInfo += e.toString();\n //Toast.makeText(getActivity(),\"Failed to load image.\",Toast.LENGTH_SHORT).show();\n e.printStackTrace();\n return null;\n } finally {\n try {\n if (parcelFileDescriptor != null) {\n parcelFileDescriptor.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n imageInfo += e.toString();\n //Toast.makeText(getActivity(),\"Error closing ParcelFile Descriptor\",Toast.LENGTH_SHORT).show();\n }\n }\n }", "private Bitmap loadImageFromNetwork(String url) {\n try {\n InputStream is = new DefaultHttpClient().execute(new HttpGet(url))\n .getEntity().getContent();\n return BitmapFactory.decodeStream(is);\n } catch (Exception e) {\n return null;\n }\n }", "private BufferedImage CreateBuffedImage(WinFileMappingBuffer fm, boolean bWithAlphaChanle) {\n BitmapFileBuffer bitmap = new BitmapFileBuffer();\n if (!bitmap.Load(fm.getBuffer())) {\n return null;\n }\n return bitmap.GetBuffedImage(bWithAlphaChanle);\n }", "@Override\n\t\t\tpublic void putBitmap(String url, Bitmap bitmap) {\n\t\t\t\tcache.put(url, bitmap);\n\t\t\t}", "private static Bitmap getImage(byte[] image) {\n /**\n * @brief convert from byte array to bitmap\n */\n return BitmapFactory.decodeByteArray(image, 0, image.length);\n }", "private Bitmap getGalleryBitmap(@Nullable Intent data) {\n String imagePath = getImagePath(data);\n Thread askPermissionThread = ThreadFactory.createAskPermissionThread(this);\n\n askPermissionThread.start();\n\n try {\n askPermissionThread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return BitmapFactory.decodeFile(imagePath);\n }", "public void loadFromSavedBitmap() {\n if (bitmap != null) {\n // genera un nuovo puntatore ad una texture\n GLES20.glGenTextures(1, texture, 0);\n // lega questo puntatore ad una variabile disponibile all'app\n GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, texture[0]);\n\n // setta alcuni parametri che diranno a OpenGL come trattare la texture\n GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR);\n // caricamento della texture\n GLUtils.texImage2D(GLES20.GL_TEXTURE_2D, 0, bitmap, 0);\n // libera memoria\n bitmap.recycle();\n }\n resourcesLoaded++;\n\n MyGLRenderer.checkGlError(\"loadFromSavedBitmap\");\n }", "public Bitmap getBitmap() {\n\t\tBitmap bitmap;\n\t\tint intpixels[] = new int[getNrows()*getNcols()];\n\n// Log.i(\"min value\", Float.toString(getMinElevation()));\n// Log.i(\"max value\", Float.toString(getMaxElevation()));\n// Log.i(\"range value\", Float.toString(getMaxElevation()-getMinElevation()));\n\t\tfor(int k = 0; k<getNrows(); k++) {\n\t\t\tfor(int m=0; m<getNcols(); m++) {\n\t\t \t//normalize each float to a value from 0-255\n\n double range = 255/(getMaxElevation()-getMinElevation());\n\t\t \tintpixels[k+(m*getNrows())] = (int)(range*(getElevationData()[k][m]-getMinElevation()));\n\n //Log.i(\"pixel value\", Integer.toString(intpixels[m+(k*getNcols())]));\n\t\t \t//intpixels[k] = (int)( ((pixels[k]-min)/(max-min))*(double)255.0);\n\t\t \t//convert to greyscale ARGB value\n\t\t \t//intpixels[m+(k*getNcols())] = 0xFF000000 + intpixels[m+(k*getNcols())] + intpixels[m+(k*getNcols())]<<8 + intpixels[m+(k*getNcols())]<<16;\n\t\t\t}\t\n\t }\n\n for(int l=0;l<getNcols()*getNrows(); l++) {\n //intpixels[l] = 0xFF000000 + intpixels[l] + intpixels[l]<<8 + intpixels[l]<<16;\n intpixels[l] = Color.argb(255, intpixels[l], intpixels[l], intpixels[l]);\n }\n\t\tbitmap = Bitmap.createBitmap(intpixels, 0, getNrows(), getNrows(), getNcols(), Bitmap.Config.ARGB_8888);\n\n Matrix matrix = new Matrix();\n matrix.postRotate(90);\n bitmap = Bitmap.createBitmap(bitmap, 0, 0,\n bitmap.getWidth(), bitmap.getHeight(),\n matrix, true);\n try {\n FileOutputStream out = new FileOutputStream(\"/sdcard/field.png\");\n bitmap.compress(Bitmap.CompressFormat.PNG, 90, out);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n\n return bitmap;\n\t}", "private Bitmap m6554e() {\n if (this.f5071h == null) {\n this.f5071h = m6555f();\n }\n return this.f5071h;\n }", "public static Bitmap convertSingleBitmap (PicObject picOb){\n Bitmap bitmap = decodeBase64(picOb.getImage());\n captionListNews.add(picOb.getCaption());\n return bitmap;\n }", "public static Bitmap readBitMap(Context context, int resId) {\n BitmapFactory.Options opt = new BitmapFactory.Options();\n opt.inPreferredConfig = Bitmap.Config.RGB_565;\n opt.inPurgeable = true;\n opt.inInputShareable = true;\n\n InputStream is = context.getResources().openRawResource(resId);\n return BitmapFactory.decodeStream(is, null, opt);\n }", "public Bitmap decodeBitmap(int res) {\n Bitmap inBitmap = null;\n if (this.mSupportInBitmap && this.mRecycleBitmapQueue.size() >= 2) {\n inBitmap = this.mRecycleBitmapQueue.poll();\n }\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inMutable = true;\n options.inSampleSize = 1;\n options.inBitmap = inBitmap;\n try {\n return BitmapFactory.decodeResource(this.mContext.getResources(), res, options);\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public abstract void setUpBitmap(Context context);", "public Bitmap getBitmapFromURL(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 bitmap = BitmapFactory.decodeStream(input);\n return bitmap;\n }catch(IOException e){\n e.printStackTrace();\n return null;\n }\n }", "public void setBitmap(Bitmap bitmap) {\n\t\t\n\t}", "private static Bitmap readBitmapFromNetwork(URL url)\n {\n InputStream is = null;\n BufferedInputStream bis = null;\n Bitmap bmp = null;\n try\n {\n URLConnection conn = url.openConnection();\n conn.connect();\n is = conn.getInputStream();\n bis = new BufferedInputStream(is);\n bmp = BitmapFactory.decodeStream(bis);\n }\n catch (MalformedURLException e)\n {\n Log.e(TAG, \"Bad ad URL\", e);\n }\n catch (IOException e)\n {\n Log.e(TAG, \"Could not get remote image\", e);\n }\n finally\n {\n try\n {\n if (is != null) is.close();\n if (bis != null) bis.close();\n }\n catch (IOException e)\n {\n Log.w(TAG, \"Error closing stream.\");\n }\n }\n return bmp;\n }", "private byte[] getImageOne() {\n Bitmap icon = BitmapFactory.decodeResource(getApplicationContext().getResources(),\n R.drawable.image0);\n return ImageConvert.convertImage2ByteArray(icon);\n }", "@Override\n\t\t\t\tpublic Bitmap onPreSetBitmap(ImageView imageView, Bitmap loadedBitmap, String url, boolean loadedFromCache) {\n\t\t\t\t\treturn loadedBitmap;\n\t\t\t\t}" ]
[ "0.72365236", "0.71324337", "0.7117236", "0.7086068", "0.7013504", "0.7007645", "0.69312936", "0.6924373", "0.6832909", "0.682504", "0.68077534", "0.68004274", "0.67656493", "0.67489576", "0.6674666", "0.66337126", "0.65491796", "0.64994633", "0.64911634", "0.64835435", "0.6468195", "0.6465498", "0.64392847", "0.6405615", "0.6395422", "0.63951385", "0.6388856", "0.63854486", "0.63573986", "0.63445544", "0.6333893", "0.6322715", "0.6309067", "0.63089097", "0.6298937", "0.62964785", "0.6287603", "0.62671494", "0.626279", "0.62586594", "0.62384856", "0.62343657", "0.6226873", "0.62173676", "0.6206102", "0.62054044", "0.620475", "0.61919546", "0.6166282", "0.6159266", "0.61587125", "0.6155744", "0.6122606", "0.6119894", "0.6119748", "0.6114284", "0.61124843", "0.61110353", "0.6102978", "0.6092337", "0.60852873", "0.60763806", "0.6071196", "0.6062271", "0.60599166", "0.6040413", "0.60298055", "0.6019936", "0.6014597", "0.59948426", "0.598624", "0.59801286", "0.59641206", "0.59465283", "0.59354377", "0.59220976", "0.5921585", "0.5917975", "0.5909159", "0.5905496", "0.58921045", "0.58838534", "0.5883583", "0.5863016", "0.5845709", "0.5842472", "0.5842182", "0.58414245", "0.58401084", "0.5815488", "0.5814553", "0.5811435", "0.58056974", "0.58049345", "0.58038485", "0.57997626", "0.5799213", "0.5798062", "0.5797275", "0.57875997" ]
0.74360824
0
On Codec Frame Available, save Frame as Bitmap
@Override public void onFrameAvailable(SurfaceTexture surfaceTexture) { if(DEBUG) Log.d(TAG, "Frame available"); mGLHelper.drawFrame(sTexture, textureID); frame = mGLHelper.readPixels(mWidth, mHeight); frameProcessed(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface IFrameProcessor\n{\n /**\n * @param rawFrame Das Rohdatenframe\n * @return Das verarbeitete Frame\n */\n Bitmap processFrame(Bitmap rawFrame);\n}", "Bitmap getBitmap(){\n Bitmap bm = frame;\n frame = null;\n return bm;\n }", "private Image mat2Image(Mat frame)\r\n {\n MatOfByte buffer = new MatOfByte();\r\n // encode the frame in the buffer\r\n // HighGui.imencode(\".png\", frame, buffer);\r\n Imgcodecs.imencode(\".png\", frame, buffer);\r\n // build and return an Image created from the image encoded in the buffer\r\n return new Image(new ByteArrayInputStream(buffer.toArray()));\r\n }", "public synchronized Bitmap getNextFrame() {\n if (this.header.frameCount <= 0 || this.framePointer < 0) {\n if (Log.isLoggable(TAG, 3)) {\n String str = TAG;\n StringBuilder sb = new StringBuilder();\n sb.append(\"Unable to decode frame, frameCount=\");\n sb.append(this.header.frameCount);\n sb.append(\", framePointer=\");\n sb.append(this.framePointer);\n Log.d(str, sb.toString());\n }\n this.status = 1;\n }\n if (this.status != 1) {\n if (this.status != 2) {\n this.status = 0;\n if (this.block == null) {\n this.block = this.bitmapProvider.obtainByteArray(255);\n }\n GifFrame gifFrame = (GifFrame) this.header.frames.get(this.framePointer);\n int i = this.framePointer - 1;\n GifFrame gifFrame2 = i >= 0 ? (GifFrame) this.header.frames.get(i) : null;\n this.act = gifFrame.lct != null ? gifFrame.lct : this.header.gct;\n if (this.act == null) {\n if (Log.isLoggable(TAG, 3)) {\n String str2 = TAG;\n StringBuilder sb2 = new StringBuilder();\n sb2.append(\"No valid color table found for frame #\");\n sb2.append(this.framePointer);\n Log.d(str2, sb2.toString());\n }\n this.status = 1;\n return null;\n }\n if (gifFrame.transparency) {\n System.arraycopy(this.act, 0, this.pct, 0, this.act.length);\n this.act = this.pct;\n this.act[gifFrame.transIndex] = 0;\n }\n return setPixels(gifFrame, gifFrame2);\n }\n }\n if (Log.isLoggable(TAG, 3)) {\n String str3 = TAG;\n StringBuilder sb3 = new StringBuilder();\n sb3.append(\"Unable to decode frame, status=\");\n sb3.append(this.status);\n Log.d(str3, sb3.toString());\n }\n }", "@Override\n\tpublic void receiveFrameData(Camera camera, int avChannel, Bitmap bmp) {\n\t}", "private Image mat2Image(Mat frame)\n {\n MatOfByte buffer = new MatOfByte();\n // encode the frame in the buffer, according to the PNG format\n Highgui.imencode(\".png\", frame, buffer);\n // build and return an Image created from the image encoded in the\n // buffer\n return new Image(new ByteArrayInputStream(buffer.toArray()));\n }", "void renderFrame(){\n if(getPlayer().isChoosingFile()) return; // don't render while filechooser is active\n \n if(canvasFileWriter.writingMovieEnabled) chipCanvas.grabNextImage();\n chipCanvas.paintFrame(); // actively paint frame now, either with OpenGL or Java2D, depending on switch\n \n if(canvasFileWriter.writingMovieEnabled){\n canvasFileWriter.writeMovieFrame();\n }\n }", "private void bitmapToFile(){\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n Bitmap thumb,resized;\n thumb = ThumbnailUtils.createVideoThumbnail(selectedVideoPath,\n MediaStore.Images.Thumbnails.MINI_KIND);\n\n if(thumb!=null){\n resized = getResizedBitmap(thumb,120,100);\n }\n else { return;}\n\n resized.compress(Bitmap.CompressFormat.JPEG, 100, bytes);\n imgFile = new File(setFileDestinationPath());\n try {\n FileOutputStream fo = new FileOutputStream(imgFile);\n fo.write(bytes.toByteArray());\n fo.flush();\n fo.close();\n } catch (IOException e) {\n e.printStackTrace();\n broadcastResult(false);\n }\n }", "@Override\n public void receiveFrameDataForMediaCodec(Camera camera, int avChannel, byte[] buf, int length, int pFrmNo, byte[] pFrmInfoBuf, boolean\n isIframe, int codecId) {\n\n }", "@androidx.annotation.Nullable\r\n public synchronized android.graphics.Bitmap getNextFrame() {\r\n /*\r\n r7 = this;\r\n monitor-enter(r7);\r\n r0 = r7.header;\t Catch:{ all -> 0x00ea }\r\n r0 = r0.frameCount;\t Catch:{ all -> 0x00ea }\r\n r1 = 3;\r\n r2 = 1;\r\n if (r0 <= 0) goto L_0x000d;\r\n L_0x0009:\r\n r0 = r7.framePointer;\t Catch:{ all -> 0x00ea }\r\n if (r0 >= 0) goto L_0x003b;\r\n L_0x000d:\r\n r0 = TAG;\t Catch:{ all -> 0x00ea }\r\n r0 = android.util.Log.isLoggable(r0, r1);\t Catch:{ all -> 0x00ea }\r\n if (r0 == 0) goto L_0x0039;\r\n L_0x0015:\r\n r0 = TAG;\t Catch:{ all -> 0x00ea }\r\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00ea }\r\n r3.<init>();\t Catch:{ all -> 0x00ea }\r\n r4 = \"Unable to decode frame, frameCount=\";\r\n r3.append(r4);\t Catch:{ all -> 0x00ea }\r\n r4 = r7.header;\t Catch:{ all -> 0x00ea }\r\n r4 = r4.frameCount;\t Catch:{ all -> 0x00ea }\r\n r3.append(r4);\t Catch:{ all -> 0x00ea }\r\n r4 = \", framePointer=\";\r\n r3.append(r4);\t Catch:{ all -> 0x00ea }\r\n r4 = r7.framePointer;\t Catch:{ all -> 0x00ea }\r\n r3.append(r4);\t Catch:{ all -> 0x00ea }\r\n r3 = r3.toString();\t Catch:{ all -> 0x00ea }\r\n android.util.Log.d(r0, r3);\t Catch:{ all -> 0x00ea }\r\n L_0x0039:\r\n r7.status = r2;\t Catch:{ all -> 0x00ea }\r\n L_0x003b:\r\n r0 = r7.status;\t Catch:{ all -> 0x00ea }\r\n r3 = 0;\r\n if (r0 == r2) goto L_0x00c8;\r\n L_0x0040:\r\n r0 = r7.status;\t Catch:{ all -> 0x00ea }\r\n r4 = 2;\r\n if (r0 != r4) goto L_0x0047;\r\n L_0x0045:\r\n goto L_0x00c8;\r\n L_0x0047:\r\n r0 = 0;\r\n r7.status = r0;\t Catch:{ all -> 0x00ea }\r\n r4 = r7.block;\t Catch:{ all -> 0x00ea }\r\n if (r4 != 0) goto L_0x0058;\r\n L_0x004e:\r\n r4 = r7.bitmapProvider;\t Catch:{ all -> 0x00ea }\r\n r5 = 255; // 0xff float:3.57E-43 double:1.26E-321;\r\n r4 = r4.obtainByteArray(r5);\t Catch:{ all -> 0x00ea }\r\n r7.block = r4;\t Catch:{ all -> 0x00ea }\r\n L_0x0058:\r\n r4 = r7.header;\t Catch:{ all -> 0x00ea }\r\n r4 = r4.frames;\t Catch:{ all -> 0x00ea }\r\n r5 = r7.framePointer;\t Catch:{ all -> 0x00ea }\r\n r4 = r4.get(r5);\t Catch:{ all -> 0x00ea }\r\n r4 = (com.bumptech.glide.gifdecoder.GifFrame) r4;\t Catch:{ all -> 0x00ea }\r\n r5 = r7.framePointer;\t Catch:{ all -> 0x00ea }\r\n r5 = r5 - r2;\r\n if (r5 < 0) goto L_0x0074;\r\n L_0x0069:\r\n r6 = r7.header;\t Catch:{ all -> 0x00ea }\r\n r6 = r6.frames;\t Catch:{ all -> 0x00ea }\r\n r5 = r6.get(r5);\t Catch:{ all -> 0x00ea }\r\n r5 = (com.bumptech.glide.gifdecoder.GifFrame) r5;\t Catch:{ all -> 0x00ea }\r\n goto L_0x0075;\r\n L_0x0074:\r\n r5 = r3;\r\n L_0x0075:\r\n r6 = r4.lct;\t Catch:{ all -> 0x00ea }\r\n if (r6 == 0) goto L_0x007c;\r\n L_0x0079:\r\n r6 = r4.lct;\t Catch:{ all -> 0x00ea }\r\n goto L_0x0080;\r\n L_0x007c:\r\n r6 = r7.header;\t Catch:{ all -> 0x00ea }\r\n r6 = r6.gct;\t Catch:{ all -> 0x00ea }\r\n L_0x0080:\r\n r7.act = r6;\t Catch:{ all -> 0x00ea }\r\n r6 = r7.act;\t Catch:{ all -> 0x00ea }\r\n if (r6 != 0) goto L_0x00aa;\r\n L_0x0086:\r\n r0 = TAG;\t Catch:{ all -> 0x00ea }\r\n r0 = android.util.Log.isLoggable(r0, r1);\t Catch:{ all -> 0x00ea }\r\n if (r0 == 0) goto L_0x00a6;\r\n L_0x008e:\r\n r0 = TAG;\t Catch:{ all -> 0x00ea }\r\n r1 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00ea }\r\n r1.<init>();\t Catch:{ all -> 0x00ea }\r\n r4 = \"No valid color table found for frame #\";\r\n r1.append(r4);\t Catch:{ all -> 0x00ea }\r\n r4 = r7.framePointer;\t Catch:{ all -> 0x00ea }\r\n r1.append(r4);\t Catch:{ all -> 0x00ea }\r\n r1 = r1.toString();\t Catch:{ all -> 0x00ea }\r\n android.util.Log.d(r0, r1);\t Catch:{ all -> 0x00ea }\r\n L_0x00a6:\r\n r7.status = r2;\t Catch:{ all -> 0x00ea }\r\n monitor-exit(r7);\r\n return r3;\r\n L_0x00aa:\r\n r1 = r4.transparency;\t Catch:{ all -> 0x00ea }\r\n if (r1 == 0) goto L_0x00c2;\r\n L_0x00ae:\r\n r1 = r7.act;\t Catch:{ all -> 0x00ea }\r\n r2 = r7.pct;\t Catch:{ all -> 0x00ea }\r\n r3 = r7.act;\t Catch:{ all -> 0x00ea }\r\n r3 = r3.length;\t Catch:{ all -> 0x00ea }\r\n java.lang.System.arraycopy(r1, r0, r2, r0, r3);\t Catch:{ all -> 0x00ea }\r\n r1 = r7.pct;\t Catch:{ all -> 0x00ea }\r\n r7.act = r1;\t Catch:{ all -> 0x00ea }\r\n r1 = r7.act;\t Catch:{ all -> 0x00ea }\r\n r2 = r4.transIndex;\t Catch:{ all -> 0x00ea }\r\n r1[r2] = r0;\t Catch:{ all -> 0x00ea }\r\n L_0x00c2:\r\n r0 = r7.setPixels(r4, r5);\t Catch:{ all -> 0x00ea }\r\n monitor-exit(r7);\r\n return r0;\r\n L_0x00c8:\r\n r0 = TAG;\t Catch:{ all -> 0x00ea }\r\n r0 = android.util.Log.isLoggable(r0, r1);\t Catch:{ all -> 0x00ea }\r\n if (r0 == 0) goto L_0x00e8;\r\n L_0x00d0:\r\n r0 = TAG;\t Catch:{ all -> 0x00ea }\r\n r1 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00ea }\r\n r1.<init>();\t Catch:{ all -> 0x00ea }\r\n r2 = \"Unable to decode frame, status=\";\r\n r1.append(r2);\t Catch:{ all -> 0x00ea }\r\n r2 = r7.status;\t Catch:{ all -> 0x00ea }\r\n r1.append(r2);\t Catch:{ all -> 0x00ea }\r\n r1 = r1.toString();\t Catch:{ all -> 0x00ea }\r\n android.util.Log.d(r0, r1);\t Catch:{ all -> 0x00ea }\r\n L_0x00e8:\r\n monitor-exit(r7);\r\n return r3;\r\n L_0x00ea:\r\n r0 = move-exception;\r\n monitor-exit(r7);\r\n throw r0;\r\n */\r\n throw new UnsupportedOperationException(\"Method not decompiled: com.bumptech.glide.gifdecoder.StandardGifDecoder.getNextFrame():android.graphics.Bitmap\");\r\n }", "public Mat beforeDataEncoded(Mat frame);", "public CaptureImage()\r\n\t{\r\n\t\tSystem.loadLibrary(Core.NATIVE_LIBRARY_NAME);\r\n\t\tcapturedFrame = new Mat();\r\n\t\tprocessedFrame = new Mat();\r\n\t\tboard = new byte[32];\r\n\t\tfor (int i=0;i<board.length;i++){\r\n\t\t\tboard[i] = 0;\r\n\t\t}\r\n\t\tcaptured = new byte[12];\r\n\t}", "public BitmapEncoder() {\n this((Bitmap.CompressFormat) null, 90);\n }", "private void doEncodeDecodeVideoFromBuffer(MediaCodec encoder, int encoderColorFormat,\n MediaCodec decoder, boolean toSurface) {\n final int TIMEOUT_USEC = 10000;\n ByteBuffer[] encoderInputBuffers = encoder.getInputBuffers();\n ByteBuffer[] encoderOutputBuffers = encoder.getOutputBuffers();\n ByteBuffer[] decoderInputBuffers = null;\n ByteBuffer[] decoderOutputBuffers = null;\n MediaCodec.BufferInfo info = new MediaCodec.BufferInfo();\n MediaFormat decoderOutputFormat = null;\n int generateIndex = 0;\n int checkIndex = 0;\n int badFrames = 0;\n boolean decoderConfigured = false;\n OutputSurface outputSurface = null;\n\n // The size of a frame of video data, in the formats we handle, is stride*sliceHeight\n // for Y, and (stride/2)*(sliceHeight/2) for each of the Cb and Cr channels. Application\n // of algebra and assuming that stride==width and sliceHeight==height yields:\n\n // Just out of curiosity.\n long rawSize = 0;\n long encodedSize = 0;\n\n // Save a copy to disk. Useful for debugging the test. Note this is a raw elementary\n // stream, not a .mp4 file, so not all players will know what to do with it.\n\n\n if (toSurface) {\n outputSurface = new OutputSurface(mWidth, mHeight);\n }\n\n // Loop until the output side is done.\n boolean inputDone = false;\n boolean encoderDone = false;\n boolean outputDone = false;\n while (!outputDone) {\n Log.e(TAG, \"loop\");\n\n // If we're not done submitting frames, generate a new one and submit it. By\n // doing this on every loop we're working to ensure that the encoder always has\n // work to do.\n //\n // We don't really want a timeout here, but sometimes there's a delay opening\n // the encoder device, so a short timeout can keep us from spinning hard.\n if (!inputDone) {\n int inputBufIndex = encoder.dequeueInputBuffer(TIMEOUT_USEC);\n Log.e(TAG, \"inputBufIndex=\" + inputBufIndex);\n if (inputBufIndex >= 0) {\n long ptsUsec = computePresentationTime(generateIndex);\n if (generateIndex == NUM_FRAMES) {\n // Send an empty frame with the end-of-stream flag set. If we set EOS\n // on a frame with data, that frame data will be ignored, and the\n // output will be short one frame.\n encoder.queueInputBuffer(inputBufIndex, 0, 0, ptsUsec, MediaCodec.BUFFER_FLAG_END_OF_STREAM);\n inputDone = true;\n Log.e(TAG, \"sent input EOS (with zero-length frame)\");\n } else {\n// generateFrame(generateIndex, encoderColorFormat, mFrame);\n generateFrame(generateIndex);\n\n ByteBuffer inputBuf = encoderInputBuffers[inputBufIndex];\n // the buffer should be sized to hold one full frame\n inputBuf.clear();\n inputBuf.put(mFrame);\n\n encoder.queueInputBuffer(inputBufIndex, 0, mFrame.length, ptsUsec, 0);\n Log.e(TAG, \"submitted frame \" + generateIndex + \" to enc\");\n }\n generateIndex++;\n } else {\n // either all in use, or we timed out during initial setup\n Log.e(TAG, \"input buffer not available\");\n }\n }\n\n // Check for output from the encoder. If there's no output yet, we either need to\n // provide more input, or we need to wait for the encoder to work its magic. We\n // can't actually tell which is the case, so if we can't get an output buffer right\n // away we loop around and see if it wants more input.\n //\n // Once we get EOS from the encoder, we don't need to do this anymore.\n if (!encoderDone) {\n int encoderStatus = encoder.dequeueOutputBuffer(info, TIMEOUT_USEC);\n if (encoderStatus == MediaCodec.INFO_TRY_AGAIN_LATER) {\n // no output available yet\n Log.e(TAG, \"no output from encoder available\");\n } else if (encoderStatus == MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED) {\n // not expected for an encoder\n encoderOutputBuffers = encoder.getOutputBuffers();\n Log.e(TAG, \"encoder output buffers changed\");\n } else if (encoderStatus == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED) {\n // not expected for an encoder\n\n\n if (mMuxerStarted) {\n throw new RuntimeException(\"format changed twice\");\n }\n MediaFormat newFormat = encoder.getOutputFormat();\n Log.e(TAG, \"encoder output format changed: \" + newFormat);\n\n // now that we have the Magic Goodies, start the muxer\n mTrackIndex = mMuxer.addTrack(newFormat);\n Log.e(TAG, \"muxer defined muxer format: \" + newFormat);\n mMuxer.start();\n mMuxerStarted = true;\n\n } else if (encoderStatus < 0) {\n Log.e(\"\", \"unexpected result from encoder.dequeueOutputBuffer: \" + encoderStatus);\n } else { // encoderStatus >= 0\n ByteBuffer encodedData = encoderOutputBuffers[encoderStatus];\n if (encodedData == null) {\n Log.e(\"\", \"encoderOutputBuffer \" + encoderStatus + \" was null\");\n }\n\n // It's usually necessary to adjust the ByteBuffer values to match BufferInfo.\n encodedData.position(info.offset);\n encodedData.limit(info.offset + info.size);\n\n encodedSize += info.size;\n\n if ((info.flags & MediaCodec.BUFFER_FLAG_CODEC_CONFIG) != 0) {\n // Codec config info. Only expected on first packet. One way to\n // handle this is to manually stuff the data into the MediaFormat\n // and pass that to configure(). We do that here to exercise the API.\n\n MediaFormat format =\n MediaFormat.createVideoFormat(MIME_TYPE, mWidth, mHeight);\n format.setByteBuffer(\"csd-0\", encodedData);\n decoder.configure(format, toSurface ? outputSurface.getSurface() : null, null, 0);\n\n decoder.start();\n decoderInputBuffers = decoder.getInputBuffers();\n decoderOutputBuffers = decoder.getOutputBuffers();\n decoderConfigured = true;\n Log.e(TAG, \"decoder configured (\" + info.size + \" bytes)\" + format);\n } else {\n // Get a decoder input buffer, blocking until it's available.\n\n int inputBufIndex = decoder.dequeueInputBuffer(-1);\n ByteBuffer inputBuf = decoderInputBuffers[inputBufIndex];\n inputBuf.clear();\n inputBuf.put(encodedData);\n decoder.queueInputBuffer(inputBufIndex, 0, info.size,\n info.presentationTimeUs, info.flags);\n\n encoderDone = (info.flags & MediaCodec.BUFFER_FLAG_END_OF_STREAM) != 0;\n Log.e(TAG, \"passed \" + info.size + \" bytes to decoder\"\n + (encoderDone ? \" (EOS)\" : \"\"));\n Log.e(\"encoderDone\", encoderDone + \"\");\n }\n\n encoder.releaseOutputBuffer(encoderStatus, false);\n }\n }\n\n // Check for output from the decoder. We want to do this on every loop to avoid\n // the possibility of stalling the pipeline. We use a short timeout to avoid\n // burning CPU if the decoder is hard at work but the next frame isn't quite ready.\n //\n // If we're decoding to a Surface, we'll get notified here as usual but the\n // ByteBuffer references will be null. The data is sent to Surface instead.\n if (decoderConfigured) {\n int decoderStatus = decoder.dequeueOutputBuffer(info, 3 * TIMEOUT_USEC);\n if (decoderStatus == MediaCodec.INFO_TRY_AGAIN_LATER) {\n // no output available yet\n Log.e(TAG, \"no output from decoder available\");\n } else if (decoderStatus == MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED) {\n // The storage associated with the direct ByteBuffer may already be unmapped,\n // so attempting to access data through the old output buffer array could\n // lead to a native crash.\n Log.e(TAG, \"decoder output buffers changed\");\n decoderOutputBuffers = decoder.getOutputBuffers();\n } else if (decoderStatus == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED) {\n // this happens before the first frame is returned\n decoderOutputFormat = decoder.getOutputFormat();\n Log.e(TAG, \"decoder output format changed: \" +\n decoderOutputFormat);\n } else if (decoderStatus < 0) {\n Log.e(TAG, \"unexpected result from deocder.dequeueOutputBuffer: \" + decoderStatus);\n\n } else { // decoderStatus >= 0\n if (!toSurface) {\n ByteBuffer outputFrame = decoderOutputBuffers[decoderStatus];\n\n outputFrame.position(info.offset);\n outputFrame.limit(info.offset + info.size);\n mMuxer.writeSampleData(mTrackIndex, outputFrame,\n info);\n rawSize += info.size;\n if (info.size == 0) {\n Log.e(TAG, \"got empty frame\");\n } else {\n Log.e(TAG, \"decoded, checking frame \" + checkIndex);\n\n if (!checkFrame(checkIndex++, decoderOutputFormat, outputFrame)) {\n badFrames++;\n }\n }\n\n if ((info.flags & MediaCodec.BUFFER_FLAG_END_OF_STREAM) != 0) {\n Log.e(TAG, \"output EOS\");\n outputDone = true;\n }\n decoder.releaseOutputBuffer(decoderStatus, false /*render*/);\n } else {\n Log.e(TAG, \"surface decoder given buffer \" + decoderStatus +\n \" (size=\" + info.size + \")\");\n rawSize += info.size;\n if ((info.flags & MediaCodec.BUFFER_FLAG_END_OF_STREAM) != 0) {\n Log.e(TAG, \"output EOS\");\n outputDone = true;\n }\n\n boolean doRender = (info.size != 0);\n\n // As soon as we call releaseOutputBuffer, the buffer will be forwarded\n // to SurfaceTexture to convert to a texture. The API doesn't guarantee\n // that the texture will be available before the call returns, so we\n // need to wait for the onFrameAvailable callback to fire.\n decoder.releaseOutputBuffer(decoderStatus, doRender);\n if (doRender) {\n Log.e(TAG, \"awaiting frame \" + checkIndex);\n\n outputSurface.awaitNewImage();\n outputSurface.drawImage();\n if (!checkSurfaceFrame(checkIndex++)) {\n badFrames++;\n }\n }\n }\n }\n }\n }\n\n Log.e(TAG, \"decoded \" + checkIndex + \" frames at \"\n + mWidth + \"x\" + mHeight + \": raw=\" + rawSize + \", enc=\" + encodedSize);\n\n if (outputSurface != null) {\n outputSurface.release();\n }\n\n if (checkIndex != NUM_FRAMES) {\n\n Log.e(TAG, \"awaiting frame \" + checkIndex);\n }\n if (badFrames != 0) {\n Log.e(TAG, \"Found \" + badFrames + \" bad frames\");\n }\n }", "public SurfaceViewEncode(Activity context ) {\n super(context);\n\n this.mContext = context;\n\n /* File file = new File(\"/sdcard/a.264\");\n if (file.exists()) {\n file.delete();\n }\n try {\n file.createNewFile();\n fos = new FileOutputStream(file);\n } catch (FileNotFoundException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }*/\n\n\n }", "@Override\n\t\tpublic void onPreviewFrame(byte[] data, Camera camera) {\n\n\t\t\tif (mCamera == null)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSize size = mCamera.getParameters().getPreviewSize();\n\t\t\tLog.w(\"支持格式\", mCamera.getParameters().getPreviewFormat()+\n\t\t\t\t\t\", w: \" + size.width +\n\t\t\t\t\t\", h: \" + size.height);\n\n\t\t\t//decodeToBitMap(data, camera);\n\n\t\t}", "public synchronized Bitmap mo12199k() {\n if (this.f10961p.f10995c <= 0 || this.f10959n < 0) {\n String str = f10944y;\n StringBuilder sb = new StringBuilder();\n sb.append(\"unable to decode frame, frameCount=\");\n sb.append(this.f10961p.f10995c);\n sb.append(\" framePointer=\");\n sb.append(this.f10959n);\n C3111h1.m14931d(str, sb.toString());\n this.f10965t = 1;\n }\n if (this.f10965t != 1) {\n if (this.f10965t != 2) {\n this.f10965t = 0;\n C3072b1 b1Var = (C3072b1) this.f10961p.f10997e.get(this.f10959n);\n int i = this.f10959n - 1;\n C3072b1 b1Var2 = i >= 0 ? (C3072b1) this.f10961p.f10997e.get(i) : null;\n this.f10946a = b1Var.f10980k != null ? b1Var.f10980k : this.f10961p.f10993a;\n if (this.f10946a == null) {\n String str2 = f10944y;\n StringBuilder sb2 = new StringBuilder();\n sb2.append(\"No Valid Color Table for frame #\");\n sb2.append(this.f10959n);\n C3111h1.m14931d(str2, sb2.toString());\n this.f10965t = 1;\n return null;\n }\n if (b1Var.f10975f) {\n System.arraycopy(this.f10946a, 0, this.f10947b, 0, this.f10946a.length);\n this.f10946a = this.f10947b;\n this.f10946a[b1Var.f10977h] = 0;\n }\n return m14713a(b1Var, b1Var2);\n }\n }\n String str3 = f10944y;\n StringBuilder sb3 = new StringBuilder();\n sb3.append(\"Unable to decode frame, status=\");\n sb3.append(this.f10965t);\n C3111h1.m14931d(str3, sb3.toString());\n return null;\n }", "private void markBitmap(int frameNo){\n int bit = frameNo/32;\n int mask = frameNo%32;\n bitMap[bit] = bitMap[bit]|MASK[mask];\n }", "public static void saveFrame(JInternalFrame frm) {\n\t\tsaveAsJPG(frm, \"C:/MyFrame2.jpg\");\r\n\t}", "public void set16BitMode() {\n/* 111 */ this.dstPixelFormat = 32859;\n/* */ }", "public static void saveMyBitmap(String bitName,Bitmap mBitmap){\r\n File f = new File(bitName);\r\n try {\r\n f.createNewFile();\r\n FileOutputStream fOut = null;\r\n try {\r\n fOut = new FileOutputStream(f);\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n mBitmap.compress(Bitmap.CompressFormat.JPEG, 100, fOut);\r\n fOut.flush();\r\n fOut.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void saveAttributes() {\n o_width = width;\n o_height = height;\n o_fps = fps;\n o_bps = bps;\n o_totalFrames = totalFrames;\n }", "@Override\n\t\t\tpublic void onPreviewFrame(byte[] data, Camera camera) {\n\n\t\t\t\tCamera.Parameters params = mCamera.getParameters();\n\n\t\t\t\tint w = params.getPreviewSize().width;\n\t\t\t\tint h = params.getPreviewSize().height;\n\t\t\t\tint format = params.getPreviewFormat ();\n\n\t\t\t\t//\tBitmap imageBitap = new Bitmap();\n\n\n\t\t\t\tYuvImage image = new YuvImage(data, format, w, h, null);\n\n\t\t\t\tByteArrayOutputStream out = new ByteArrayOutputStream();\n\t\t\t\tRect area = new Rect(0, 0, w, h);\n\t\t\t\timage.compressToJpeg(area, 50, out);\n\t\t\t\tstreamingImage = BitmapFactory.decodeByteArray(out.toByteArray(), 0, out.size());\n\n\n\n\t\t\t\tByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n\t\t\t\tstreamingImage = Bitmap.createScaledBitmap(streamingImage, 160, streamingImage.getHeight()/(streamingImage.getWidth()/160), true);\n\t\t\t\tstreamingImage.compress( CompressFormat.JPEG, 30, outputStream) ; \n\t\t\t\tbyte[] imageByte = outputStream.toByteArray() ; \n\n\t\t\t\tint len;\n\n\t\t\t\tbyte[] byteLen = new byte[4];\n\t\t\t\tbyte[] sendByte = new byte[DataConstants.sendingSize];\n\n\t\t\t\tByteArrayInputStream inputStream = new ByteArrayInputStream(imageByte);\n\n\t\t\t\tbyteLen = DataConstants.intToByteArray(imageByte.length);\n\n\t\t\t\tflag_isSendOK = false;\n\n\t\t\t\tif(flag_isChangeOK == true){\n\t\t\t\t\ttry {\n\t\t\t\t\t\twhile((len=inputStream.read(sendByte))!=-1){\n\t\t\t\t\t\t\tsendingArr[sendingImageIndex].arr[0] = 8;\n\t\t\t\t\t\t\tsendingArr[sendingImageIndex].arr[1] = 28;\n\t\t\t\t\t\t\tsendingArr[sendingImageIndex].arr[2] = 16; \n\t\t\t\t\t\t\tsendingArr[sendingImageIndex].arr[3] = (byte) sendingImageIndex;\n\t\t\t\t\t\t\tsendingArr[sendingImageIndex].arr[4] = byteLen[0];\n\t\t\t\t\t\t\tsendingArr[sendingImageIndex].arr[5] = byteLen[1];\n\t\t\t\t\t\t\tsendingArr[sendingImageIndex].arr[6] = byteLen[2];\n\t\t\t\t\t\t\tsendingArr[sendingImageIndex].arr[7] = byteLen[3];\n\n\t\t\t\t\t\t\tfor(int eof=8; eof<len+8; eof++){\n\t\t\t\t\t\t\t\tsendingArr[sendingImageIndex].arr[eof] = sendByte[eof-8];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (IOException e) { \n\t\t\t\t\t\t//TODO: rano said good jam! \n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} \n\n\t\t\t\t\t// TODO: �ڵ鷯 �θ���\n\t\t\t\t\tsendingImageIndexMax = sendingImageIndex;\n\t\t\t\t\tsendingImageIndex = 1;\n\t\t\t\t\tflag_isSendOK = true;\n\t\t\t\t\t//\t\t\t\tsendHandler.sendEmptyMessage(0);\n\n\t\t\t\t}\n\t\t\t}", "private void configurarCodec(){\n\n\t\t// Necessario para utilizar o Processor como um Player.\n\t\tprocessor.setContentDescriptor(null);\n\n\n\t\tfor (int i = 0; i < processor.getTrackControls().length; i++) {\n\n\t\t\tif (processor.getTrackControls()[i].getFormat() instanceof VideoFormat) {\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Instantiate and set the frame access codec to the data flow path.\n\t\t\t\t\tTrackControl videoTrack = processor.getTrackControls()[i];\n\t\t\t\t\tCodec codec[] = { new CodecVideo() };\n\t\t\t\t\tvideoTrack.setCodecChain(codec);\n\t\t\t\t\tbreak;\n\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\n\t\t\t}\n\t\t}\n\n\t\tprocessor.prefetch();\n\n\t}", "public interface alloc_frame_callback extends Callback {\n\t\tint apply(AVCodecContext avctx, AVFrame frame);\n\t}", "@Override\n public void onSurfaceTextureUpdated(SurfaceTexture surface) {\n mTextView02.setText(String.valueOf(mDetector.get_rect_x()+mDetector.get_rect_width()/2) +\", \" + String.valueOf(mDetector.get_rect_y()+mDetector.get_rect_height()/2)+\" \"+String.valueOf(mDetector.width)+\", \"+String.valueOf(mDetector.height));\n\n // TODO Auto-generated method stub\n //Image processing thread\n new Thread(new Runnable() {\n @Override\n public void run() {\n if (step_count != 3){\n step_count++;\n return;\n }\n else{\n step_count = 0;\n }\n //Variables for socket transmission\n //int i = 0;\n //DataOutputStream dos = null;\n\n //Get bitmap\n Bitmap frame_bmp = mSurfaceView.getBitmap();\n\n //Send the bitmap to PC\n /*ByteBuffer b = ByteBuffer.allocate(frame_bmp.getByteCount());\n frame_bmp.copyPixelsToBuffer(b);\n byte[] byte_array = b.array();\n InputStream is = new ByteArrayInputStream(byte_array);\n BufferedInputStream bis = new BufferedInputStream(is); */\n\n /*ByteArrayOutputStream stream = new ByteArrayOutputStream();\n frame_bmp.compress(Bitmap.CompressFormat.JPEG, 30,stream);\n byte[] byteArray = stream.toByteArray();\n InputStream is = new ByteArrayInputStream(byteArray);\n BufferedInputStream bis = new BufferedInputStream(is);\n\n Socket socket = null;\n try {\n socket = new Socket(myRouter_pc_ip, 8080);\n dos = new DataOutputStream(socket.getOutputStream());\n while ((i = bis.read()) > -1)\n dos.write(i);\n }\n catch(Exception e){\n e.printStackTrace();\n }\n finally{\n try{\n bis.close();\n }\n catch (Exception e){\n e.printStackTrace();\n }\n if (dos != null){\n try{\n dos.flush();\n dos.close();\n }\n catch (Exception e){\n e.printStackTrace();\n }\n }\n if (socket != null){\n try{\n socket.close();\n }\n catch (Exception e){\n e.printStackTrace();\n }\n }\n } */\n\n\n Utils.bitmapToMat(frame_bmp, mRgba); // frame_bmp is in ARGB format, mRgba is in RBGA format\n\n //Todo: Do image processing stuff here\n mRgba.convertTo(mRgba,-1,2,0); // Increase intensity by 2\n\n if (mIsColorSelected) {\n //Show the error-corrected color\n mBlobColorHsv = mDetector.get_new_hsvColor();\n mBlobColorRgba = converScalarHsv2Rgba(mBlobColorHsv);\n\n //Debug\n Log.i(TAG, \"mDetector rgba color: (\" + mBlobColorRgba.val[0] + \", \" + mBlobColorRgba.val[1] +\n \", \" + mBlobColorRgba.val[2] + \", \" + mBlobColorRgba.val[3] + \")\");\n Log.i(TAG, \"mDetector hsv color: (\" + mBlobColorHsv.val[0] + \", \" + mBlobColorHsv.val[1] +\n \", \" + mBlobColorHsv.val[2] + \", \" + mBlobColorHsv.val[3] + \")\");\n\n mDetector.process(mRgba);\n List<MatOfPoint> contours = mDetector.getContours();\n Log.e(TAG, \"Contours count: \" + contours.size());\n Imgproc.drawContours(mRgba, contours, -1, CONTOUR_COLOR,2);\n\n Mat colorLabel = mRgba.submat(4, 68, 4, 68);\n colorLabel.setTo(mBlobColorRgba);\n\n Mat spectrumLabel = mRgba.submat(4, 4 + mSpectrum.rows(), 70, 70 + mSpectrum.cols());\n mSpectrum.copyTo(spectrumLabel);\n }\n\n\n Utils.matToBitmap(mRgba, frame_bmp);\n Canvas canvas = mSurfaceView_Display.lockCanvas();\n canvas.drawColor(0, android.graphics.PorterDuff.Mode.CLEAR);\n canvas.drawBitmap(frame_bmp, new Rect(0, 0, frame_bmp.getWidth(), frame_bmp.getHeight()),\n new Rect((canvas.getWidth() - frame_bmp.getWidth()) / 2,\n (canvas.getHeight() - frame_bmp.getHeight()) / 2,\n (canvas.getWidth() - frame_bmp.getWidth()) / 2 + frame_bmp.getWidth(),\n (canvas.getHeight() - frame_bmp.getHeight()) / 2 + frame_bmp.getHeight()), null);\n mSurfaceView_Display.unlockCanvasAndPost(canvas);\n }\n }).start();\n }", "private void convertBitmapToFile(Bitmap response, CustomRepoListener<File> listener) {\n //create a file to write bitmap data\n\n File f = new File(getFilename());\n try {\n f.createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n//Convert bitmap to byte array\n Bitmap bitmap = response;\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.PNG, 0 /*ignored for PNG*/, bos);\n byte[] bitmapdata = bos.toByteArray();\n\n//write the bytes in file\n FileOutputStream fos = null;\n try {\n fos = new FileOutputStream(f);\n fos.write(bitmapdata);\n fos.flush();\n fos.close();\n listener.onSuccess(f);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void saveScreenshot() {\n if (ensureSDCardAccess()) {\n Bitmap bitmap = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n doDraw(1, canvas);\n File file = new File(mScreenshotPath + \"/\" + System.currentTimeMillis() + \".jpg\");\n FileOutputStream fos;\n try {\n fos = new FileOutputStream(file);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos);\n fos.close();\n } catch (FileNotFoundException e) {\n Log.e(\"Panel\", \"FileNotFoundException\", e);\n } catch (IOException e) {\n Log.e(\"Panel\", \"IOEception\", e);\n }\n }\n }", "@Override\n\tpublic void receiveFrameDataForMediaCodec(Camera camera, int i,\n\t\t\tbyte[] abyte0, int j, int k, byte[] abyte1, boolean flag, int l) {\n\t\t\n\t}", "public void showbitmap4() {\n \n \t}", "public void onFramePickup(ym iba) {}", "public Void call() {\n if (C42323i.this.f110090e == null || C42323i.this.f110090e.isEmpty()) {\n return null;\n }\n for (String a : C42323i.this.f110090e) {\n Bitmap a2 = C42341f.m134633a(a, C42319f.f110087a);\n if (a2 != null) {\n String a3 = C42323i.this.f110077c.mo88162a();\n C42341f.m134636a(a2, new File(a3), 70, CompressFormat.JPEG);\n C42323i.this.f110075a.addFrameAtLastSegment(a3);\n }\n }\n return null;\n }", "private static Bitmap m8222a(URLConnection uRLConnection) {\n InputStream inputStream = uRLConnection.getInputStream();\n try {\n Bitmap a = C2995v.f8235a.m8223a(inputStream);\n return a;\n } finally {\n inputStream.close();\n }\n }", "void mo12205a(Bitmap bitmap);", "public interface CompleteDisplayHandler {\n void handleCompleteFrame(byte[][] pixels, short seq);\n}", "@Override\n public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {\n /*apply image effects to new frame*/\n Mat mat= hangman.decapitate(inputFrame);\n\n /*check if users clicked the capture button and if external storage is writable for save it*/\n if(isToSaveBitmap && isExternalStorageWritable()){\n isToSaveBitmap=false;\n Bitmap bmp;\n try {\n bmp = Bitmap.createBitmap(mat.cols(), mat.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(mat, bmp);\n File dir = getAlbumStorageDir(\"hangman\");\n String path =dir.getPath()+File.separator+ \"hangman\" +System.currentTimeMillis() + \".JPG\";\n File capture= new File(path);\n\n OutputStream out = null;\n try {\n capture.createNewFile();\n out = new FileOutputStream(capture);\n bmp.compress(Bitmap.CompressFormat.JPEG, 90, out);\n out.flush();\n\n /*Inform the media store that a new image was saved*/\n ContentValues values = new ContentValues();\n values.put(MediaStore.Images.Media.DATE_TAKEN, System.currentTimeMillis());\n values.put(MediaStore.Images.Media.MIME_TYPE, \"image/jpeg\");\n values.put(MediaStore.MediaColumns.DATA, path);\n getBaseContext().getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);\n\n /*if app was called with intent image capture */\n if(intentImageCapture){\n Intent result = new Intent(\"com.example.RESULT_ACTION\");\n result.setData(Uri.fromFile(capture));\n result.putExtra(Intent.EXTRA_STREAM,capture);\n result.setType(\"image/jpg\");\n setResult(Activity.RESULT_OK, result);\n finish();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n finally {\n try {\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n catch (CvException e) {\n Log.e(\"Exception\", e.getMessage());\n e.printStackTrace();\n }\n }\n return mat;\n }", "void onPreviewFrame(byte[] data, Camera camera);", "public static Bitmap m56266aW(byte[] bArr) {\n AppMethodBeat.m2504i(62447);\n if (C5046bo.m7540cb(bArr)) {\n AppMethodBeat.m2505o(62447);\n return null;\n }\n int[] iArr = new int[4];\n int[] iArr2 = new int[4];\n long nativeInitWxAMDecoder = MMWXGFJNI.nativeInitWxAMDecoder();\n if (nativeInitWxAMDecoder == 0) {\n C4990ab.m7420w(\"MicroMsg.GIF.MMWXGFUtil\", \"Cpan init wxam decoder failed.\");\n }\n if (MMWXGFJNI.nativeDecodeBufferHeader(nativeInitWxAMDecoder, bArr, bArr.length) != 0) {\n C4990ab.m7421w(\"MicroMsg.GIF.MMWXGFUtil\", \"Cpan WXGF decode buffer header failed. result:%d\", Integer.valueOf(MMWXGFJNI.nativeDecodeBufferHeader(nativeInitWxAMDecoder, bArr, bArr.length)));\n }\n if (MMWXGFJNI.nativeGetOption(nativeInitWxAMDecoder, bArr, bArr.length, iArr) != 0) {\n C4990ab.m7421w(\"MicroMsg.GIF.MMWXGFUtil\", \"Cpan WXGF get option failed. result:%d\", Integer.valueOf(MMWXGFJNI.nativeGetOption(nativeInitWxAMDecoder, bArr, bArr.length, iArr)));\n }\n int i = iArr[1];\n int i2 = iArr[2];\n if (i <= 0 || i2 <= 0) {\n AppMethodBeat.m2505o(62447);\n return null;\n }\n Bitmap createBitmap = Bitmap.createBitmap(i, i2, Config.ARGB_8888);\n MMWXGFJNI.nativeDecodeBufferFrame(nativeInitWxAMDecoder, null, 0, createBitmap, iArr2);\n MMWXGFJNI.nativeUninit(nativeInitWxAMDecoder);\n AppMethodBeat.m2505o(62447);\n return createBitmap;\n }", "public String save(){\n this.setDrawingCacheEnabled(true);\n this.buildDrawingCache();\n //mBitmap = Bitmap.createBitmap(this.getWidth(),this.getHeight(),Bitmap.Config.ARGB_8888);\n Bitmap bmp = Bitmap.createBitmap(this.getDrawingCache());\n this.setDrawingCacheEnabled(false);\n\n ByteArrayOutputStream byteArrayOutputStream=new ByteArrayOutputStream();\n bmp.compress(Bitmap.CompressFormat.PNG,100,byteArrayOutputStream);\n byte[] imgBytes=byteArrayOutputStream.toByteArray();\n\n return Base64.encodeToString(imgBytes,Base64.DEFAULT);\n\n }", "@Override\n public void onPreviewFrame(byte[] data, Camera camera) {\n\n Camera.Parameters parameters = camera.getParameters();\n int width = parameters.getPreviewSize().width;\n int height = parameters.getPreviewSize().height;\n\n mCamera.addCallbackBuffer(data);\n\n if (yuvType == null) {\n yuvType = new Type.Builder(rs, Element.U8(rs)).setX(data.length);\n in = Allocation.createTyped(rs, yuvType.create(), Allocation.USAGE_SCRIPT);\n\n rgbaType = new Type.Builder(rs, Element.RGBA_8888(rs)).setX(width).setY(height);\n out = Allocation.createTyped(rs, rgbaType.create(), Allocation.USAGE_SCRIPT);\n }\n\n in.copyFrom(data);\n\n yuvToRgbIntrinsic.setInput(in);\n yuvToRgbIntrinsic.forEach(out);\n\n Bitmap mBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n out.copyTo(mBitmap);\n\n mBitmap = GlobalUtils.rotateBitmapOnOrientation(mBitmap,ctx);\n\n liveCamera.setVisibility(VISIBLE);\n\n if(PROCESS_IMAGE) {\n\n if(PROCESSING_TYPE == 1) {\n Rect2d rect2d = new Rect2d(100, 100, 100, 100);\n imageProcessing.RunDetection(mBitmap);\n liveCamera.setImageBitmap(mBitmap);\n }else{\n //Rect2d rect2d = new Rect2d(100, 100, 100, 100);\n liveCamera.setImageBitmap(mBitmap);\n\n }\n\n } else{\n liveCamera.setImageBitmap(mBitmap);\n }\n\n }", "private static native long imdecode_0(long buf_nativeObj, int flags);", "public byte[] bitmap();", "private static native boolean imencode_0(String ext, long img_nativeObj, long buf_mat_nativeObj, long params_mat_nativeObj);", "@Override\n public void onFrameAvailable(int cameraId) {\n }", "@Override\n public void onFrameAvailable(int cameraId) {\n }", "private void m4808d() {\n if (f3853k.m4870e()) {\n if (f3853k.m4846M() == -1) {\n m4807c();\n }\n try {\n Thread.sleep(50);\n return;\n } catch (InterruptedException e) {\n e.printStackTrace();\n return;\n }\n }\n m4810f();\n JniMethod.convert(f3831d, f3852j, Recorder.f3861b, Recorder.f3862c);\n int flag = f3853k.m4852a(f3852j);\n if (flag == -2 && !f3853k.m4843J()) {\n m4807c();\n }\n LogUtil.m4440c(f3850h, \"input2Encoder success flag= \" + flag);\n }", "public Bitmap saveBitmap(int sampleSize, int radius, int strokeWidth) {\n\r\n try {\r\n BitmapFactory.Options options = new BitmapFactory.Options();\r\n options.inJustDecodeBounds = true; //Chỉ đọc thông tin ảnh, không đọc dữ liwwuj\r\n BitmapFactory.decodeFile(pathImage, options); //Đọc thông tin ảnh\r\n options.inSampleSize = sampleSize; //Scale bitmap xuống 1 lần\r\n options.inJustDecodeBounds = false; //Cho phép đọc dữ liệu ảnh ảnh\r\n Bitmap originalSizeBitmap = BitmapFactory.decodeFile(pathImage, options);\r\n\r\n Bitmap mutableBitmap = originalSizeBitmap.copy(Bitmap.Config.ARGB_8888, true);\r\n RectF originalRect =\r\n new RectF(0, 0, mutableBitmap.getWidth(), mutableBitmap.getHeight());\r\n\r\n originalSizeBitmap.recycle();\r\n originalSizeBitmap = null;\r\n System.gc();\r\n\r\n Canvas canvas = new Canvas(mutableBitmap);\r\n\r\n float[] originXy = getOriginalPoint(originalRect);\r\n circlePaint.setStrokeWidth(strokeWidth);\r\n canvas.drawCircle(originXy[0], originXy[1], radius, circlePaint);\r\n return mutableBitmap;\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n Toast.makeText(getContext(), \"can not draw original bitmap\", Toast.LENGTH_SHORT)\r\n .show();\r\n return getBitmapScreenShot();\r\n }\r\n }", "public void onEncoderClosed();", "Bitmap m7900a(Bitmap bitmap);", "private void callbitmapmethod() {\n\t\ttry {\n\t\t\tencode.clear();\n\t\t\tfor (int i = 0; i < queueItemforApproval.size(); i++) {\n\t\t\t\t/**/\n\t\t\t\tQueueString en = new QueueString();\n\t\t\t\tif (queueItemforApproval.get(i).bitmap != null) {\n\t\t\t\t\tSystem.out.println(\"bitmap is:\"\n\t\t\t\t\t\t\t+ queueItemforApproval.get(i).bitmap);\n\t\t\t\t\ten.path = convertintobase64(queueItemforApproval.get(i).bitmap);\n\t\t\t\t\tSystem.out.println(\"path is :\" + en.path);\n\t\t\t\t\t// Bitmap bitmap = decodeBase64(en.path, i);\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"bitmap is null\");\n\t\t\t\t}\n\t\t\t\tencode.add(en);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static Bitmap getStereoVideoImage(JobContext jc, Bitmap originFrame, \n boolean firstFrame, int mediaStoreLayout) {\n if (null == originFrame || originFrame.getWidth() <= 0 ||\n originFrame.getHeight() <= 0) {\n Log.e(TAG, \"getStereoVideoImage:got invalid original frame\");\n return null;\n }\n int localLayout = convertToLocalLayout(mediaStoreLayout);\n //Log.i(TAG,\"getStereoVideoImage:localLayout=\"+localLayout);\n\n if (STEREO_LAYOUT_NONE == localLayout ||\n STEREO_LAYOUT_FULL_FRAME == localLayout && !firstFrame) {\n Log.e(TAG, \"getStereoVideoImage:can not retrieve second image!\");\n return null;\n }\n\n boolean isLeftRight = (STEREO_LAYOUT_LEFT_AND_RIGHT == localLayout) ||\n (STEREO_LAYOUT_SWAP_LEFT_AND_RIGHT == localLayout);\n //change index for swapped type\n if (STEREO_LAYOUT_SWAP_LEFT_AND_RIGHT == localLayout ||\n STEREO_LAYOUT_SWAP_TOP_AND_BOTTOM == localLayout) {\n firstFrame = !firstFrame;\n }\n\n Rect src = new Rect(0, 0, originFrame.getWidth(), originFrame.getHeight());\n //Log.v(TAG,\"getStereoVideoImage:src=\"+src);\n //create a new bitmap that has the same dimension as the original video\n Bitmap bitmap = Bitmap.createBitmap(src.right - src.left, \n src.bottom - src.top,\n Bitmap.Config.ARGB_8888);\n adjustRect(isLeftRight, firstFrame, src);\n //Log.d(TAG,\"getStereoVideoImage:src=\"+src);\n Canvas canvas = new Canvas(bitmap);\n RectF dst = new RectF(0, 0, bitmap.getWidth(), bitmap.getHeight());\n canvas.drawBitmap(originFrame, src, dst, null);\n\n if (null != bitmap) {\n Log.i(TAG,\"getStereoVideoImage:[\"+bitmap.getWidth()+\"x\"+bitmap.getHeight()+\"]\");\n }\n return bitmap;\n }", "public void capture()\r\n\t{ \r\n\t VideoCapture camera = new VideoCapture();\r\n\t \r\n\t camera.set(12, -20); // change contrast, might not be necessary\r\n\t \r\n\t //CaptureImage image = new CaptureImage();\r\n\t \r\n\t \r\n\t \r\n\t camera.open(0); //Useless\r\n\t if(!camera.isOpened())\r\n\t {\r\n\t System.out.println(\"Camera Error\");\r\n\t \r\n\t // Determine whether to use System.exit(0) or return\r\n\t \r\n\t }\r\n\t else\r\n\t {\r\n\t System.out.println(\"Camera OK\");\r\n\t }\r\n\t\t\r\n\t\t \r\n\t\tboolean success = camera.read(capturedFrame);\r\n\t\tif (success)\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\tprocessWithContours(capturedFrame, processedFrame);\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t //image.processFrame(capturedFrame, processedFrame);\r\n\t\t // processedFrame should be CV_8UC3\r\n\t\t \r\n\t\t //image.findCaptured(processedFrame);\r\n\t\t \r\n\t\t //image.determineKings(capturedFrame);\r\n\t\t \r\n\t\t int bufferSize = processedFrame.channels() * processedFrame.cols() * processedFrame.rows();\r\n\t\t byte[] b = new byte[bufferSize];\r\n\t\t \r\n\t\t processedFrame.get(0,0,b); // get all the pixels\r\n\t\t // This might need to be BufferedImage.TYPE_INT_ARGB\r\n\t\t img = new BufferedImage(processedFrame.cols(), processedFrame.rows(), BufferedImage.TYPE_INT_RGB);\r\n\t\t int width = (int)camera.get(Highgui.CV_CAP_PROP_FRAME_WIDTH);\r\n\t\t int height = (int)camera.get(Highgui.CV_CAP_PROP_FRAME_HEIGHT);\r\n\t\t //img.getRaster().setDataElements(0, 0, width, height, b);\r\n\t\t byte[] a = new byte[bufferSize];\r\n\t\t System.arraycopy(b, 0, a, 0, bufferSize);\r\n\r\n\t\t Highgui.imwrite(\"camera.jpg\",processedFrame);\r\n\t\t System.out.println(\"Success\");\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Unable to capture image\");\r\n\t\t\r\n\t camera.release();\r\n\t}", "@Override\n\tpublic void onPreviewFrame(byte[] bytes, Camera camera) {\n\n\t}", "public void frameMsg(byte[] encodedMsg, OutputStream out) {\n\r\n }", "@Override\n public void releaseVideoFrames() {\n\n }", "public static void encode(AppCompatActivity activity, File file, Bitmap newBitmap, int quality) {\n OutputStream os;\n try {\n os = new FileOutputStream(file);\n newBitmap.compress(Bitmap.CompressFormat.JPEG, quality, os);\n os.flush();\n os.close();\n } catch (Exception e) {\n Log.e(\"BitmapUtils\", \"Error writing bitmap\", e);\n }\n galleryAddPic(activity, file);\n }", "protected void OUTProcess(byte[] dataCamera)\n {\n if(oldIDOut.length()==8 && oldIDOut.equals(prop.nfcCardID)==true)\n return;\n //region OUT\n Bitmap bmp;\n prop.timeScan = new Date();\n //1.Get image from camera\n //BitmapFactory.Options o = new BitmapFactory.Options();\n //o.inSampleSize = 2;\n //bmp = BitmapFactory.decodeByteArray(dataCamera, 0, dataCamera.length, o);\n //bmp = ImageFunc.ResizedBitmap(bmp, 400, 400);\n //prop.imgBitmap =bmp;\n // prop.imgBitmap = ImageFunc.FixBitmapfromCamera(dataCamera);\n //2.Get Digit from image with ipss\n //prop.ipssDigit= IPSS.getDigit(prop.imgBitmap,this);\n prop.ipssDigit= \"0000\";\n prop.in_FileName = prop.nfcCardID +\"_\"+ Convert.imageDateFormat.format(prop.timeScan).toString()+\"_\"+prop.ipssDigit+\"_3.jpg\";\n //Bitmap imgSaveSucces=ImageFunc.SaveImage(prop.imgBitmap,sdRoot,dir, prop.in_FileName);\n //Bitmap imgSaveSucces=new Bitmap();\n if(1==1) {\n\n //data MCar\n Car mCar=new Car();\n mCar.setSmartCardCode(prop.nfcCardID);\n mCar.setTimeEnd(prop.timeScan);\n mCar.setDigit(prop.ipssDigit);\n mCar.setImages3(prop.in_FileName);\n mCar.setImages4(prop.in_FileName);\n //using CarAPI.ScanOut\n carAPI=new APICar(myContext);\n carAPI.ScanCarOut(mCar);\n inOutTask =new InOutTask(myContext,myActivity,carAPI,prop);\n inOutTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n oldIDOut=prop.nfcCardID;\n }else {\n InOut_tv_InfoInOut.setText(\"Lỗi lưu hình\");\n return;\n }\n //endregion OUT\n }", "private void drawMovieFrame(Canvas canvas) {\n if(canvas == null){\n return;\n }\n// Log.d(TAG, \"drawMovieFrame: mCurrentAnimationTime \" + mCurrentAnimationTime);\n mMovie.setTime(mCurrentAnimationTime);\n\n canvas.save(Canvas.MATRIX_SAVE_FLAG);\n canvas.scale(mScale, mScale);\n mMovie.draw(canvas, mLeft / mScale, mTop / mScale);\n canvas.restore();\n }", "@Override\n\t\tpublic void onPreviewFrame(byte[] data, Camera camera) {\n\n\t\t\tlong t=System.currentTimeMillis();\n\n\t\t\tmYuv.put(0, 0, data);\n\t\t\tMat mRgba = new Mat();\n\t\t\tImgproc.cvtColor(mYuv, mRgba, Imgproc.COLOR_YUV420sp2RGB, 4);\n\n\t\t\tBitmap bmp = Bitmap.createBitmap(CAMERA_HEIGHT, CAMERA_WIDTH, Bitmap.Config.ARGB_8888);\n\n\t\t\tif (Utils.matToBitmap(mRgba, bmp)){\n\t\t\t\tMatrix m=new Matrix();\n\t\t\t\tif(cameraIndex==0)\n\t\t\t\t\tm.setRotate(90);\n\t\t\t\telse{\n\t\t\t\t\tm.setRotate(-90);\n\t\t\t\t\tm.postScale(-1, 1);\n\t\t\t\t}\n\t\t\t\tBitmap mBit=Bitmap.createBitmap(bmp, 0, 0, bmp.getWidth(), bmp.getHeight(), m, true);\n\t\t\t\tMat mbit=Utils.bitmapToMat(mBit);\n\t\t\t\tMat mGray=new Mat();\n\t\t\t\tlong t2=System.currentTimeMillis();\n\t\t\t\tLog.d(TAG, \"catch time:\"+(t2-t));\n\t\t\t\tImgproc.cvtColor(mbit, mGray, Imgproc.COLOR_RGBA2GRAY);\n\t\t\t\tFace face=ph.detectFace_and_eyes(mGray, 1.0f);\n\t\t\t\tlong t3=System.currentTimeMillis();\n\t\t\t\tLog.d(TAG, \"detectFace_and_eyes time:\"+(t3-t2));\n\t\t\t\tm.reset();\n\t\t\t\tm.postScale(2, 2);\n\t\t\t\tBitmap bmshow=Bitmap.createBitmap(mBit, 0, 0, mBit.getWidth(), mBit.getHeight(), m, true);\n\t\t\t\tCanvas canvas=mHolder.lockCanvas();\n\t\t\t\tcanvas.drawBitmap(bmshow, 0, 0, null);\n\n\n\t\t\t\tif(face!=null){\n\t\t\t\t\tPaint paint=new Paint();\n\t\t\t\t\tpaint.setStrokeWidth(3);\n\t\t\t\t\tpaint.setStyle(Style.STROKE);\n\t\t\t\t\tpaint.setColor(Color.GREEN);\n\t\t\t\t\tcanvas.drawRect(getRect(face.face_area), paint);\n\n\t\t\t\t\tpaint.setColor(Color.CYAN);\n\t\t\t\t\tcanvas.drawRect(getRect(face.left_eye), paint);\n\t\t\t\t\tcanvas.drawRect(getRect(face.right_eye), paint); \n\n\t\t\t\t\tif(face.enable){\n\t\t\t\t\t\t\n\t\t\t\t\t\tMat faceimg=ph.makefaceimg(mGray, face);\n\t\t\t\t\t\tif(faceimg!=null){\n\t\t\t\t\t\t\tMessage.obtain(handler, 0x0100, faceimg).sendToTarget();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tLog.d(TAG, \"prehandle time:\"+(System.currentTimeMillis()-t3));\n\t\t\t\t\t}\n\t\t\t\t}\t \n\t\t\t\tmFps.measure();\n\t\t\t\tmFps.draw(canvas, (canvas.getWidth() - bmp.getWidth()) / 2, 0);\n\n\t\t\t\tmHolder.unlockCanvasAndPost(canvas);\n\t\t\t\tmGray.release();\n\t\t\t\tmbit.release();\n\t\t\t\tmBit.recycle();\n\t\t\t}\n\t\t\tmRgba.release();\n\t\t\tbmp.recycle();\n\n\t\t\tt=System.currentTimeMillis()-t;\n\t\t\tLog.d(TAG, \"time:\"+t+\"ms\");\n\t\t}", "private BufferedImage CreateBuffedImage(WinFileMappingBuffer fm, boolean bWithAlphaChanle) {\n BitmapFileBuffer bitmap = new BitmapFileBuffer();\n if (!bitmap.Load(fm.getBuffer())) {\n return null;\n }\n return bitmap.GetBuffedImage(bWithAlphaChanle);\n }", "Codec getCurrentCodec();", "private android.graphics.Bitmap m6555f() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r5 = this;\n r0 = r5.getWidth();\n r1 = r5.getHeight();\n r2 = m6543a(r0, r1);\t Catch:{ OutOfMemoryError -> 0x000d }\n return r2;\n L_0x000d:\n r2 = \"ShimmerFrameLayout failed to create working bitmap\";\n r3 = new java.lang.StringBuilder;\n r3.<init>(r2);\n r2 = \" (width = \";\n r3.append(r2);\n r3.append(r0);\n r0 = \", height = \";\n r3.append(r0);\n r3.append(r1);\n r0 = \")\\n\\n\";\n r3.append(r0);\n r0 = java.lang.Thread.currentThread();\n r0 = r0.getStackTrace();\n r1 = r0.length;\n r2 = 0;\n L_0x0033:\n if (r2 >= r1) goto L_0x0046;\n L_0x0035:\n r4 = r0[r2];\n r4 = r4.toString();\n r3.append(r4);\n r4 = \"\\n\";\n r3.append(r4);\n r2 = r2 + 1;\n goto L_0x0033;\n L_0x0046:\n r0 = r3.toString();\n r1 = \"ShimmerFrameLayout\";\n android.util.Log.d(r1, r0);\n r0 = 0;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.shimmer.ShimmerFrameLayout.f():android.graphics.Bitmap\");\n }", "public BufferedImage refreshFrame(int frame_no) {\n\n\t\tind = byteIndicies[frame_no];\n\n\t\timg = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n\t\ttry {\n\n\t\t\twhile (offset < bytes.length && (numRead = is.read(bytes, offset, bytes.length - offset)) >= 0) {\n\t\t\t\toffset += numRead;\n\t\t\t}\n\n\t\t\tfor (int y = 0; y < height; y++) {\n\t\t\t\tfor (int x = 0; x < width; x++) {\n\t\t\t\t\tbyte r = bytes[ind];\n\t\t\t\t\tbyte g = bytes[ind + height * width];\n\t\t\t\t\tbyte b = bytes[ind + height * width * 2];\n\n\t\t\t\t\tint pix = 0xff000000 | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff);\n\t\t\t\t\timg.setRGB(x, y, pix);\n\t\t\t\t\tind++;\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\treturn img;\n\t}", "private Bitmap convertToBitmap(byte[] b){\n\n return BitmapFactory.decodeByteArray(b, 0, b.length);\n\n }", "private void getSampleImage() {\n\t\t_helpingImgPath = \"Media\\\\\"+_camType.toString()+_downStream.toString()+_camProfile.toString()+\".bmp\";\n//\t\tswitch( _downStream ){\n//\t\tcase DownstreamPage.LEVER_NO_DOWNSTREAM:\n//\t\t\tswitch ( _camProfile )\n//\t\t\t{\n//\t\t\tcase CamProfilePage.LEVER_BEAD_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.LEVER_DOUBLE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.LEVER_GROOVE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.LEVER_OUTER_CAM:\n//\t\t\t\tbreak;\t\n//\t\t\t}\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.LEVER_CRANK:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.LEVER_FOUR_JOIN:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.LEVER_PUSHER_TUGS:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.CAMS_CRANK:\n//\t\t\tswitch ( _camProfile )\n//\t\t\t{\n//\t\t\tcase CamProfilePage.SLIDER_BEAD_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.SLIDER_DOUBLE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.SLIDER_GROOVE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.SLIDER_OUTER_CAM:\n//\t\t\t\tbreak;\n//\t\t\t}\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.CAMS_DOUBLE_SLIDE:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.CAMS_NO_DOWNSTREAM:\n//\t\t\tbreak;\n//\t\t}\n\t\t\n\t}", "@Override\n public void onPreviewFrame(final byte[] bytes, final Camera camera) {\n if (isProcessingFrame) {\n LOGGER.w(\"Dropping frame!\");\n return;\n }\n\n try {\n // Initialize the storage bitmaps once when the resolution is known.\n if (rgbBytes == null) {\n Camera.Size previewSize = camera.getParameters().getPreviewSize();\n previewHeight = previewSize.height;\n previewWidth = previewSize.width;\n rgbBytes = new int[previewWidth * previewHeight];\n onPreviewSizeChosen(new Size(previewSize.width, previewSize.height), 90);\n }\n } catch (final Exception e) {\n LOGGER.e(e, \"Exception!\");\n return;\n }\n\n isProcessingFrame = true;\n lastPreviewFrame = bytes;\n yuvBytes[0] = bytes;\n yRowStride = previewWidth;\n\n imageConverter =\n new Runnable() {\n @Override\n public void run() {\n ImageUtils.convertYUV420SPToARGB8888(bytes, previewWidth, previewHeight, rgbBytes);\n }\n };\n\n postInferenceCallback =\n new Runnable() {\n @Override\n public void run() {\n camera.addCallbackBuffer(bytes);\n isProcessingFrame = false;\n }\n };\n processImage();\n }", "public Bitmap startCapture() {\n if (mMediaProjection == null) {\n return null;\n }\n Image image = mImageReader.acquireLatestImage();\n int width = image.getWidth();\n int height = image.getHeight();\n final Image.Plane[] planes = image.getPlanes();\n final ByteBuffer buffer = planes[0].getBuffer();\n int pixelStride = planes[0].getPixelStride();\n int rowStride = planes[0].getRowStride();\n int rowPadding = rowStride - pixelStride * width;\n Bitmap bitmap = Bitmap.createBitmap(width + rowPadding / pixelStride, height, Bitmap.Config.ARGB_8888);\n bitmap.copyPixelsFromBuffer(buffer);\n bitmap = Bitmap.createBitmap(bitmap, 0, 0, width, height ); //按范围截取图片\n image.close();\n Log.i(TAG, \"image data captured\");\n\n //Write local\n// final Bitmap finalBitmap = bitmap;\n// new Thread(){\n// @Override\n// public void run() {\n// super.run();\n// if( finalBitmap != null) {\n// try{\n// File fileImage = new File(getLocalPath());\n// if(!fileImage.exists()){\n// fileImage.createNewFile();\n// Log.i(TAG, \"image file created\");\n// }\n// FileOutputStream out = new FileOutputStream(fileImage);\n// if(out != null){\n// finalBitmap.compress(Bitmap.CompressFormat.PNG, 100, out);\n// out.flush();\n// out.close();\n// //发送广播刷新图库\n// Intent media = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);\n// Uri contentUri = Uri.fromFile(fileImage);\n// media.setData(contentUri);\n// mContext.sendBroadcast(media);\n// Log.i(TAG, \"screen image saved\");\n// }\n// }catch(Exception e) {\n// e.printStackTrace();\n// }\n// }\n// }\n// }.start();\n return bitmap;\n }", "@Override\n public void onComplete(Bitmap bitMap) {\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 }", "@Override\n public void run() {\n if (data.isStreaming()) {\n // if (frame < list.size()) {\n try {\n // BufferedImage image = list.get(frame);\n enc.encodeImage(videoImage);\n // frame++;\n } catch (Exception ex) {\n System.out.println(\"Error encoding frame: \" + ex.getMessage());;\n }\n }\n\n }", "public byte[] getFramePacket()\r\n/* 203: */ {\r\n/* 204:164 */ Packet211TileDesc pkt = new Packet211TileDesc();\r\n/* 205:165 */ pkt.subId = 9;\r\n/* 206:166 */ writeToPacket(pkt);\r\n/* 207:167 */ pkt.headout.write(pkt.subId);\r\n/* 208:168 */ return pkt.toByteArray();\r\n/* 209: */ }", "@Override\n public void onPictureTaken(byte[] data, Camera camera) {\n Log.e(TAG, \"Saving a bitmap to file\");\n mCamera.startPreview();// The camera preview was automatically stopped. Start it again.\n mCamera.setPreviewCallback(this);\n Bitmap bmpOriginal = BitmapFactory.decodeByteArray(data, 0, data.length);\n Bitmap bmpGrayscale = convertToGrayscale(bmpOriginal);//\n try {\n File file = new File(mPictureFile);\n if (!file.exists()) file.createNewFile();\n FileOutputStream fos = new FileOutputStream(file);\n //is other format ok? ok!!! PNG is much clear than JPEG, but image file is also much larger\n bmpGrayscale.compress(Bitmap.CompressFormat.PNG, 0, fos);\n //fos.write(data);// Write the image in a file (in jpeg format)\n fos.flush();\n fos.close();\n } catch (java.io.IOException e) {\n Log.e(TAG, \"Exception in taking picture\", e);\n }\n// saveImageToGallery();\n }", "private void decodeOrStoreSavedBitmap(Bitmap bitmap, Result result) {\n\t\t if (handler == null) {\n\t\t savedResultToShow = result;\n\t\t } else {\n\t\t if (result != null) {\n\t\t savedResultToShow = result;\n\t\t }\n\t\t if (savedResultToShow != null) {\n\t\t Message message = Message.obtain(handler, R.id.decode_succeeded, savedResultToShow);\n\t\t handler.sendMessage(message);\n\t\t }\n\t\t savedResultToShow = null;\n\t\t }\n\t\t }", "public void showbitmap2() {\n \t\tImageView i = (ImageView)findViewById(R.id.frame2);\n \t\ti.setImageBitmap(mBitmap2);\n \t}", "public void onPreviewFrame(byte[] data, Camera camera) {\n\t\t\t\t\t\t//Log.w(TAG, \"onPreviewFrame'd\");\n\n\t\t\t\t\t\t// Allocate space for processing buffer. Allow it\n\t\t\t\t\t\t// to grow if necessary. No max cap.\n\t\t\t\t\t\tint size = data.length;\n\t\t\t\t\t\tif (data.length > BUFALLOCSIZE) {\n\t\t\t\t\t\t\t// Buffer is not big enough for data\n\t\t\t\t\t\t\t// allocate more spacs.\n\t\t\t\t\t\t\t//Log.v(TAG, \"Allocating bufer for size: \" + Integer.toString(size));\n\t\t\t\t\t\t\tdecodeBuf = new int[size];\n\t\t\t\t\t\t\tBUFALLOCSIZE = size;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Set the w and h for the yuv image processing. \n\t\t\t\t\t\t\t// Don't need an actual picture dimension because\n\t\t\t\t\t\t\t// I am not doing anything with the converted\n\t\t\t\t\t\t\t// rgb image except grabbing a pixel. Set dims\n\t\t\t\t\t\t\t// to just a single row.\n\t\t\t\t\t\t\tyuv_w = size;\n\t\t\t\t\t\t\tyuv_h = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Discard frames until processing completes\n\t\t\t\t\t\tif (FRAMEBUFFER_IS == AVAILABLE) {\n\t\t\t\t\t\t\tif (DEBUG>=2) Log.d(TAG, \"Framebuffer available for reuse\");\n\t\t\t\t\t\t\tnew HandleFrameTask().execute(data);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tPreview.this.invalidate();\n\t\t\t\t\t}", "void avRecorderSetup() {\n\r\n\t\t \r\n imw = ToolFactory.makeWriter(file.getAbsolutePath());//or \"output.avi\" or \"output.mov\"\r\n imw.open();\r\n imw.setForceInterleave(true);\r\n imw.addVideoStream(0, 0, IRational.make((double)vidRate), widthCapture, heightCapture);\r\n audionumber = imw.addAudioStream(audioStreamIndex, audioStreamId, channelCount, sampleRate);\r\n isc = imw.getContainer().getStream(0).getStreamCoder();\r\n bgr = new BufferedImage(widthCapture, heightCapture, BufferedImage.TYPE_3BYTE_BGR);\r\n sTime = fTime = System.nanoTime();\r\n }", "private BufferedImage getFrame() {\n if (rotateFrame)\n return ImageRotate._180deg(bufferedImage);\n imageCopy.update(bufferedImage);\n return imageCopy.get();\n }", "private void handleImage(byte[] b) throws IOException {\n Log.i(\"ScrencapHandler\",\"handleImage\");\n long utime = System.currentTimeMillis();\n byte[] unixTime = toByteArray(utime);\n int start = b.length - unixTime.length - 1; //-1 for the seqnum\n for (int i = 0; i < unixTime.length; i++) {\n b[start + i] = unixTime[i];\n }\n\n if (jitterControl.channelIsFree()) {\n int seq = jitterControl.sendt(utime, b.length);\n\n // Add seq number.\n b[b.length - 1] = (byte) seq;\n\n // Send out the data to the network.\n Log.i(\"ScrencapHandler\",\"Send out the data to the network\");\n mWebkeyVisitor.send(b);\n }\n }", "public void putFrame()\n {\n if (currImage != null)\n {\n super.putFrame(currImage, faceRects, new Scalar(0, 255, 0), 0);\n }\n }", "private void onImageProcessed() {\n /* creating random bitmap and then using in TextureView.getBitmap(bitmap) instead of simple TextureView.getBitmap() will not cause lags & memory leaks */\n if (captureBitmap == null) {\n captureBitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);\n }\n captureBitmap = Bitmap.createScaledBitmap(targetView.getBitmap(captureBitmap), captureW, captureH, false);\n\n if (captureProcessor != null) {\n if (isThreadingEnabled) {\n cameraThreadHandler.Queue(captureBitmap);\n }\n else {\n captureProcessor.process(captureBitmap, targetView, parentActivity);\n }\n /*\n else if (!skipNextFrame){\n long time = System.currentTimeMillis();\n captureProcessor.process(captureBitmap, targetView, parentActivity);\n time = System.currentTimeMillis() - time;\n if (time > 0.035)\n skipNextFrame = true;\n }\n else {\n skipNextFrame = false;\n }*/\n }\n }", "private void manuallyPushImageToImageReader(){\n mImageReader = VNCUtility.createImageReader(this);\n mImageReader.setOnImageAvailableListener(new ImageReader.OnImageAvailableListener() {\n @Override\n public void onImageAvailable(ImageReader reader) {\n Log.d(TAG, \"NEW IMAGE AVAILABLE\");\n\n DisplayMetrics metrics = getResources().getDisplayMetrics();\n\n\n Image image = reader.acquireLatestImage();\n VNCUtility.printReaderFormat(image.getFormat());\n Log.d(TAG, \"IMAGE FORMAT: \" + image.getFormat());\n final Image.Plane[] planes = image.getPlanes();\n final ByteBuffer buffer = planes[0].getBuffer();\n int pixelStride = planes[0].getPixelStride();\n int rowStride = planes[0].getRowStride();\n int rowPadding = rowStride - pixelStride * mWidth;\n int w = mWidth + rowPadding / pixelStride;\n Bitmap bmp = Bitmap.createBitmap(mWidth, mHeight, Bitmap.Config.RGB_565);\n bmp.copyPixelsFromBuffer(buffer);\n mBmp = bmp;\n\n Thread t = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n //saveScreen(mBmp);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }\n });\n t.start();\n\n image.close();\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mImageView.setImageBitmap(mBmp);\n }\n });\n\n\n /*\n Image img = reader.acquireLatestImage();\n Image.Plane[] planes = img.getPlanes();\n int width = img.getWidth();\n int height = img.getHeight();\n int pixelStride = planes[0].getPixelStride();\n int rowStride = planes[0].getRowStride();\n int rowPadding = rowStride - pixelStride * width;\n ByteBuffer buffer = planes[0].getBuffer();\n byte[] data = new byte[buffer.capacity()];\n buffer.get(data);\n\n for(int i = 10000; i < 100; i++){\n Log.d(TAG, getColourForInt(data[i]));\n }\n\n int offset = 0;\n Bitmap bitmap = Bitmap.createBitmap(metrics, width, height, Bitmap.Config.ARGB_8888);\n for (int i = 0; i < height; ++i) {\n for (int j = 0; j < width; ++j) {\n int pixel = 0;\n pixel |= (buffer.get(offset) & 0xff) << 16; // R\n pixel |= (buffer.get(offset + 1) & 0xff) << 8; // G\n pixel |= (buffer.get(offset + 2) & 0xff); // B\n pixel |= (buffer.get(offset + 3) & 0xff) << 24; // A\n bitmap.setPixel(j, i, pixel);\n offset += pixelStride;\n }\n offset += rowPadding;\n }\n mBmp = bitmap;\n img.close();\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mImageView.setImageBitmap(mBmp);\n }\n });\n */\n }\n }, null);\n Surface surface = mImageReader.getSurface();\n if(surface == null){\n Log.d(TAG, \"SURFACE IS NULL\");\n }\n else{\n Log.d(TAG, \"SURFACE IS NOT NULL\");\n Canvas canvas = surface.lockCanvas(null);\n\n int[] ints = new int[mWidth * mHeight];\n for (int i = 0; i < mWidth * mHeight; i++) {\n ints[i] = Color.MAGENTA;//0x00FF0000;\n }\n\n //final Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, ints.length);\n Bitmap bitmap = Bitmap.createBitmap(ints, mWidth, mHeight, Bitmap.Config.RGB_565);\n //canvas.drawARGB(255, 255, 0, 255);\n canvas.drawBitmap(bitmap,0,0,null);\n surface.unlockCanvasAndPost(canvas);\n }\n }", "@Override\n public Detections recognize(byte[] yuv, int image_w, int image_h, int rotation, Bitmap b) {\n System.out.println(image_h + \"......ye height hai\");\n System.out.println(image_w + \"......ye width hai\");\n Detections detects = new Detections();\n\n\n Logger.tick(\"d\");\n Logger.tick(\"yuvtoJPG\");\n int isYUV;\n image_bytes.clear();\n if (jpegQuality>0) {\n // we do rotation server-side, android client too slow (takes around 10ms in both java\n // and c on Huawei P9, while jpeg compression takes around 8ms).\n try {\n image_bytes.put(Transform.YUVtoJPEG(yuv, image_w, image_h, jpegQuality));\n isYUV = 0;\n } catch (Exception e) {\n // most likely encoded image is too big for image_bytes buffer\n Logger.addln(\"WARN: Problem encoding jpg: \"+e.getMessage());\n return detects; // bail\n }\n } else {\n // send image uncompressed\n image_bytes.put(yuv);\n isYUV=1;\n }\n detects.addTiming(\"yuvtoJPG\",Logger.tockLong(\"yuvtoJPG\"));\n\n int dst_w=image_w, dst_h=image_h;\n if ((rotation%180 == 90) || (rotation%180 == -90)) {\n dst_w = image_h; dst_h = image_w;\n }\n Matrix frameToViewTransform = Transform.getTransformationMatrix(\n image_w, image_h,\n dst_w, dst_h,\n rotation, false);\n // used to map received response rectangles back to handset view\n Matrix viewToFrameTransform = new Matrix();\n frameToViewTransform.invert(viewToFrameTransform);\n\n if (IP==null) {\n // resolve server name to IP address\n try {\n InetAddress names[] = InetAddress.getAllByName(server);\n StringBuilder n = new StringBuilder();\n for (InetAddress name : names) {\n n.append(name);\n if (name instanceof Inet4Address) {IP = name; break;}\n }\n Logger.addln(\"\\nResolved server to: \"+IP);\n if (IP == null) {\n Logger.addln(\"\\nWARN Problem resolving server: \"+n);\n return detects;\n }\n\n } catch (IOException e) {\n Logger.addln(\"\\nWARNProblem resolving server \"+server+\" :\"+e.getMessage());\n return detects;\n }\n }\n\n String req = \"POST /api/edge_app2?r=\" + rotation\n + \"&isYUV=\" + isYUV + \"&w=\"+ image_w + \"&h=\"+image_h\n + \" HTTP/1.1\\r\\nContent-Length: \" + image_bytes.position() + \"\\r\\n\\r\\n\";\n StringBuilder response = new StringBuilder();\n if (useUDP) {\n try {\n Logger.tick(\"url2\");\n // open connection (if not already open) and send request+image\n if (udpsockfd <0) {\n // put the server IP address into a byte buffer to make it easy to pass to jni C\n IPbuf.position(0);\n IPbuf.put(IP.getAddress());\n udpsockfd=socket(IPbuf,port);\n Debug.println(\"sock_fd=\"+udpsockfd);\n }\n Debug.println(\"data len=(\"+req.length()+\",\"+image_bytes.position()+\")\");\n Logger.tick(\"url2a\");\n // copy request to byte buffer so easy to pass to jni C\n req_buf.clear();\n req_buf.put(req.getBytes(),0,req.length());\n String str = sendmmsg(udpsockfd, req_buf, req.length(), image_bytes, image_bytes.position(), MSS);\n Debug.println(\"s: \"+str);\n //Logger.add(\"s: \"+str);\n detects.addTiming(\"url2a\",Logger.tockLong(\"url2a\"));\n detects.addTiming(\"url2\",Logger.tockLong(\"url2\"));\n int count=1+(req.length()+image_bytes.position())/(MSS-2);\n detects.addTiming(\"pkt count\", count*1000);\n\n // read the response ...\n Logger.tick(\"url3\");\n // need to receive on same socket as used for sending or firewall blocks reception\n int resplen = recv(udpsockfd, recvbuf, MSS*LISTSIZE, MSS);\n if (resplen<0) {\n Logger.addln(\"\\nWARN UDP recv error: errno=\"+resplen);\n } else if (resplen==0) {\n Logger.addln(\"\\nWARN UDP timeout\");\n } else {\n response.append(new String(recvbuf.array(), recvbuf.arrayOffset(), resplen));\n }\n if (response.length()<=10) {\n Debug.println(\" received \" + response.length());\n }\n detects.addTiming(\"url3\",Logger.tockLong(\"url3\"));\n Logger.addln(detects.client_timings.toString());\n //String pieces[] = response.split(\"\\n\");\n //response = pieces[pieces.length-1]; // ignore all the headers (shouldn't be any !)\n } catch(Exception e) {\n Logger.addln(\"\\nWARN Problem with UDP on \"+IP+\":\"+port+\" (\"+e.getMessage()+\")\");\n }\n } else { // use TCP\n try {\n // open connection and send request+image\n Logger.tick(\"url2\");\n if (tcpsock == null) {\n tcpsock = new Socket(IP, port);\n out = new BufferedOutputStream(tcpsock.getOutputStream());\n in = new BufferedReader(new InputStreamReader(tcpsock.getInputStream()));\n }\n try {\n out.write(req.getBytes());\n out.write(image_bytes.array(),image_bytes.arrayOffset(),image_bytes.position());\n out.flush();\n } catch(IOException ee) {\n // legacy server closes TCP connection after each response, in which case\n // we reopen it here.\n Logger.addln(\"Retrying TCP: \"+ee.getMessage());\n tcpsock.close();\n tcpsock = new Socket(IP, port);\n out = new BufferedOutputStream(tcpsock.getOutputStream());\n in = new BufferedReader(new InputStreamReader(tcpsock.getInputStream()));\n out.write(req.getBytes());\n out.write(image_bytes.array());\n out.flush();\n }\n detects.addTiming(\"url2\",Logger.tockLong(\"url2\"));\n\n Logger.tick(\"url3\");\n // read the response ...\n // read the headers, we ignore them all !\n String line;\n while ((line = in.readLine()) != null) {\n if (line.length() == 0) break; // end of headers, stop\n }\n // now read to end of response\n response.append(in.readLine());\n detects.addTiming(\"url3\",Logger.tockLong(\"url3\"));\n } catch(Exception e) {\n Logger.addln(\"\\nWARN Problem connecting TCP to \"+IP+\":\"+port+\" (\"+e.getMessage()+\")\");\n try {\n tcpsock.close();\n } catch(Exception ee) {};\n tcpsock = null; // reset connection\n }\n }\n if (response.length()==0 || response.toString().equals(\"null\")) {\n Logger.add(\" empty response\");\n Logger.add(\": \"+Logger.tock(\"d\"));\n return detects; // server has dropped connection\n }\n // now parse the response as json ...\n try {\n // testing\n //response = \"{\"server_timings\":{\"size\":91.2,\"r\":0.4,\"jpg\":8.4,\"rot\":34.1,\"yolo\":48.3,\"tot\":0},\"results\":[{\"title\":\"diningtable\",\"confidence\":0.737176,\"x\":343,\"y\":415,\"w\":135,\"h\":296},{\"title\":\"chair\",\"confidence\":0.641756,\"x\":338,\"y\":265,\"w\":75,\"h\":57},{\"title\":\"chair\",\"confidence\":0.565877,\"x\":442,\"y\":420,\"w\":84,\"h\":421}]}\n // [{\"title\":\"diningtable\",\"confidence\":0.737176,\"x\":343,\"y\":415,\"w\":135,\"h\":296},{\"title\":\"chair\",\"confidence\":0.641756,\"x\":338,\"y\":265,\"w\":75,\"h\":57},{\"title\":\"chair\",\"confidence\":0.565877,\"x\":442,\"y\":420,\"w\":84,\"h\":421}]\n // cam: 39 {\"yuvtoJPG\":8,\"url2\":15,\"url3\":128,\"d\":152}\"\n JSONObject json_resp = new JSONObject(response.toString());\n JSONArray json = json_resp.getJSONArray(\"results\");\n int i; JSONObject obj;\n for (i = 0; i < json.length(); i++) {\n obj = json.getJSONObject(i);\n String title = obj.getString(\"title\");\n Float confidence = (float) obj.getDouble(\"confidence\");\n Float x = (float) obj.getInt(\"x\");\n Float y = (float) obj.getInt(\"y\");\n Float w = (float) obj.getInt(\"w\");\n Float h = (float) obj.getInt(\"h\");\n RectF location = new RectF(\n Math.max(0, x - w / 2), // left\n Math.max(0, y - h / 2), // top\n Math.min(dst_w - 1, x + w / 2), //right\n Math.min(dst_h - 1, y + h / 2)); // bottom\n viewToFrameTransform.mapRect(location); // map boxes back to original image co\n Recognition result = new Recognition(title, confidence, location, new Size(image_w, image_h));\n detects.results.add(result);\n }\n detects.server_timings = json_resp.getJSONObject(\"server_timings\");\n } catch(Exception e) {\n Logger.addln(\"\\nWARN Problem reading JSON: \"+response+\" (\"+e.getMessage()+\")\");\n }\n detects.addTiming(\"d\",Logger.tockLong(\"d\"));\n return detects;\n }", "private Bitmap flipImage(byte[] input, FileOutputStream fos){\n\n\t\t\t\tMatrix rotate_matrix = new Matrix();\n\t\t\t\trotate_matrix.preScale(-1.0f, 1.0f);\n\t\t\t\tBitmapFactory bmf = new BitmapFactory();\n\t\t\t\tBitmap raw_bitmap = bmf.decodeByteArray(input, 0, input.length);\n\t\t\t\tBitmap result = Bitmap.createBitmap(raw_bitmap, 0, 0, raw_bitmap.getWidth(), raw_bitmap.getHeight(), rotate_matrix, true);\n\t\t\t\treturn result;\n\t\t\t\t/*\n\t\t\t\tresult.compress(Bitmap.CompressFormat.JPEG, 90, fos);\n\t\t\t\ttry {\n\t\t\t\t\tfos.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\t*/\n\t\t\t}", "@Override\n public void muxVideoFrame(ByteBuffer encodedData, MediaCodec.BufferInfo bufferInfo) {\n encodedData.position(bufferInfo.offset);\n encodedData.limit(bufferInfo.offset + bufferInfo.size);\n\n //This code will break if the encoder supports B frames.\n //Ideally we would use set the value in the encoder,\n //don't know how to do that without using OpenGL\n bufferInfo.presentationTimeUs = mFrameUsec * mFrame++;\n mMuxer.writeSampleData(mVideoTrackIndex, encodedData, bufferInfo);\n }", "private void save(String name, Bitmap bitmap) {\n\n File photo = new File(currentCaptureDirectory, name + \".jpg\");\n if (photo.exists()) photo.delete();\n\n try {\n FileOutputStream fos = new FileOutputStream(photo.getPath());\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos);\n fos.close();\n uploadMultipart(photo.getAbsolutePath(), name + \".jpg\");\n } catch (java.io.IOException e) {\n Log.e(\"PictureDemo\", \"Exception in photoCallback\", e);\n }\n }", "public synchronized void pushData(byte[] buffer, int len) {\r\n // saveFile(buffer,len);\r\n int index = 0;\r\n mOutput.write(buffer, 0, len);\r\n byte[] src = mOutput.toByteArray();\r\n if (!foundStartCode) {\r\n index = KMPMatch.indexOf(src, frameHeader);\r\n if (index != -1) {\r\n //foundStartCode=true;\r\n Log.i(tag, \"found start code, index = \" + index);\r\n } else {\r\n Log.e(tag, \"cannot found startcode,data len =\" + mOutput.size());\r\n mOutput.reset();\r\n return;\r\n }\r\n }\r\n //Log.d(tag,\"dataSize = \" + src.length + \" index = \" + index);\r\n int leave = mOutput.size() - index;\r\n LogUtil.i(tag, \"leave: \" + (leave - 32));\r\n while (true) {\r\n if (leave > 32) //header size\r\n {\r\n System.arraycopy(src, index, frameheader, 0, 32);\r\n NArchive arIn = NArchive.createFromBuffer(frameheader, true);\r\n //\t\tbyte[] part =new byte[24];\r\n int mark = arIn.readInt();\r\n byte ch = arIn.readByte();\r\n byte codeType = arIn.readByte();\r\n byte resolution = arIn.readByte();\r\n byte vopType = arIn.readByte();\r\n if (vopType == AUDIO_FRAME) {\r\n Log.d(tag, \"codectype AUDIO_FRAME= \" + codeType);\r\n//\t\t\t\t\tAudioPlay.audioCodec = codeType;\r\n hasAudio = true;\r\n } else if (vopType == I_FRAME) {\r\n Log.d(tag, \"codectype I_FRAME = \" + codeType);\r\n getIFrame = true;\r\n }\r\n byte videMode = arIn.readByte();\r\n byte streamType = arIn.readByte();\r\n short rate = arIn.readShort();\r\n int dataSize = arIn.readInt();\r\n int sequence = arIn.readInt();\r\n int currenttime = arIn.readInt();\r\n long timestamp = arIn.readLong();\r\n LogUtil.i(tag, \"dataSize: \" + dataSize);\r\n if (leave - 32 >= dataSize) {\r\n { //video\r\n //Log.d(tag,\"push video data ,size = \" + (dataSize) + \" timestamp = \" + timestamp + \"sequence = \" + sequence + \" mark = \" + Integer.toHexString(mark));\r\n if (dataSize < 0) {\r\n Log.e(tag, \"video data exception,leave data = \" + leave);\r\n leave -= 32 + dataSize;\r\n break;\r\n }\r\n Log.d(tag, \"timestamp = \" + timestamp + \" sequence = \" + sequence + \" videoSize = \" + dataSize);\r\n if (getIFrame) {\r\n pushVideoData(src, index + 32, dataSize, timestamp);\r\n if (getVideoQueueSize() >= 2 && getAudioQueueSize() == 0) {\r\n hasAudio = false;\r\n needBuffering = false;\r\n Log.d(tag, \"no audio\");\r\n }\r\n Log.d(tag, \"timestamp diff= \" + (timestamp - lastAudioTime) + \" video time = \" + timestamp + \" AudioTime = \" + lastAudioTime);\r\n }\r\n }\r\n index += (32 + dataSize);\r\n leave -= (32 + dataSize);\r\n } else { //dataSize > leave-32\r\n Log.w(tag, \"data is not enough,need read more data...\");\r\n break;\r\n }\r\n } else {\r\n LogUtil.e(tag, \" leve 无效\");\r\n }\r\n break;\r\n }//end while\r\n if (leave > 0) {\r\n byte[] temp = new byte[leave];\r\n System.arraycopy(src, index, temp, 0, leave);\r\n mOutput.reset();\r\n mOutput.write(temp, 0, leave);\r\n //Log.d(tag,\"leave Size = \" + leave);\r\n } else {\r\n mOutput.reset();\r\n }\r\n }", "@Override\r\n public void run() {\n Mat frame = grabFrame();\r\n\r\n//\t\t\t\t\t\t// convert and show the frame\r\n//\t\t\t\t\t\tImage imageToShow = Utils.mat2Image(frame);\r\n//\t\t\t\t\t\tupdateImageView(currentFrame, imageToShow);\r\n }", "@Override\n public void draw(Canvas canvas) {\n if (mApplyTransformation) {\n mDstRect.set(getBounds());\n mSx = (float) mDstRect.width() / mMetaData[0];\n mSy = (float) mDstRect.height() / mMetaData[1];\n mApplyTransformation = false;\n }\n if (mPaint.getShader() == null) {\n if (mIsRunning)\n renderFrame(mColors, mGifInfoPtr, mMetaData);\n else\n mMetaData[4] = -1;\n\n canvas.scale(mSx, mSy);\n final int[] colors = mColors;\n\n if (colors != null)\n canvas.drawBitmap(colors, 0, mMetaData[0], 0f, 0f, mMetaData[0], mMetaData[1], true, mPaint);\n\n if (mMetaData[4] >= 0 && mMetaData[2] > 1)\n //UI_HANDLER.postDelayed(mInvalidateTask, mMetaData[4]);//TODO don't post if message for given frame was already posted\n invalidateSelf();\n } else\n canvas.drawRect(mDstRect, mPaint);\n }", "public File bitmapToFile(Bitmap bitmap){\n File newImage;\n try {\n newImage = new File(file, \"jaki.png\");\n FileOutputStream fos = new FileOutputStream(newImage);\n\n bitmap.compress(Bitmap.CompressFormat.JPEG, 80, fos); // 100 is high quality\n fos.flush();\n fos.close();\n\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n return newImage;\n }", "private void CreateCompression() {\n double[][] Ydct = new double[8][8];\n double[][] Cbdct = new double[8][8];\n double[][] Crdct = new double[8][8];\n\n /*\n Tenemos que coger una matriz de 8x8 que sera nuestro pixel a comprimir. Si la matriz se sale de los parametros\n altura y anchura, haremos padding con 0, para que sea negro.\n */\n\n\n for (int i = 0; i < height; i += 8) {\n for (int j = 0; j < width; j += 8) {\n for (int x = 0; x < 8; ++x) {\n for (int y = 0; y < 8; ++y) {\n if (i + x >= height || j + y >= width) {\n Ydct[x][y] = 0;\n Cbdct[x][y] = 0;\n Crdct[x][y] = 0;\n } else {\n Ydct[x][y] = (double) imagenYCbCr[x + i][y + j][0] - 128;\n Cbdct[x][y] = (double) imagenYCbCr[x + i][y + j][1] - 128;\n Crdct[x][y] = (double) imagenYCbCr[x + i][y + j][2] - 128;\n }\n }\n }\n\n\n /*\n Haremos el DCT2 de cada componente de color para el pixel\n */\n\n\n Ydct = dct2(Ydct);\n Cbdct = dct2(Cbdct);\n Crdct = dct2(Crdct);\n\n /*\n Quantizamos los DCT de cada componente del color\n */\n\n for (int v = 0; v < 8; ++v) {\n for (int h = 0; h < 8; ++h) {\n Ydct[v][h] = Math.round(Ydct[v][h] / QtablesLuminance[quality][v][h]);\n Cbdct[v][h] = Math.round(Cbdct[v][h] / QtablesChrominance[quality][v][h]);\n Crdct[v][h] = Math.round(Crdct[v][h] / QtablesChrominance[quality][v][h]);\n\n }\n }\n\n\n /*\n Hacemos el encoding con Huffman HAY QUE RECORRER EN ZIGZAG CADA MATRIZ\n */\n\n int u = 1;\n int k = 1;\n int contador = 0;\n for (int element = 0; element < 64; ++element, ++contador) {\n Yencoding.add((int) Ydct[u - 1][k - 1]);\n Cbencoding.add((int) Cbdct[u - 1][k - 1]);\n Crencoding.add((int) Crdct[u - 1][k - 1]);\n if ((k + u) % 2 != 0) {\n if (k < 8)\n k++;\n else\n u += 2;\n if (u > 1)\n u--;\n } else {\n if (u < 8)\n u++;\n else\n k += 2;\n if (k > 1)\n k--;\n }\n }\n }\n }\n }", "public Bitmap getImage(){\n return images[currentFrame];\n }", "@Override\r\n public void onResult(byte[] videoBuffer, int size)\r\n {\n mDjiGLSurfaceView.setDataToDecoder(videoBuffer, size);\r\n }", "public static native Bitmap nativeRecoStillImage(Bitmap bitmap, int tryhard, int bwantimg, byte[]bresult, int maxsize, int []rets);", "public static String saveImage(Context con, Bitmap finalBitmap) {\n File myDir = new File(Environment.getExternalStorageDirectory() +\n File.separator + \"BABIES\" + File.separator + \"BABIES-IMG\");\n boolean success = true;\n if (!myDir.exists()) {\n success = myDir.mkdirs();\n }\n\n if(success) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-mm-dd\");\n String image_name = sdf.format(new Date())\n + \"_\" +\n System.currentTimeMillis();\n String fname = \"IMG-\" + image_name + \".jpg\";\n File imgFile = new File(myDir.getAbsolutePath() + File.separator + fname);\n if (imgFile.exists()) imgFile.delete();\n Log.d(\"saveimg\", myDir.getAbsolutePath() + \" \" + fname);\n try {\n FileOutputStream out = new FileOutputStream(imgFile);\n finalBitmap.compress(Bitmap.CompressFormat.JPEG, 100, out);\n out.flush();\n out.close();\n\n MediaScannerConnection.scanFile(con, new String[] { imgFile.getPath() }, new String[] { \"image/jpeg\" }, null);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return imgFile.getPath();\n }else\n {\n LibInspira.showShortToast(con,\"Something Wrong cant save file\");\n return \"\";\n }\n\n }", "public abstract void setUpBitmap(Context context);", "public void showbitmap3() {\n \n \t}", "private void debugIDRFrame(NAL buf, NAL spsBuffer, NAL ppsBuffer) {\n if(spsBuffer == null || ppsBuffer == null) {\n return;\n }\n if(mDebugIDRFrame) {\n try {\n String path = mMainActivity.getExternalMediaDirs()[0].getAbsolutePath() + \"/\" + buf.frameIndex + \".h264\";\n FileOutputStream stream = new FileOutputStream(path);\n stream.write(spsBuffer.buf, 0, spsBuffer.length);\n stream.write(ppsBuffer.buf, 0, ppsBuffer.length);\n stream.write(buf.buf, 0, buf.length);\n stream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "private void generateFrame(int frameIndex, int colorFormat, byte[] mFrame) {\n final int HALF_WIDTH = mWidth / 2;\n boolean semiPlanar = isSemiPlanarYUV(colorFormat);\n // Set to zero. In YUV this is a dull green.\n Arrays.fill(mFrame, (byte) 0);\n\n int startX, startY, countX, countY;\n\n frameIndex %= 8;\n //frameIndex = (frameIndex / 8) % 8; // use this instead for debug -- easier to see\n if (frameIndex < 4) {\n startX = frameIndex * (mWidth / 4);\n startY = 0;\n } else {\n startX = (7 - frameIndex) * (mWidth / 4);\n startY = mHeight / 2;\n }\n\n for (int y = startY + (mHeight / 2) - 1; y >= startY; --y) {\n for (int x = startX + (mWidth / 4) - 1; x >= startX; --x) {\n if (semiPlanar) {\n // full-size Y, followed by UV pairs at half resolution\n // e.g. Nexus 4 OMX.qcom.video.encoder.avc COLOR_FormatYUV420SemiPlanar\n // e.g. Galaxy Nexus OMX.TI.DUCATI1.VIDEO.H264E\n // OMX_TI_COLOR_FormatYUV420PackedSemiPlanar\n mFrame[y * mWidth + x] = (byte) TEST_Y;\n if ((x & 0x01) == 0 && (y & 0x01) == 0) {\n mFrame[mWidth * mHeight + y * HALF_WIDTH + x] = (byte) TEST_U;\n mFrame[mWidth * mHeight + y * HALF_WIDTH + x + 1] = (byte) TEST_V;\n }\n } else {\n // full-size Y, followed by quarter-size U and quarter-size V\n // e.g. Nexus 10 OMX.Exynos.AVC.Encoder COLOR_FormatYUV420Planar\n // e.g. Nexus 7 OMX.Nvidia.h264.encoder COLOR_FormatYUV420Planar\n mFrame[y * mWidth + x] = (byte) TEST_Y;\n if ((x & 0x01) == 0 && (y & 0x01) == 0) {\n mFrame[mWidth * mHeight + (y / 2) * HALF_WIDTH + (x / 2)] = (byte) TEST_U;\n mFrame[mWidth * mHeight + HALF_WIDTH * (mHeight / 2) +\n (y / 2) * HALF_WIDTH + (x / 2)] = (byte) TEST_V;\n }\n }\n }\n }\n }", "private void doExtractDecodeEncodeMux(MediaExtractor videoExtractor,\n MediaExtractor audioExtractor, MediaCodec videoDecoder,\n MediaCodec videoEncoder, MediaCodec audioDecoder,\n MediaCodec audioEncoder, MediaMuxer muxer) {\n ByteBuffer[] videoDecoderInputBuffers = null;\n ByteBuffer[] videoDecoderOutputBuffers = null;\n ByteBuffer[] videoEncoderInputBuffers = null;\n ByteBuffer[] videoEncoderOutputBuffers = null;\n MediaCodec.BufferInfo videoDecoderOutputBufferInfo = null;\n MediaCodec.BufferInfo videoEncoderOutputBufferInfo = null;\n if (mCopyVideo) {\n videoDecoderInputBuffers = videoDecoder.getInputBuffers();\n videoDecoderOutputBuffers = videoDecoder.getOutputBuffers();\n videoEncoderInputBuffers = videoEncoder.getInputBuffers();\n videoEncoderOutputBuffers = videoEncoder.getOutputBuffers();\n videoDecoderOutputBufferInfo = new MediaCodec.BufferInfo();\n videoEncoderOutputBufferInfo = new MediaCodec.BufferInfo();\n }\n ByteBuffer[] audioDecoderInputBuffers = null;\n ByteBuffer[] audioDecoderOutputBuffers = null;\n ByteBuffer[] audioEncoderInputBuffers = null;\n ByteBuffer[] audioEncoderOutputBuffers = null;\n MediaCodec.BufferInfo audioDecoderOutputBufferInfo = null;\n MediaCodec.BufferInfo audioEncoderOutputBufferInfo = null;\n if (mCopyAudio) {\n audioDecoderInputBuffers = audioDecoder.getInputBuffers();\n audioDecoderOutputBuffers = audioDecoder.getOutputBuffers();\n audioEncoderInputBuffers = audioEncoder.getInputBuffers();\n audioEncoderOutputBuffers = audioEncoder.getOutputBuffers();\n audioDecoderOutputBufferInfo = new MediaCodec.BufferInfo();\n audioEncoderOutputBufferInfo = new MediaCodec.BufferInfo();\n }\n // We will get these from the decoders when notified of a format change.\n MediaFormat decoderOutputVideoFormat = null;\n MediaFormat decoderOutputAudioFormat = null;\n // We will get these from the encoders when notified of a format change.\n MediaFormat encoderOutputVideoFormat = null;\n MediaFormat encoderOutputAudioFormat = null;\n // We will determine these once we have the output format.\n int outputVideoTrack = -1;\n int outputAudioTrack = -1;\n // Whether things are done on the video side.\n boolean videoExtractorDone = false;\n boolean videoDecoderDone = false;\n boolean videoEncoderDone = false;\n // Whether things are done on the audio side.\n boolean audioExtractorDone = false;\n boolean audioDecoderDone = false;\n boolean audioEncoderDone = false;\n // The video decoder output buffer to process, -1 if none.\n int pendingVideoDecoderOutputBufferIndex = -1;\n // The audio decoder output buffer to process, -1 if none.\n int pendingAudioDecoderOutputBufferIndex = -1;\n\n boolean muxing = false;\n\n int videoExtractedFrameCount = 0;\n int videoDecodedFrameCount = 0;\n int videoEncodedFrameCount = 0;\n\n int audioExtractedFrameCount = 0;\n int audioDecodedFrameCount = 0;\n int audioEncodedFrameCount = 0;\n boolean mVideoConfig = false;\n boolean mainVideoFrame = false;\n long mLastVideoSampleTime = 0;\n long mVideoSampleTime = 0;\n\n boolean mAudioConfig = false;\n boolean mainAudioFrame = false;\n long mLastAudioSampleTime = 0;\n long mAudioSampleTime = 0;\n while (!interrupted&& ((mCopyVideo && !videoEncoderDone) || (mCopyAudio && !audioEncoderDone))) {\n //###########################Video###################################\n // Extract video from file and feed to decoder.\n // Do not extract video if we have determined the output format but\n // we are not yet ready to mux the frames.\n while (mCopyVideo && !videoExtractorDone\n && (encoderOutputVideoFormat == null || muxing)) {\n int decoderInputBufferIndex = videoDecoder\n .dequeueInputBuffer(TIMEOUT_USEC);\n if (decoderInputBufferIndex <= MediaCodec.INFO_TRY_AGAIN_LATER) {\n Log.d(\"wanlijun\", \"no video decoder input buffer: \"\n + decoderInputBufferIndex);\n break;\n }\n Log.d(\"wanlijun\",\n \"video decoder dequeueInputBuffer: returned input buffer: \"\n + decoderInputBufferIndex);\n ByteBuffer decoderInputBuffer = videoDecoderInputBuffers[decoderInputBufferIndex];\n int size = videoExtractor.readSampleData(decoderInputBuffer, 0);\n if (videoExtractor.getSampleFlags() == MediaExtractor.SAMPLE_FLAG_SYNC) {\n Log.d(\"wanlijun\",\" video decoder SAMPLE_FLAG_SYNC \");\n }\n long presentationTime = videoExtractor.getSampleTime();\n Log.d(\"wanlijun\", \"video extractor: returned buffer of size \"\n + size);\n Log.d(\"wanlijun\", \"video extractor: returned buffer for time \"\n + presentationTime);\n if (size > 0) {\n videoDecoder.queueInputBuffer(decoderInputBufferIndex, 0,\n size, presentationTime,\n videoExtractor.getSampleFlags());\n }\n videoExtractorDone = !videoExtractor.advance();\n if (videoExtractorDone) {\n Log.d(\"wanlijun\", \"video extractor: EOS\");\n videoDecoder.queueInputBuffer(decoderInputBufferIndex, 0,\n 0, 0, MediaCodec.BUFFER_FLAG_END_OF_STREAM);\n }\n videoExtractedFrameCount++;\n // We extracted a frame, let's try something else next.\n break;\n }\n //###########################Audio###################################\n // Extract audio from file and feed to decoder.\n // Do not extract audio if we have determined the output format but\n // we are not yet ready to mux the frames.\n while (mCopyAudio && !audioExtractorDone\n && (encoderOutputAudioFormat == null || muxing)) {\n int decoderInputBufferIndex = audioDecoder.dequeueInputBuffer(TIMEOUT_USEC);\n if (decoderInputBufferIndex <= MediaCodec.INFO_TRY_AGAIN_LATER) {\n Log.d(\"wanlijun\", \"no audio decoder input buffer: \"+decoderInputBufferIndex);\n break;\n }\n Log.d(\"wanlijun\", \"audio decoder dequeueInputBuffer: returned input buffer: \"\n + decoderInputBufferIndex);\n ByteBuffer decoderInputBuffer = audioDecoderInputBuffers[decoderInputBufferIndex];\n int size = audioExtractor.readSampleData(decoderInputBuffer, 0);\n long presentationTime = audioExtractor.getSampleTime();\n Log.d(\"wanlijun\", \"audio extractor: returned buffer of size \"\n + size);\n Log.d(\"wanlijun\", \"audio extractor: returned buffer for time \"\n + presentationTime);\n if (size > 0) {\n audioDecoder.queueInputBuffer(decoderInputBufferIndex, 0,\n size, presentationTime,\n audioExtractor.getSampleFlags());\n }\n audioExtractorDone = !audioExtractor.advance();\n if (audioExtractorDone) {\n Log.d(\"wanlijun\", \"audio extractor: EOS\");\n audioDecoder.queueInputBuffer(decoderInputBufferIndex, 0,\n 0, 0, MediaCodec.BUFFER_FLAG_END_OF_STREAM);\n }\n audioExtractedFrameCount++;\n // We extracted a frame, let's try something else next.\n break;\n }\n\n // Poll output frames from the video decoder and feed the encoder.\n while (mCopyVideo && !videoDecoderDone\n && pendingVideoDecoderOutputBufferIndex == -1\n && (encoderOutputVideoFormat == null || muxing)) {\n int decoderOutputBufferIndex = videoDecoder.dequeueOutputBuffer(videoDecoderOutputBufferInfo,\n TIMEOUT_USEC);\n if (decoderOutputBufferIndex == MediaCodec.INFO_TRY_AGAIN_LATER) {\n Log.d(\"wanlijun\", \"no video decoder output buffer\");\n break;\n }else if (decoderOutputBufferIndex == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED) {\n //do what for this?\n decoderOutputVideoFormat = videoDecoder.getOutputFormat();\n Log.d(\"wanlijun\", \"video decoder: output format changed: \" + decoderOutputVideoFormat);\n break;\n }else if (decoderOutputBufferIndex == MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED) {\n Log.d(\"wanlijun\", \"video decoder: output buffers changed\");\n videoDecoderOutputBuffers = videoDecoder.getOutputBuffers();\n break;\n }\n\n if ((videoDecoderOutputBufferInfo.flags & MediaCodec.BUFFER_FLAG_CODEC_CONFIG) != 0) {\n Log.d(\"wanlijun\", \"video decoder: codec config buffer\");\n videoDecoder.releaseOutputBuffer(decoderOutputBufferIndex,false);\n break;\n }\n Log.d(\"wanlijun\", \"video decoder: returned buffer for time \"\n + videoDecoderOutputBufferInfo.presentationTimeUs);\n\n pendingVideoDecoderOutputBufferIndex = decoderOutputBufferIndex;\n videoDecodedFrameCount++;\n // We extracted a pending frame, let's try something else next.\n break;\n }\n\n // Feed the pending decoded audio buffer to the video encoder.\n while (mCopyVideo && pendingVideoDecoderOutputBufferIndex != -1) {\n Log.d(\"wanlijun\",\"video decoder: attempting to process pending buffer: \"\n + pendingVideoDecoderOutputBufferIndex);\n int encoderInputBufferIndex = videoEncoder.dequeueInputBuffer(TIMEOUT_USEC);\n if (encoderInputBufferIndex <= MediaCodec.INFO_TRY_AGAIN_LATER) {\n Log.d(\"wanlijun\", \"no video encoder input buffer: \"\n +encoderInputBufferIndex);\n break;\n }\n Log.d(\"wanlijun\", \"video encoder: returned input buffer: \"\n + encoderInputBufferIndex);\n ByteBuffer encoderInputBuffer = videoEncoderInputBuffers[encoderInputBufferIndex];\n int size = videoDecoderOutputBufferInfo.size;\n long presentationTime = videoDecoderOutputBufferInfo.presentationTimeUs;\n Log.d(\"wanlijun\", \"video decoder: processing pending buffer: \"\n + pendingVideoDecoderOutputBufferIndex);\n Log.d(\"wanlijun\", \"video decoder: pending buffer of size \" + size);\n Log.d(\"wanlijun\", \"video decoder: pending buffer for time \"\n + presentationTime);\n if (size >= 0) {\n\n try {\n ByteBuffer decoderOutputBuffer = videoDecoderOutputBuffers[pendingVideoDecoderOutputBufferIndex]\n .duplicate();\n decoderOutputBuffer\n .position(videoDecoderOutputBufferInfo.offset);\n decoderOutputBuffer\n .limit(videoDecoderOutputBufferInfo.offset + size);\n encoderInputBuffer.position(0);\n encoderInputBuffer.put(decoderOutputBuffer);\n //size not enable\n videoEncoder.queueInputBuffer(encoderInputBufferIndex, 0,\n size, presentationTime,\n videoDecoderOutputBufferInfo.flags);\n } catch (Exception e) {\n // TODO: handle exception\n e.printStackTrace();\n }\n\n }\n videoDecoder.releaseOutputBuffer(\n pendingVideoDecoderOutputBufferIndex, false);\n pendingVideoDecoderOutputBufferIndex = -1;\n if ((videoDecoderOutputBufferInfo.flags & MediaCodec.BUFFER_FLAG_END_OF_STREAM) != 0) {\n Log.d(\"wanlijun\", \"video decoder: EOS\");\n videoDecoderDone = true;\n }\n // We enqueued a pending frame, let's try something else next.\n break;\n }\n // Poll frames from the video encoder and send them to the muxer.\n while (mCopyVideo && !videoEncoderDone\n && (encoderOutputVideoFormat == null || muxing)) {\n // can not get avilabel outputBuffers?\n int encoderOutputBufferIndex = videoEncoder.dequeueOutputBuffer(videoEncoderOutputBufferInfo,\n TIMEOUT_USEC);\n if (encoderOutputBufferIndex == MediaCodec.INFO_TRY_AGAIN_LATER) {\n Log.d(\"wanlijun\", \"no video encoder output buffer\");\n break;\n }else if (encoderOutputBufferIndex == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED) {\n Log.d(\"wanlijun\", \"video encoder: output format changed\");\n if (outputVideoTrack >= 0) {\n // fail(\"video encoder changed its output format again?\");\n Log.d(\"wanlijun\",\"video encoder changed its output format again?\");\n }\n encoderOutputVideoFormat = videoEncoder.getOutputFormat();\n break;\n }else if (encoderOutputBufferIndex == MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED) {\n Log.d(\"wanlijun\", \"video encoder: output buffers changed\");\n videoEncoderOutputBuffers = videoEncoder.getOutputBuffers();\n break;\n }\n\n // assertTrue(\"should have added track before processing output\", muxing);\n Log.d(\"wanlijun\", \"video encoder: returned output buffer: \"\n + encoderOutputBufferIndex);\n Log.d(\"wanlijun\", \"video encoder: returned buffer of size \"\n + videoEncoderOutputBufferInfo.size);\n ByteBuffer encoderOutputBuffer = videoEncoderOutputBuffers[encoderOutputBufferIndex];\n if ((videoEncoderOutputBufferInfo.flags & MediaCodec.BUFFER_FLAG_CODEC_CONFIG) != 0) {\n Log.d(\"wanlijun\", \"video encoder: codec config buffer\");\n // Simply ignore codec config buffers.\n mVideoConfig = true;\n videoEncoder.releaseOutputBuffer(encoderOutputBufferIndex,false);\n break;\n }\n\n\n if(mVideoConfig){\n if(!mainVideoFrame){\n mLastVideoSampleTime = videoEncoderOutputBufferInfo.presentationTimeUs;\n mainVideoFrame = true;\n }else{\n if(mVideoSampleTime == 0){\n mVideoSampleTime = videoEncoderOutputBufferInfo.presentationTimeUs - mLastVideoSampleTime;\n }\n }\n }\n videoEncoderOutputBufferInfo.presentationTimeUs = mLastVideoSampleTime + mVideoSampleTime;\n if (videoEncoderOutputBufferInfo.size != 0) {\n muxer.writeSampleData(outputVideoTrack,\n encoderOutputBuffer, videoEncoderOutputBufferInfo);\n mLastVideoSampleTime = videoEncoderOutputBufferInfo.presentationTimeUs;\n }\n\n if ((videoEncoderOutputBufferInfo.flags & MediaCodec.BUFFER_FLAG_END_OF_STREAM) != 0) {\n Log.d(\"wanlijun\", \"video encoder: EOS\");\n videoEncoderDone = true;\n }\n videoEncoder.releaseOutputBuffer(encoderOutputBufferIndex,\n false);\n videoEncodedFrameCount++;\n // We enqueued an encoded frame, let's try something else next.\n break;\n }\n\n // Poll output frames from the audio decoder.\n // Do not poll if we already have a pending buffer to feed to the\n // encoder.\n while (mCopyAudio && !audioDecoderDone\n && pendingAudioDecoderOutputBufferIndex == -1\n && (encoderOutputAudioFormat == null || muxing)) {\n int decoderOutputBufferIndex = audioDecoder\n .dequeueOutputBuffer(audioDecoderOutputBufferInfo,TIMEOUT_USEC);\n if (decoderOutputBufferIndex == MediaCodec.INFO_TRY_AGAIN_LATER) {\n Log.d(\"wanlijun\", \"no audio decoder output buffer\");\n break;\n }else if (decoderOutputBufferIndex == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED) {\n decoderOutputAudioFormat = audioDecoder.getOutputFormat();\n Log.d(\"wanlijun\", \"audio decoder: output format changed: \" + decoderOutputAudioFormat);\n break;\n }else if (decoderOutputBufferIndex == MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED) {\n Log.d(\"wanlijun\", \"audio decoder: output buffers changed\");\n audioDecoderOutputBuffers = audioDecoder.getOutputBuffers();\n break;\n }\n\n Log.d(\"wanlijun\", \"audio decoder: returned output buffer: \"\n + decoderOutputBufferIndex);\n Log.d(\"wanlijun\", \"audio decoder: returned buffer of size \"\n + audioDecoderOutputBufferInfo.size);\n Log.d(\"wanlijun\", \"audio decoder: returned buffer for time \"\n + audioDecoderOutputBufferInfo.presentationTimeUs);\n\n if ((audioDecoderOutputBufferInfo.flags & MediaCodec.BUFFER_FLAG_CODEC_CONFIG) != 0) {\n Log.d(\"wanlijun\", \"audio decoder: codec config buffer\");\n audioDecoder.releaseOutputBuffer(decoderOutputBufferIndex,false);\n break;\n }\n\n\n pendingAudioDecoderOutputBufferIndex = decoderOutputBufferIndex;\n audioDecodedFrameCount++;\n // We extracted a pending frame, let's try something else next.\n break;\n }\n\n // Feed the pending decoded audio buffer to the audio encoder.\n while (mCopyAudio && pendingAudioDecoderOutputBufferIndex != -1) {\n Log.d(\"wanlijun\",\"audio decoder: attempting to process pending buffer: \"+ pendingAudioDecoderOutputBufferIndex);\n int encoderInputBufferIndex = audioEncoder.dequeueInputBuffer(TIMEOUT_USEC);\n if (encoderInputBufferIndex <= MediaCodec.INFO_TRY_AGAIN_LATER) {\n Log.d(\"wanlijun\", \"no audio encoder input buffer: \"+encoderInputBufferIndex);\n break;\n }\n Log.d(\"wanlijun\", \"audio encoder: returned input buffer: \"+ encoderInputBufferIndex);\n ByteBuffer encoderInputBuffer = audioEncoderInputBuffers[encoderInputBufferIndex];\n int size = audioDecoderOutputBufferInfo.size;\n long presentationTime = audioDecoderOutputBufferInfo.presentationTimeUs;\n Log.d(\"wanlijun\", \"audio decoder: processing pending buffer: \"+ pendingAudioDecoderOutputBufferIndex);\n Log.d(\"wanlijun\", \"audio decoder: pending buffer of size \" + size);\n Log.d(\"wanlijun\", \"audio decoder: pending buffer for time \"+ presentationTime);\n if (size >= 0) {\n try {\n ByteBuffer decoderOutputBuffer = audioDecoderOutputBuffers[pendingAudioDecoderOutputBufferIndex]\n .duplicate();\n decoderOutputBuffer\n .position(audioDecoderOutputBufferInfo.offset);\n decoderOutputBuffer\n .limit(audioDecoderOutputBufferInfo.offset + size);\n encoderInputBuffer.position(0);\n encoderInputBuffer.put(decoderOutputBuffer);\n audioEncoder.queueInputBuffer(encoderInputBufferIndex, 0,\n audioDecoderOutputBufferInfo.offset + size, presentationTime,\n audioDecoderOutputBufferInfo.flags);\n\n } catch (Exception e) {\n // TODO: handle exception\n e.printStackTrace();\n }\n\n }\n audioDecoder.releaseOutputBuffer(pendingAudioDecoderOutputBufferIndex, false);\n pendingAudioDecoderOutputBufferIndex = -1;\n if ((audioDecoderOutputBufferInfo.flags & MediaCodec.BUFFER_FLAG_END_OF_STREAM) != 0) {\n Log.d(\"wanlijun\", \"audio decoder: EOS\");\n audioDecoderDone = true;\n }\n // We enqueued a pending frame, let's try something else next.\n break;\n }\n\n // Poll frames from the audio encoder and send them to the muxer.\n while (mCopyAudio && !audioEncoderDone\n && (encoderOutputAudioFormat == null || muxing)) {\n int encoderOutputBufferIndex = audioEncoder\n .dequeueOutputBuffer(audioEncoderOutputBufferInfo,TIMEOUT_USEC);\n if (encoderOutputBufferIndex == MediaCodec.INFO_TRY_AGAIN_LATER) {\n Log.d(\"wanlijun\", \"no audio encoder output buffer\");\n break;\n }else if (encoderOutputBufferIndex == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED) {\n Log.d(\"wanlijun\", \"audio encoder: output format changed\");\n if (outputAudioTrack >= 0) {\n // fail(\"audio encoder changed its output format again?\");\n Log.d(\"wanlijun\",\"audio encoder changed its output format again?\");\n }\n encoderOutputAudioFormat = audioEncoder.getOutputFormat();\n break;\n }else if (encoderOutputBufferIndex == MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED) {\n Log.d(\"wanlijun\", \"audio encoder: output buffers changed\");\n audioEncoderOutputBuffers = audioEncoder.getOutputBuffers();\n break;\n }\n // assertTrue(\"should have added track before processing output\",muxing);\n Log.d(\"wanlijun\", \"audio encoder: returned output buffer: \"\n + encoderOutputBufferIndex);\n Log.d(\"wanlijun\", \"audio encoder: returned buffer of size \"\n + audioEncoderOutputBufferInfo.size);\n ByteBuffer encoderOutputBuffer = audioEncoderOutputBuffers[encoderOutputBufferIndex];\n if ((audioEncoderOutputBufferInfo.flags & MediaCodec.BUFFER_FLAG_CODEC_CONFIG) != 0) {\n Log.d(\"wanlijun\", \"audio encoder: codec config buffer\");\n // Simply ignore codec config buffers.\n mAudioConfig = true;\n audioEncoder.releaseOutputBuffer(encoderOutputBufferIndex,false);\n break;\n }\n Log.d(\"wanlijun\", \" audio encoder: returned buffer for time \"\n + audioEncoderOutputBufferInfo.presentationTimeUs);\n\n if(mAudioConfig){\n if(!mainAudioFrame){\n mLastAudioSampleTime = audioEncoderOutputBufferInfo.presentationTimeUs;\n mainAudioFrame = true;\n }else{\n if(mAudioSampleTime == 0){\n mAudioSampleTime = audioEncoderOutputBufferInfo.presentationTimeUs - mLastAudioSampleTime;\n }\n }\n }\n\n audioEncoderOutputBufferInfo.presentationTimeUs = mLastAudioSampleTime + mAudioSampleTime;\n if (audioEncoderOutputBufferInfo.size != 0) {\n muxer.writeSampleData(outputAudioTrack,\n encoderOutputBuffer, audioEncoderOutputBufferInfo);\n mLastAudioSampleTime = audioEncoderOutputBufferInfo.presentationTimeUs;\n }\n\n if ((audioEncoderOutputBufferInfo.flags & MediaCodec.BUFFER_FLAG_END_OF_STREAM) != 0) {\n Log.d(\"wanlijun\", \"audio encoder: EOS\");\n audioEncoderDone = true;\n }\n audioEncoder.releaseOutputBuffer(encoderOutputBufferIndex,false);\n audioEncodedFrameCount++;\n // We enqueued an encoded frame, let's try something else next.\n break;\n }\n\n if (!muxing && (!mCopyAudio || encoderOutputAudioFormat != null)\n && (!mCopyVideo || encoderOutputVideoFormat != null)) {\n if (mCopyVideo) {\n Log.d(\"wanlijun\", \"muxer: adding video track.\");\n outputVideoTrack = muxer.addTrack(encoderOutputVideoFormat);\n }\n if (mCopyAudio) {\n Log.d(\"wanlijun\", \"muxer: adding audio track.\");\n outputAudioTrack = muxer.addTrack(encoderOutputAudioFormat);\n }\n Log.d(\"wanlijun\", \"muxer: starting\");\n muxer.start();\n muxing = true;\n }\n }\n Log.d(\"wanlijun\", \"exit looper\");\n }", "@Override\n\tpublic void onPreviewFrame(byte[] data, Camera c) { \n\t\tif(sendBitmap){\n\t Camera.Parameters p = c.getParameters();\n\t int width = p.getPreviewSize().width;\n\t int height = p.getPreviewSize().height;\n\t \n\t sendBitmap=true;\n\t \n\t mask = AlphaMake.makeSimpleMask(data, height, width, mRotVec);\n\t mRotOld=mRotVec.clone();\n\t mRenderer.setTextures(data, mask);\n\t mRenderer.setChange(changeInRot());\n\t\t}\n\t}", "public void processFrame(Mat in, Mat out)\r\n\t{\r\n\t\t// multiple regions of interest\r\n\t\t\r\n\t\tint playSquares = 32; // number of playable game board squares\r\n\t\t\r\n\t\t// keep track of starting row square\r\n\t\tint parity = 0; // 0 is even, 1 is odd, tied to row number\r\n\t\tint count = 0; // row square\r\n\t\tint rowNum = 0; // row number, starting at 0\r\n\t\t\r\n\t\tint vsegment = in.rows() / 8; // only accounts 8 playable\r\n\t\tint hsegment = in.cols() / 10; // 8 playable, 2 capture\r\n\t\tint hOffset = hsegment * 2; // offset for playable board\r\n\t\tint vOffset = vsegment + 40;\r\n\t\t\r\n\t\t// For angle of camera\r\n\t\tint dx = 80;\r\n\t\tint ddx = 0;\r\n\t\thsegment -= 16;\r\n\t\t\r\n\t\tint dy = 20;\r\n\t\tvsegment -= 24;\r\n\t\t\r\n\t\t// Go through all playable squares\r\n\t\tfor (int i = 0; i < playSquares; i++)\r\n\t\t{\r\n\t\t\t// change offset depending on the row\r\n\t\t\tif (parity == 0) // playable squares start on 2nd square from left\r\n\t\t\t{\r\n\t\t\t\tif (rowNum >= 5)\r\n\t\t\t\t\tdx -= 3;\r\n\t\t\t\thOffset = hsegment * 2 + dx;\r\n\t\t\t}\r\n\t\t\telse // playable squares start on immediate left\r\n\t\t\t{\r\n\t\t\t\tif (rowNum >= 5)\r\n\t\t\t\t\tdx -= 3;\r\n\t\t\t\thOffset = hsegment + dx;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (rowNum == 4)\r\n\t\t\t\tif (count == 6)\r\n\t\t\t\t\tddx = 10;\r\n\t\t\tif (rowNum == 5)\r\n\t\t\t{\r\n\t\t\t\tif (count == 0)\r\n\t\t\t\t\tddx = -6;\r\n\t\t\t\telse if (count == 2)\r\n\t\t\t\t\tddx = 6;\r\n\t\t\t\telse if (count == 4)\r\n\t\t\t\t\tddx = 12;\r\n\t\t\t\telse if (count == 6)\r\n\t\t\t\t\tddx = 20;\r\n\t\t\t}\r\n\t\t\tif (rowNum == 6)\r\n\t\t\t{\r\n\t\t\t\tif (count == 0)\r\n\t\t\t\t\tddx = 0;\r\n\t\t\t\telse if (count == 2)\r\n\t\t\t\t\tddx = 16;\r\n\t\t\t\telse if (count == 4)\r\n\t\t\t\t\tddx = 32;\r\n\t\t\t\telse if (count == 6)\r\n\t\t\t\t\tddx = 40;\r\n\t\t\t}\r\n\t\t\tif (rowNum == 7)\r\n\t\t\t{\r\n\t\t\t\tif (count == 0)\r\n\t\t\t\t\tddx = 0;\r\n\t\t\t\telse if (count == 2)\r\n\t\t\t\t\tddx = 24;\r\n\t\t\t\telse if (count == 4)\r\n\t\t\t\t\tddx = 40;\r\n\t\t\t\telse\r\n\t\t\t\t\tddx = 52;\r\n\t\t\t}\r\n\r\n\t\t\t// find where roi should be\r\n\t\t\t//System.out.println(\"\" + vOffset);\r\n\t\t\tPoint p1 = new Point(hOffset + count * hsegment + ddx, vOffset + rowNum * vsegment - dy); // top left point of rectangle (x,y)\r\n\t\t\tPoint p2 = new Point(hOffset + (count + 1) * hsegment + ddx, vOffset + (rowNum + 1) * vsegment - dy); // bottom right point of rectangle (x,y)\r\n\t\t\t\r\n\t\t\t// create rectangle that is board square\r\n\t\t\tRect bound = new Rect(p1, p2);\r\n\t\t\t\r\n\t\t\tchar color;\r\n\t\t\tif (i == 0)\r\n\t\t\t{\r\n\t\t\t\t// frame only includes rectangle\r\n\t\t\t\tMat roi = new Mat(in, bound);\r\n\t\t\t\t\r\n\t\t\t\t// get the color\r\n\t\t\t\tcolor = identifyColor(roi);\r\n\t\t\t\t\r\n\t\t\t\t// copy input image to output image\r\n\t\t\t\tin.copyTo(out);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// frame only includes rectangle\r\n\t\t\t\tMat roi = new Mat(out, bound);\r\n\t\t\t\t\r\n\t\t\t\t// get the color\r\n\t\t\t\tcolor = identifyColor(roi);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// annotate the output image\r\n\t\t\t// scalar values as (blue, green, red)\r\n\t\t\tswitch(color)\r\n\t\t\t{\r\n\t\t\t\tcase COLOR_BLUE:\r\n\t\t\t\t\t//Imgproc.rectangle(out, p1, p2, new Scalar(255, 0, 0), 2);\r\n\t\t\t\t\tCore.rectangle(out, p1, p2, new Scalar(255, 0, 0), 2);\r\n\t\t\t\t\tboard[i] = CheckersBoard.BLACK; // end user's piece\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase COLOR_ORANGE:\r\n\t\t\t\t\t//Imgproc.rectangle(out, p1, p2, new Scalar(0, 128, 255), 2);\r\n\t\t\t\t\tCore.rectangle(out, p1, p2, new Scalar(0, 128, 255), 2);\r\n\t\t\t\t\tboard[i] = CheckersBoard.WHITE; // system's piece\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase COLOR_WHITE:\r\n\t\t\t\t\t//Imgproc.rectangle(out, p1, p2, new Scalar(255, 255, 255), 2);\r\n\t\t\t\t\tCore.rectangle(out, p1, p2, new Scalar(255, 255, 255), 2);\r\n\t\t\t\t\tboard[i] = CheckersBoard.EMPTY;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase COLOR_BLACK: // this is black\r\n\t\t\t\t\t//Imgproc.rectangle(out, p1, p2, new Scalar(0, 0, 0), 2);\r\n\t\t\t\t\tCore.rectangle(out, p1, p2, new Scalar(0, 0, 0), 2); // maybe add 8, 0 as line type and fractional bits\r\n\t\t\t\t\tboard[i] = CheckersBoard.EMPTY;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcount += 2;\r\n\t\t\tif (count == 8)\r\n\t\t\t{\r\n\t\t\t\tparity = ++parity % 2; // change odd or even\r\n\t\t\t\tcount = 0;\r\n\t\t\t\trowNum++;\r\n\t\t\t\thsegment += 2;\r\n\t\t\t\tdx -= 10;\r\n\t\t\t\tdy += 10;\r\n\t\t\t\tvsegment += 3;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public final void prepareForSaving() {\r\n\t\tbi_image.pack();\r\n\t}" ]
[ "0.6599917", "0.6137475", "0.6097177", "0.6058314", "0.60024226", "0.5848384", "0.5838144", "0.58253807", "0.58246905", "0.5816973", "0.5785438", "0.5776704", "0.5704273", "0.56882787", "0.56751376", "0.5657371", "0.56090075", "0.56052166", "0.5602894", "0.55948603", "0.5591567", "0.55702186", "0.55688465", "0.55634576", "0.55575055", "0.5527724", "0.5522941", "0.55199903", "0.54686624", "0.54569215", "0.5448354", "0.54376334", "0.5420581", "0.54190856", "0.541389", "0.5402371", "0.53887725", "0.5386651", "0.53761035", "0.53732765", "0.5363617", "0.5347778", "0.5345459", "0.5339963", "0.5339963", "0.53321016", "0.5326567", "0.5324618", "0.53195", "0.53176963", "0.5305274", "0.53045326", "0.5303943", "0.5282501", "0.5279653", "0.5274928", "0.52736866", "0.5270499", "0.5260476", "0.524485", "0.5240999", "0.52389306", "0.5235385", "0.523289", "0.52192163", "0.52157927", "0.52070415", "0.52041173", "0.5191892", "0.51891917", "0.51884377", "0.5187599", "0.51825625", "0.5178183", "0.51737475", "0.51696146", "0.51682806", "0.516362", "0.51635253", "0.51621836", "0.5148879", "0.5146218", "0.514461", "0.51397836", "0.5135406", "0.51350236", "0.51278824", "0.51222146", "0.51196074", "0.51155263", "0.5113181", "0.5105517", "0.5102518", "0.51016116", "0.5100873", "0.5098674", "0.5093385", "0.509071", "0.5087226", "0.50859565", "0.50792956" ]
0.0
-1
Notify awaitFrame() to continue
private void frameProcessed(){ if(DEBUG) Log.d(TAG, "Frame Processed"); synchronized (mWaitFrame) { mWaitFrame.notifyAll(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void run() {\n try {\n while (true) {\n frame.updateState();\n Thread.sleep(1000);\n }\n } catch (Exception e) {\n // e.printStackTrace();\n }\n }", "public void awaitNewImage() {\n final int TIMEOUT_MS = 2500;\n\n synchronized (mFrameSyncObject) {\n while (!mFrameAvailable) {\n try {\n // Wait for onFrameAvailable() to signal us. Use a timeout to avoid\n // stalling the test if it doesn't arrive.\n mFrameSyncObject.wait(TIMEOUT_MS);\n if (!mFrameAvailable) {\n throw new RuntimeException(\"Camera frame wait timed out\");\n }\n } catch (InterruptedException ie) {\n // shouldn't happen\n throw new RuntimeException(ie);\n }\n }\n mFrameAvailable = false;\n }\n\n // Latch the data.\n mTextureRender.checkGlError(\"before updateTexImage\");\n mSurfaceTexture.updateTexImage();\n }", "public void nextFrame() {\r\n\t\tif (logger.isDebugEnabled())\r\n\t\t\tlogger.debug(\"Next frame\");\r\n\t\t\r\n\t\t// Start game\r\n\t\tif (state == GameState.CREATED) {\r\n\t\t\t// Change state\r\n\t\t\tstate = GameState.WAITING_FRAME;\r\n\t\t\t\r\n\t\t\t// Start scheduling thread\r\n\t\t\tstart();\r\n\t\t}\r\n\t\t// Play one step\r\n\t\telse if (state != GameState.STOPPED) {\r\n\t\t\t// Change state\r\n\t\t\tstate = GameState.WAITING_FRAME;\r\n\t\t\t\r\n\t\t\t// Wake scheduling thread up\r\n\t\t\twakeUp();\r\n\t\t}\r\n\t}", "private void grabForever() {\n if (Platform.isFxApplicationThread()) {\n throw new IllegalStateException(\"This may not run on the FX application thread!\");\n }\n final Thread thread = Thread.currentThread();\n while (!thread.isInterrupted()) {\n boolean success = grabOnceBlocking();\n if (!success) {\n // Couldn't grab the frame, wait a bit to try again\n // This may be caused by a lack of connection (such as the robot is turned off) or various other network errors\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n thread.interrupt();\n }\n }\n }\n }", "public synchronized void continueRunning() {\n\t\tif (!busy)\n\t\t\treturn;\n\t\tif (!stage.bluetoothConnected()) {\n\t\t\tstop();\n\t\t\treturn;\n\t\t}\n\t\tif (strideSize < MINIMUM_STRIDE) {\n\t\t\tcomplete();\n\t\t}\n\t\tif (state == STATE_READY) {\n\t\t\tSystem.out.println(\"Moving to starting position...\");\n\t\t\tmoveInZ(strideSize * Z_RANGE / 2);\n\t\t\tstate = STATE_MOVING;\n\t\t}\n\t\tif (state == STATE_MOVING) {\n\t\t\tboolean stop = zMoveStep();\n\t\t\tif (stop) {\n\t\t\t\tswitchDirection();\n\t\t\t\tstate = STATE_STEPPING;\n\t\t\t}\n\t\t}\n\t\tif (state == STATE_STEPPING) {\n\t\t\tsynchronized(lockStatus) {\n\t\t\t\twaitFrames = PAUSE; \n\t\t\t}\n\t\t}\n\t}", "public final void mo9492b() {\n this.f720a.await();\n }", "@Override\n public void run() {\n Frame parentFrame = getParentFrame(IFrameSource.FULL_CONTEXT);\n if (parentFrame != null) {\n getFrameList().gotoFrame(parentFrame);\n }\n }", "private void await() {\n try {\n game.getBarrier().await();\n } catch (InterruptedException | BrokenBarrierException e) {\n e.printStackTrace();\n }\n }", "public Frame waitFrame(ComponentChooser ch)\n\tthrows InterruptedException {\n\treturn(waitFrame(ch, 0));\n }", "@Override\n public boolean waitToProceed() {\n return false;\n }", "void await()\n throws InterruptedException;", "public void nextFrame() {\r\n frame++;\r\n if( frame > lastEditFrame + frameDelay ) {\r\n // The last transaction is 'done'\r\n transaction = null;\r\n }\r\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tmVideoContrl.playNext();\r\n\r\n\t\t\t\t\t\t\t}", "private void await() {\n try {\n Thread.sleep(10 * 1000L);\n } catch (InterruptedException e) {\n // ignore\n }\n }", "private synchronized boolean waitResume() {\n return true;\n }", "public boolean advanceAction(ParamFrame frame) {\r\n\t\t\t\t\r\n\t\tprocess.compileDataset(progressBar, frame);\t\t\r\n\t\treturn true;\r\n\t}", "synchronized void resumeGame() {\n myShouldPause = false;\n notify();\n }", "synchronized void resumeGame() {\n myShouldPause = false;\n notify();\n }", "@Override\n\tprotected void animationSubclassRunCompletionAlgorightm(boolean wait) {\n\n\t}", "public void continueRun() {\n pause = false;\n }", "synchronized void resumeGame() {\n myGamePause = false;\n this.notify();\n }", "public abstract void await() throws InterruptedException;", "public void mo10681a() {\n if (MultiPhotoFrameMainActivity.this._handler != null) {\n MultiPhotoFrameMainActivity.this._handler.post(new Runnable() {\n public void run() {\n C2331d.m10114a((Activity) MultiPhotoFrameMainActivity.this, C2328a.WAIT_PROCESSING, (Bundle) null);\n }\n });\n }\n }", "public abstract void onWait();", "public void wait4arriving() throws InterruptedException {\n \n // your code here\t\n }", "private static native void runFrame(long pointer);", "public void resume() {}", "void await() throws InterruptedException;", "void await() throws InterruptedException;", "void await() throws InterruptedException;", "public void start() {\n\t\tcurrentFrameIndex = 0;\n\t}", "@Override\n public void run() {\n try{\n Thread.sleep(5000);\n // To get rid of the Exception lets run the label updating after process is get completing. So that is label is\n // getting updated on the UI Thread and we don't get any exception\n Platform.runLater(new Runnable() { // Opening new Runnable to update the label\n @Override\n public void run() { // This is running in the UI Thread so updating the label\n ourLabel.setText(\"We did something\");\n }\n });\n } catch (InterruptedException e) {\n // We don't care about this\n }\n }", "public void processNextFrame() {\n\t\t\n\t\tif ((config) && (group != null)) {\n\t\t\tmgmtObserver.requestBoundsUpdate(group, this);\n\t\t}\n\t}", "public void stepForward(){\n\t\tif(timer == null){ return; }\n\t\ttimer.stop();\n\t\n\t\t//check to see if we have reached the last frame\n\t\tif(frameIndex == frames.length-1){ frameIndex = 0; }\n\t\telse{ frameIndex++; }\n\t\n\t\tframes[frameIndex].display();\n frames[frameIndex].clearDisplay();\n\t}", "@Override\n\t\t\tpublic void loopDone() {\n\t\t\t\t\n\t\t\t\tif (gamersArray.size()>0){\n\t\t\t\t\tattractAnim.stop();\n\t\t\t\t\t// need to call from main thread!\n\t\t\t\t\tmUIHandler.post(new Runnable(){\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tchangeState(State.WAIT_FOR_START);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public void resume() {\n mStopAtLoopEnd = false;\n cancelCallback();\n postCallback();\n }", "private static void askForContinue() {\n\t\t\t\n\t\t}", "public void run() {\n this.comp.setPause();\n }", "private void awaitT(){\n try {\n game.getBarrier().await(20, TimeUnit.SECONDS);\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (BrokenBarrierException e) {\n e.printStackTrace();\n } catch (TimeoutException e) {\n trimBarrier();\n synchronized (lock){\n if(!botSignal){\n bot = new BotClient();\n new Thread(bot).start();\n botSignal = true;\n }\n\n }\n }\n }", "public void nextFrame() {\r\n if (frame < maxFrames - 1) {\r\n frame++;\r\n } else {\r\n frame = 0;\r\n }\r\n }", "public void play() {\n executor.submit(new Runnable() {\n public void run() {\n resume = true;\n notifyStatus();\n }\n });\n }", "public void next()\n\t{\n\t\tSystem.err.print(\"-\");\n\t\tif(pp.available())\n\t\t{\n\t\t\tSystem.err.print(\"+\");\n\t\t\timg_header=pp.getFrameHeader();\n\t\t\tbi=pp.getFrame();\n\t\t\tip[ip_index].setImage(bi);\n\t\t\tip[ip_index].repaint();\n\t\t\tip_index++;\n\t\t\t//ip_index%=cols*rows;\n\t\t\tip_index%=tiles;\n\t\t\tpp.next();\n\t\t}\n\t\tif(panel_glass.isVisible() || is_paused)\n\t\t{\n\t\t\tupdateInfoPanel();\n\t\t\tpanel_buffer_fill.setValue(pp.getBufferFillLevel());\n\t\t\tpanel_buffer_fill.repaint();\n\t\t\tif(is_paused)\n\t\t\t{\n\t\t\t\ttry{Thread.sleep(10);}catch(Exception e){}\n\t\t\t}\n\t\t}\n\t}", "public void resume() {\n moveStop = true;\n }", "@Override\r\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\twhile(!(gst.done&&gpt.done));\r\n\t\t\t\t\t\t\t\t\tx.task().post(new Runnable(){\r\n\r\n\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\t\t\t\tNoteInJson[] pattern=gpt.getPattern();\r\n\t\t\t\t\t\t\t\t\t\t\tgotoLiveView(pattern,gst.resultFile);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}", "public synchronized void resume() {\r\n\r\n\t\tpaused = false;\r\n\t\tnotifyAll();\r\n\t}", "public void run() {\n if (this.gui.getPauseState()) {\n this.gui.goEnd();\n }\n }", "public void resume();", "private void selectFrame()\n\t{\n\t\t// Increment the animation frame\n\t\tif ((long) Game.getTimeMilli() - frameStart >= interval)\n\t\t{\n\t\t\tsetFrame(currFrame+1);\n\t\t}\n\t\t// Get the path to the current frame's image\n\t\tsetFramePath();\n\t\t// If the image frame doesn't exist...\n\t\tif (!GraphicsManager.getResManager().resExists(currFramePath))\n\t\t{\n\t\t\tif (isLooping())\n\t\t\t{\n\t\t\t\tsetFrame(1);\n\t\t\t\tsetFramePath();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tisFinished = true;\n\t\t\t}\n\t\t}\n\t}", "public void pauseTilDone() throws InterruptedException { \n\t\t\tthis.me_.join(); \n\t\t}", "@Override\n public void resume() {\n }", "private void WaitTalk() {\n // to restart as touched screen.\n if (this.mRestartF) this.RestartTalk();\n }", "protected abstract boolean resume();", "@Override\n public void resume() {\n \n }", "boolean notifyBegin();", "@Override\n public void run() {\n try {\n\n while (true) {\n moveBlockDown();\n repaint();\n Thread.sleep(1000);\n }\n } catch (InterruptedException e) {\n\n }\n\n }", "void resume();", "void resume();", "void resume();", "@Override\n\tpublic void run() {\n\t\twhile (computeFrame()) {}\n\t\tframe.setVisible(false);\n\t\tframe.dispose();\n\t}", "public void onFrameRefresh(ym iba) {}", "public void pauseXlet()\n {\n //(...)\n }", "protected void beginExecution() {\r\n\t\tframeAdvancer = provideFrameAdvancer();\r\n\t\tanimation = provideAnimation();\r\n\t\tcontinuation = provideContinuationPredicate();\r\n\t\tObjects.requireNonNull(frameAdvancer);\r\n\t\tObjects.requireNonNull(animation);\r\n\t\tObjects.requireNonNull(continuation);\r\n\t}", "public void onFramePickup(ym iba) {}", "@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tgetLocation();\r\n\t\t\t\t\tstartLooping();\r\n\t\t\t\t}", "public void finishedAndNowAtFrame(final EvDecimal f)\n\t\t{\n\t\tif(SwingUtilities.isEventDispatchThread())\n\t\t\tframeStart.setValue(f);\n\t\telse\n\t\t\t{\n\t\t\ttry\n\t\t\t\t{\n\t\t\t\tSwingUtilities.invokeAndWait(new Runnable(){\n\t\t\t\t\tpublic void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\tframeStart.setValue(f);\n\t\t\t\t\t\t}});\n\t\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Override\r\n public void run() {\n Mat frame = grabFrame();\r\n\r\n//\t\t\t\t\t\t// convert and show the frame\r\n//\t\t\t\t\t\tImage imageToShow = Utils.mat2Image(frame);\r\n//\t\t\t\t\t\tupdateImageView(currentFrame, imageToShow);\r\n }", "@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tptrFrameLayout.refreshComplete();\t//结束刷新\r\n\t\t\t\t\t}", "public void resume() {\n running = true;\n gameThread = new Thread(this);\n gameThread.start();\n }", "@Override\r\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\twhile(!gpt.done);\r\n\t\t\t\t\t\t\t\t\tx.task().post(new Runnable(){\r\n\r\n\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\t\t\t\tNoteInJson[] pattern=gpt.getPattern();\r\n\t\t\t\t\t\t\t\t\t\t\tgotoLiveView(pattern,sound_cache);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}", "public static void continueChat()\r\n {\r\n do\r\n {\r\n NPCChat.clickContinue(true);\r\n General.sleep(300, 450);\r\n }\r\n while (NPCChat.getClickContinueInterface() != null);\r\n General.sleep(300, 350);\r\n }", "public boolean advance() {\n currentFrame ++;\n if(currentFrame >= frames.size()) {\n return false;\n }\n// LogU.d(\" advance 222 \"+ currentFrame);\n return true;\n }", "public static void changeFrame() {\r\n\t\t\r\n\t}", "public void resume() {\n }", "@Override\n public void run() {\n Message uiMSG;\n //Create message with only SHOW_ORIGINAL_COLOR argument\n uiMSG = BackgroundThread.this.uiHandler.obtainMessage(BidirectionalMessageActivity.SHOW_ORIGINAL_COLOR, 0, 0, null);\n BackgroundThread.this.uiHandler.sendMessage(uiMSG); //Send start message to UI thread\n\n fillProgressbar(progressBar); //Fill progress bar as a long time operation\n //Message with information SHOW_NEW_COLOR as a end of long time operation\n uiMSG = BackgroundThread.this.uiHandler.obtainMessage(BidirectionalMessageActivity.SHOW_NEW_COLOR, 0, 0, null);\n BackgroundThread.this.uiHandler.sendMessage(uiMSG); //Message with end result is sent\n }", "@Override\n public void resume() {\n \n }", "public synchronized void goNow() {\n\t if ((waitingCarSize > 0) && (count > 0) && (count < waitingCarSize) && (buttonPressed == false)){\n\t buttonPressed = true;\n\t }\n\t notifyAll();\n\t return;\n }", "@Override\n public void actionPerformed(final ActionEvent e)\n {\n new Thread(new Runnable()\n {\n @Override\n public void run()\n {\n\n SwingUtilities.invokeLater(new Runnable()\n {\n @Override\n public void run()\n {\n frame.blockGUI();\n navigate(e);\n frame.releaseGUI();\n }\n });\n }\n }).start();\n }", "@Override\r\n public void resume() {\r\n\r\n }", "@Override\n public void resume() { }", "@Override\n public void resume() {\n\n }", "@Override\n public void resume() {\n\n }", "@Override\n public void resume() {\n\n }", "public void finishCapturing() {\n //YOUR CODE HERE\n\t pieceCaptured = false;\n\t \n }", "public void pause() {\n executor.submit(new Runnable() {\n public void run() {\n resume = false;\n pauseNoWait();\n }\n });\n }", "@Override\r\n public void resume() {\n }", "@Override\r\n public void resume() {\n }", "@Override\r\n public void resume() {\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tmVideoContrl.playPrevious();\r\n\r\n\t\t\t\t\t\t\t}", "public void refreshFrame() {\n switchWindow();\n this.switchToFrame(\"botFr\");\n }", "public void start(){\n\t\tthis.lastUpdate = System.currentTimeMillis();\n\t\tthis.millisIntoFrame=0;\n\t\tthis.currentFrame=0;\n\t}", "protected void sleepOnDrawFrame(final long duration) {\n runOnDrawFrame(new ResultRunnable() {\n @Override\n public Object run() {\n try {\n Thread.sleep(duration);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n return null;\n }\n });\n }", "public interface CompleteDisplayHandler {\n void handleCompleteFrame(byte[][] pixels, short seq);\n}", "void doOneFrame(DrawSurface d, double dt);", "public void run() {\t\t\r\n\t\tif(this.stopped) {\r\n\t\t\tthis.animationFigure.showBusy(false);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(this.state==null || this.state.getState() == State.UNBLOCKED) {\r\n\t\t\tthis.finished=true;\r\n\t\t this.animationFigure.showBusy(false);\r\n\t\t\t//notify Listeners and tell them that animation finished. This listeners are user defined listeners which will be informed.\r\n\t\t\tanimationFigure.notifyAnimationListener(new AnimationFinishedEvent(animationFigure, AnimationFinishedEvent.BUSY_FINISHED));\r\n\t\t\t//notify observers, here the observer which listens if animation is finished. this Observer looks into the animationqueue \r\n\t\t\t//after each finished \r\n\t\t\tsetChanged();\r\n\t\t\tnotifyObservers(this.animationFigure);\r\n\t\t\t\r\n\t\t\t// notify waiting threads\r\n\t\t\tsynchronized (this) {\r\n\t\t\t\tthis.notifyAll();\r\n\t\t\t}\r\n\t\t return;\r\n\t\t}\r\n\t\tif (counter >= 5) {\r\n\t\t\tcounter = 0;\r\n\t\t\tthis.animationFigure.showBusy(!this.animationFigure.isShowBusy());\r\n\t\t}\r\n\t\tcounter++;\r\n\t\tmap.getDisplay().timerExec(100, this);\t\t\t\r\n\t}", "@Override\n public void resume() {\n }", "@Override\n public void resume() {\n }", "@Override\n public void resume() {\n }", "@Override\n\tpublic void run() {\n\t\twhile(!isInterrupted) {\n\t\t\tlabel.setText(frames[index]);\n\t\t\ttry {\n\t\t\t\tThread.sleep(80);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tisInterrupted = true;\n\t\t\t\tlabel.setText(\"\");\n\t\t\t}\n\t\t\tif(index < frames.length - 1) {\n\t\t\t\tindex++;\n\t\t\t} else {\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t\t\tpublic boolean queueIdle() {\n\t\t\t\tif (mControlerPopupWindow != null && mVideoView.isShown()) {\n\t\t\t\t\tmControlerPopupWindow.showAtLocation(mVideoView,\n\t\t\t\t\t\t\tGravity.BOTTOM, 0, 0);\n\n\t\t\t\t\tmControlerPopupWindow.update(0, 0, screenWidth,\n\t\t\t\t\t\t\tcontrolViewHeight);\n\n\t\t\t\t\tLog.d(TAG, \"The worker thread id = \"\n\t\t\t\t\t\t\t+ Thread.currentThread().getId() + \"\\n\");\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}", "private void pause() throws InterruptedException {\n component.repaint();\n Thread.sleep(delay);\n }" ]
[ "0.626359", "0.6216453", "0.6078246", "0.6029275", "0.59867007", "0.59554166", "0.59389377", "0.59364367", "0.57840246", "0.57245064", "0.57110554", "0.5692402", "0.56827486", "0.5671783", "0.5645188", "0.56450415", "0.5633666", "0.5633666", "0.5632703", "0.5627022", "0.56235194", "0.56224376", "0.56083345", "0.5589554", "0.55847025", "0.5576239", "0.5563784", "0.55494", "0.55494", "0.55494", "0.5546209", "0.5529655", "0.5520503", "0.55079263", "0.5495482", "0.5488172", "0.54802907", "0.5459463", "0.5455167", "0.5440752", "0.54358715", "0.5421181", "0.5418732", "0.54107493", "0.54024124", "0.5395305", "0.53910637", "0.5389818", "0.5382192", "0.53771544", "0.53605884", "0.53601444", "0.5355341", "0.53540224", "0.5348509", "0.5348299", "0.5348299", "0.5348299", "0.5343336", "0.5342726", "0.534088", "0.5326365", "0.53167045", "0.5314925", "0.5305818", "0.5304957", "0.5302652", "0.52993685", "0.5297328", "0.52956116", "0.52925885", "0.5289371", "0.5288413", "0.5285824", "0.5285497", "0.528502", "0.52839905", "0.5283257", "0.52798843", "0.5279731", "0.5279731", "0.5279731", "0.5279253", "0.52790153", "0.52769953", "0.52769953", "0.52769953", "0.5275378", "0.52723885", "0.5271011", "0.5270639", "0.5265447", "0.5257706", "0.52571136", "0.52560836", "0.52560836", "0.52560836", "0.5237783", "0.52320504", "0.5229256" ]
0.67371047
0
Change background color to light gray
public static void makeBackgroundGray(){ StdDraw.clear(StdDraw.LIGHT_GRAY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBg(){\n this.setBackground(color);\n }", "protected void setLightBoxBackground() { Console.setBackground(Console.BLUE); }", "public void setBackgroundColor(Color c) {\n backColor = c;\n updateFigureForModel(nodeFigure);\n }", "@Override\n public GralColor setBackgroundColor(GralColor color)\n {\n return null;\n }", "public Color getBackground();", "@Override\n public void setBackgroundColor(int backgroundColor) {\n }", "public abstract View getBlackBackground();", "protected void setBoxBackground() { Console.setBackground(Console.RED); }", "private void colorSetup(){\n Color color2 = Color.GRAY;\n Color color = Color.LIGHT_GRAY;\n this.setBackground(color);\n this.mainPanel.setBackground(color);\n this.leftPanel.setBackground(color);\n this.rightPanel.setBackground(color);\n this.rightCenPanel.setBackground(color);\n this.rightLowPanel.setBackground(color);\n this.rightTopPanel.setBackground(color);\n this.inputPanel.setBackground(color);\n this.controlPanel.setBackground(color);\n this.setupPanel.setBackground(color);\n this.cameraPanel.setBackground(color);\n this.jPanel4.setBackground(color);\n this.sensSlider.setBackground(color); \n }", "public abstract void setCurBackground(Color colr);", "private void setBackgroundColor(int red) {\n\t\tint bgColor = Color.argb(255, red, 0, 0);\n\t\tlayout.setBackgroundColor(bgColor);\n\t}", "@Override\r\n\tpublic String getColor() {\n\t\treturn \"white\";\r\n\t}", "public Color getBackground(){\r\n return back;\r\n }", "private void applyBackgroundColor() {\r\n\t\tthis.control.setBackground(PromptSupport.getBackground(this.control));\r\n\t}", "public int backgroundColor() {\n // create/return the background color\n return Color.rgb(180, 200, 255);\n }", "public void clouleurFondEcran() {\n this.setBackground(Color.WHITE);\n jPanel3.setBackground(Color.WHITE);\n jPanel2.setBackground(Color.WHITE);\n jPanel5.setBackground(Color.WHITE);\n jTable2.setBackground(Color.WHITE);\n jTextField3.setBackground(Color.WHITE);\n }", "public Color getBackgroundColor(){\n\t\treturn Color.BLACK;\n\t}", "Color getBackgroundColor();", "@Override\r\n public void mousePressed(MouseEvent e) {\n setBackground(Color.BLUE);\r\n \r\n \r\n }", "protected void setPlayerBackground() { Console.setBackground(Console.YELLOW); }", "public void printBackground() {\n\t\tthis.gc.setFill(Color.BLACK);\n\t\tthis.gc.fillRect(0, 0, canvas.getWidth(), canvas.getHeight());\n\t}", "private void asignarColor(JPanel pane) {\n pane.setBackground(new Color(236, 37, 32));\n }", "public void Color() {\n\t\t\r\n\t}", "public void applyColor() {\n\t\tSystem.out.println(\"Yellow\");\n\n\t}", "public Color getBackgroundColor()\n {\n return backgroundColor;\n }", "private void setBgColor(Color c)\n\t{\n\t\teToPower.setBackground (c);\n\t\ttwoPower.setBackground (c);\n\t\tln.setBackground (c);\n\t\txCube.setBackground (c);\n\t\txSquare.setBackground (c);\n\t\tdel.setBackground (c);\n\t\tcubeRoot.setBackground (c);\n\t\tC.setBackground (c);\n\t\tnegate.setBackground (c);\n\t\tsquareRoot.setBackground (c);\n\t\tnine.setBackground (c);\n\t\teight.setBackground (c);\n\t\tseven.setBackground (c);\n\t\tsix.setBackground (c);\n\t\tfive.setBackground (c);\n\t\tfour.setBackground (c);\n\t\tthree.setBackground (c);\n\t\ttwo.setBackground (c);\n\t\tone.setBackground (c);\n\t\tzero.setBackground (c);\n\t\tdivide.setBackground (c);\n\t\tpercent.setBackground (c);\n\t\tmultiply.setBackground (c);\n\t\treciprocal.setBackground (c);\n\t\tadd.setBackground (c);\n\t\tsubtract.setBackground (c);\n\t\tdecimalPoint.setBackground (c);\n\t\tequals.setBackground (c);\n\t\te.setBackground (c);\n\t\tPI.setBackground (c);\n\t\tentry.setBackground (c);\n\t\t\n\t\tmenuBar.setBackground (c);\n\t\tfileMenu.setBackground (c);\n\t\ttoolsMenu.setBackground (c);\n\t\thelpMenu.setBackground (c);\n\t\t\n\t\texit.setBackground (c);\n\t\tsettings.setBackground (c);\n\t\tabout.setBackground (c);\n\t\treadme.setBackground (c);\n\t}", "public Color getBackgroundColor()\n {\n return sfondocolore;\n }", "@Override\r\n\tpublic void renderBackground() {\n\r\n\t}", "private void setBackgroundColor(int backColor){\n backgroundColor = backColor;\n touchArea.setBackgroundColor(backgroundColor);\n }", "public void setColor( int c ){//1 means black, 0 means white\r\n\t\tif(c==1)\r\n\t\t\tthis.setBackground(Color.BLACK);\r\n\t\telse\r\n\t\t\tthis.setBackground(Color.WHITE);\r\n\t}", "private void createBackground()\n {\n GreenfootImage background = getBackground();\n background.setColor(Color.BLACK);\n background.fill();\n }", "private void updateColor() {\n int redShift = red << 16; // red: 0xRR0000 <- 0xRR\n int greenShift = green << 8; // red: 0xGG00 <- 0xGG\n int blueShift = blue; // blue: 0xBB <- 0xBB\n int alphaShift = 0xff << 24; // alpha 0xff000000 <- 0xff // we don't want our color to be transparent.\n int color = alphaShift | redShift | greenShift | blueShift;\n viewColor.setBackgroundColor(color);\n }", "public Color getColor() {\r\n return Color.GRAY;\r\n }", "public Color getBackgroundColor() {\n return backColor;\n }", "protected Background background () {\n return Background.bordered(0xFFCCCCCC, 0xFFCC99FF, 5).inset(5);\n }", "public void setBackground(float[] rvba_01){\n\t\tswingComponent.setBackground(new Color(rvba_01[R_INDEX], rvba_01[G_INDEX], rvba_01[B_INDEX], rvba_01[A_INDEX]));\n\t}", "public final void mo39711K() {\n setBackgroundColor(0);\n }", "public Color getDefaultBackgroudColor() {\n return DEFAULT_BACKGROUND_COLOR;\n }", "private void drawBackground() {\n g2.setColor(SquareRenderer.BLANK_CELL_COLOR);\n g2.fillRect(BORDER_SIZE, BORDER_SIZE, BOARD_SIZE, BOARD_SIZE);\n }", "public javafx.scene.paint.Color viewColor() {\r\n return javafx.scene.paint.Color.WHITE;\r\n }", "@Override\r\n public void setBackground(Color c) {\r\n super.setBackground(c);\r\n colorWheel = null;\r\n repaint();\r\n }", "@Override\n\tpublic void render()\n\t{\n\t\tbackground.color().set(grid.backgroundColor());\n\t\tsuper.render();\n\t\tfade.render();\n\t}", "public javafx.scene.paint.Color viewColor() {\n return javafx.scene.paint.Color.WHITE;\n }", "private void assignTileColor() {\n boolean isLightTile = ((tileCoordinate + tileCoordinate / 8) % 2 == 0);\n setBackground(isLightTile ? LIGHT_TILE_COLOR : DARK_TILE_COLOR);\n }", "@Override\r\n\tpublic void howToColor() {\n\t\t\r\n\t}", "public void setBackgroundLayerColor(int color) {\n this.backgroundLayerColor = color;\n }", "public void chooseBackgroundColor(){\n currentBackgroundColor = backgroundColorPicker.getValue();\n draw();\n }", "@Override\n\tprotected int getMainTabBackgroundDrawable() {\n\t\treturn R.color.white;\n\t}", "@Override \n\tpublic void setNormalColor(){\n\t\tthis.setColor(Color.PINK);\n\t}", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "public void setBackground(Color color)\r\n\t{\r\n\t\t// System.out.println(\"setBackground\");\r\n\t}", "public void setBackgroundColor(Color color) {\n //bar.setBackground(color);\n }", "@Override\r\n\tpublic void setBackgroundResource(int resid) {\n\t\tsuper.setBackgroundResource(resid);\r\n\t}", "public Color getBackground()\r\n\t{\r\n\t\treturn _g2.getBackground();\r\n\t}", "private void setColor() {\n cell.setStroke(Color.GRAY);\n\n if (alive) {\n cell.setFill(aliveColor);\n } else {\n cell.setFill(deadColor);\n }\n }", "@Override\n\t\tpublic Color color() { return color; }", "public void setBackground(Color back) {\r\n this.back = back;\r\n }", "public Color getScreenBackgroundColor();", "public void setColor(GrayColor color){\n this.color = color;\n }", "private void setBackgroundColorDisplay(int colorR, int colorG, int colorB){\n\n int red = colorR;\n int green = colorG;\n int blue = colorB;\n\n if(colorR < 0){\n red = 0;\n }\n\n if (colorG < 0){\n green = 0;\n }\n\n if (colorB < 0){\n blue = 0;\n }\n\n int magnassoColor = (255 & 0xff) << 24 | (red & 0xff) << 16 | (green & 0xff) << 8 | (blue & 0xff);\n layout.setBackgroundColor(magnassoColor);\n }", "public void setBackColor( Color bgColor ) {\r\n backColor = bgColor;\r\n }", "public void setBackgroundColor(Color bkgColor) {\n setValue(PROP_BACKGROUND_COLOR, bkgColor);\n }", "@Override\n public void mousePressed(MouseEvent arg0) {\n yourBoardPanel[xx][yy].setBackground(new Color(175, 175, 0));\n }", "public Color getBackgroundColor() {\n\t\treturn backgroundColor;\n\t}", "protected int getColor() {\n return Color.TRANSPARENT;\n }", "public static Color getColor() { return lblColor.getBackground(); }", "public void setBackground(int x)\r\n { \t\r\n \tbg.setColor(ptools.color2Color3f(x));\r\n }", "public void highlightEnable() {\n actualFillColor = new Color(0, 255, 0, 150);\n repaint();\n revalidate();\n }", "public void setFrameBackgroundColor(int i2) {\n this.n.setColor(i2);\n }", "public void resetColor(){\n myRectangle.setFill(PADDLE_COLOR);\n }", "public void Back_To_White(View view) {\r\n lL.setBackgroundColor(Color.WHITE);\r\n }", "public void chooseColor() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}", "public void setManualBackgroundColor(Color color) {\n _manualBackgroundColor = color;\n }", "@Override\r\n\tpublic Color backgroundColor() {\n\t\tProperty<IntegerPropertyType> colorDiff = this.getProperty(PROPERTY_NAME_COLOR_DIFFERENCE);\r\n\t\tColor c = labs[colorDiff.getValue().intValue() % labs.length].getColor();\r\n\t\t\r\n\t\treturn c;\r\n\t}", "@SideOnly(Side.CLIENT)\n @Override\n public int getRenderColor(int metadata)\n {\n return 0xFFFFFF;\n }", "@Override\r\npublic void mousePressed(MouseEvent arg0) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "public void setBackground(Color col) {\n\t\tthis.background = col;\n\t}", "public void setBackgroundColor(Color background)\n {\n backgroundColor = background;\n paintAllObjects();\n }", "@Override\r\npublic void mouseClicked(MouseEvent e) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "public void init()\n {\n setBackground(Color.YELLOW);\n setForeground(Color.RED);\n }", "public void setRgbColorBg(int newval) throws YAPI_Exception\n {\n _rgbColor = newval;\n _ycolorled.set_rgbColor(newval);\n }", "protected void drawForegroundToBackground() {\n if (backgroundColor == null) { return; }\n\n final BufferedImage backgroundBufferedImage = new BufferedImage(dimension.width, dimension.height, this.bufferedImage.getType());\n final Graphics graphics = backgroundBufferedImage.getGraphics();\n\n // draw current color\n graphics.setColor(backgroundColor);\n graphics.fillRect(0, 0, dimension.width, dimension.height);\n graphics.drawImage(bufferedImage, 0, 0, null);\n\n // draw back to original\n final Graphics graphics2 = bufferedImage.getGraphics();\n graphics2.drawImage(backgroundBufferedImage, 0, 0, null);\n }", "@Override\r\npublic void mouseEntered(MouseEvent arg0) {\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "public Color getGraphBackground() {\r\n \t\treturn graph.getBackground();\r\n \t}", "public void draw() {\n background(0);\n}", "public abstract void setBackgroundPressed(final int rgba);", "public native final String backgroundColor() /*-{\n\t\treturn this.backgroundColor;\n\t}-*/;", "@Override\n\tprotected boolean inputEnter(View view, DragEvent event)\n\t{// Make red darker\n\t\tview.setBackgroundColor(RED);\n\t\treturn true;\n\t}", "public void setActivingColor(){\n this.setBackground(new Color( 213, 228, 242));\n this.forceupdateUI();\n }", "@Override\n public Color getColor() {\n return color;\n }", "public Color getManualBackgroundColor() {\n return (_manualBackgroundColor);\n }", "static void changeRed( Tile x ) {\n tiles.get(start).setBackground(white);\n x.setBackground(red);\n start = tiles.indexOf(x);\n }", "private void drawBackground() {\n\t\timgG2.setColor(Color.BLACK);\n\t\timgG2.fillRect(0,0,512, 512);\n\t\t\n\t\timgG2.setColor(Color.BLACK);\n\t\timgG2.fillRect(128, 0, 256, 512);\n\t}", "public static void setNodeBackFixedColor( Color color ) { BACK_FIXED_COLOR = color; }", "public Color getBackColor() {\r\n return backColor;\r\n }", "@Override\n\tpublic void Red() {\n\t\tSystem.out.println(\"Red Light\");\n\t\t\n\t}", "public Color getBackFlankingGapColor() {\n\t\treturn backgap ? Color.red : Color.lightGray;\n\t}" ]
[ "0.7002956", "0.69711053", "0.68246454", "0.68007994", "0.67767054", "0.67318326", "0.6693698", "0.6692257", "0.6608852", "0.65926504", "0.6569733", "0.65567696", "0.6526313", "0.65009177", "0.6478659", "0.6456391", "0.64363235", "0.642052", "0.64012337", "0.64001644", "0.63924253", "0.63836807", "0.6330827", "0.63136566", "0.6299655", "0.6299046", "0.62955964", "0.62948495", "0.6288694", "0.62705266", "0.626996", "0.62583613", "0.6247039", "0.62269735", "0.6208293", "0.6201625", "0.61996305", "0.6193785", "0.6187051", "0.61778873", "0.61672246", "0.61434704", "0.61423326", "0.6131215", "0.6128616", "0.6121645", "0.61068755", "0.6105672", "0.6080331", "0.6072477", "0.6072477", "0.6072477", "0.6072477", "0.60578257", "0.6032088", "0.6030468", "0.60275644", "0.6021942", "0.6015772", "0.60113174", "0.60110116", "0.5997533", "0.59851587", "0.5980051", "0.59762985", "0.5969953", "0.5966776", "0.5965865", "0.596357", "0.5958227", "0.595634", "0.5955498", "0.5945627", "0.59383774", "0.5935868", "0.59334666", "0.5932113", "0.59320235", "0.5928545", "0.5920205", "0.59180266", "0.59120846", "0.58961135", "0.58937573", "0.5884223", "0.58838034", "0.58790874", "0.58673894", "0.5864294", "0.58611864", "0.5858139", "0.58476627", "0.58396757", "0.58394754", "0.5839155", "0.58310425", "0.5824739", "0.5821831", "0.5811714", "0.5809499" ]
0.83482426
0
Set scale and canvas size to draw on
public static void main(String[] args) { StdDraw.setCanvasSize(1000,1000); StdDraw.setXscale(0, 400); StdDraw.setYscale(0, 400); // Change background color to light gray makeBackgroundGray(); // Draw Wolverine drawWolverine(); // Artist's signature StdDraw.text(350, 20, "Christopher Rosenfelt"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n canvasBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);\n drawCanvas = new Canvas(canvasBitmap);\n }", "public void initSize() {\n WIDTH = 320;\n //WIDTH = 640;\n HEIGHT = 240;\n //HEIGHT = 480;\n SCALE = 2;\n //SCALE = 1;\n }", "public void setCanvas(GameCanvas canvas) {\n\t\tthis.canvas = canvas;\n\t\tthis.scale.x = canvas.getWidth()/bounds.getWidth();\n\t\tthis.scale.y = canvas.getHeight()/bounds.getHeight();\n\t}", "public void setDrawScale(float x, float y) {\n \tdrawScale.set(x,y);\n }", "@Override\n public void scale(double x, double y) {\n graphicsEnvironmentImpl.scale(canvas, x, y);\n }", "private EnlargeCanvas() {\n }", "@Override\n public void settings() {\n setSize(WIDTH, HEIGHT);\n }", "private void determineCanvasSize() {\n boolean changed = transformManager.determineCanvasSize();\n if ( changed ) {\n changeListenerProxy.canvasSizeChanged( new ApparatusPanel2.ChangeEvent( ApparatusPanel2.this ) );\n paint();\n }\n }", "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh)\n {\n super.onSizeChanged(w, h, oldw, oldh);\n //initialize canvas background\n canvasBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);\n canvas = new Canvas(canvasBitmap);\n }", "void rootViewSizeChange()\n {\n int rootW = (int) Math.ceil(_rootView.getWidth());\n int rootH = (int) Math.ceil(_rootView.getHeight());\n _canvas.setWidth(rootW*_scale); _canvas.setHeight(rootH*_scale);\n }", "private void reloadCanvas(float scale) {\n mScale = scale;\n updateImageSize(mScale);\n }", "private void createCanvasAndFrame(){\n image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n canvas = new Canvas();\n Dimension dimension = new Dimension((int)(width*scale), (int)(height*scale));\n canvas.setPreferredSize(dimension);\n canvas.setMaximumSize(dimension);\n canvas.setMinimumSize(dimension);\n\n frame = new JFrame(title);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setLayout(new BorderLayout());\n frame.add(canvas, BorderLayout.CENTER);\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setResizable(false);\n frame.setVisible(true);\n\n canvas.createBufferStrategy(2);\n bufferStrategy = canvas.getBufferStrategy();\n graphics = bufferStrategy.getDrawGraphics();\n }", "public void setScale() {\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n scaleAffine();\n Scalebar.putZoomLevelDistances();\n\n //Set up the JFrame using the monitors resolution.\n setSize(screenSize); //screenSize\n setPreferredSize(new Dimension(800, 600)); //screenSize\n setExtendedState(Frame.NORMAL); //Frame.MAXIMIZED_BOTH\n }", "public void setSurfaceSize(int width, int height) {\n // synchronized to make sure these all change atomically\n synchronized (surfaceHolder) {\n canvasWidth = width;\n canvasHeight = height;\n }\n }", "void setBounds(double x, double y, double scale) {\n double drawAspect = (double)width / (double)height;\n\n double halfPlotWidth = scale / 2.0;\n double halfPlotHeight = scale / 2.0;\n if (drawAspect > 1.0) {\n halfPlotWidth *= drawAspect;\n } else {\n halfPlotHeight /= drawAspect;\n }\n\n setBounds(x - halfPlotWidth, y - halfPlotHeight, x + halfPlotWidth, y + halfPlotHeight);\n }", "public void setDrawScale(Vector2 value) {\n \tsetDrawScale(value.x,value.y); \n\t}", "public void setScaleFactor(float scale){\n scaleFactor = scale;\n }", "public void beginScaling() {\n xScale = 1.0f;\n yScale = 1.0f;\n }", "@Override\n public void settings() {\n size(800, 800, P3D);\n }", "public void resizeCanvas(int w, int h) {\n this.setPreferredSize(new Dimension(w,h));\n revalidate();\n}", "@Override\n public void settings(){\n size(500, 500);\n }", "public void setSize(float width, float height);", "void setDimension(double width, double height);", "public void settings() { size(1200, 800); }", "public void setScaleXY(double sx, double sy) { setScaleX(sx); setScaleY(sy); }", "public void setScale(float scale);", "protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n\n //create Bitmap of certain w,h\n bitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);\n\n //apply bitmap to graphic to start drawing.\n canvas = new Canvas(bitmap);\n }", "public void resize(double scaleFactor) {\r\n erase();\r\n size *= scaleFactor;\r\n moveTo((getXposition())*scaleFactor, (getYposition())*scaleFactor);\r\n draw();\r\n }", "@Override\r\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\r\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\r\n//\t\tcanvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR);\r\n\t\tcanvasBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);\r\n\t\tdrawCanvas = new Canvas(canvasBitmap);\r\n\t}", "public void settings() {\r\n size(WIDTH, HEIGHT); // Set size of screen\r\n }", "public void scale(int size) {\n chart.resetDimensions(size);\n repaint();\n }", "public final void setRealSize() {\r\n setZoom(ZOOM_REAL_SIZE);\r\n }", "private void updateScale() {\n target.setScaleX(scaleValue);\n target.setScaleY(scaleValue);\n }", "private void basicSize(){\n setSize(375,400);\n }", "public void setFrameSize();", "@Override\n\tpublic void resize(int w, int h) {\n\t\tthis.leveys = w;\n\t\tthis.korkeus = h;\n\t\tthis.batch = new SpriteBatch();\n\t\tthis.ylaPalkinKorkeus = (int) (0.0931 * leveys);\n\n//\t\tskaala = Math.min((float) (w - 50) / 640,\n//\t\t\t\t(float) (h - 50 - ylaPalkinKorkeus) / 370f);\n\t\tskaala = Math.min((float) (w - 50) / 590,\n\t\t\t\t(float) (h - 50 - ylaPalkinKorkeus) / 354f);\n\n\t\t//System.out.println(\"(w - 50) / 640 = \" + w + \" - 50) / 640 = \" + (float) (w - 50) / 640);\n\t\t//System.out.println(\"(h - 50 - ylaPalkinKorkeus) / 370f) = \" + h + \"- 50 - \" + ylaPalkinKorkeus + \") / 370f = \" + (float) (h - 50 - ylaPalkinKorkeus) / 370f);\n\t\tSystem.out.println(\"Fontin skaala: \" + skaala);\n\t\tfont2.setScale(skaala);\n\t\t//font2.setScale(skaala*0.2f);\n\t\t// leveysSkaala = w / 640;\n\t\t// korkeusSkaala = h / 480;\n\n\t}", "@Override\n\tfinal public void scale(double x, double y)\n\t{\n\t\twidth *= x;\n\t\theight *= y;\n\t}", "@Override\n protected void onSizeChanged(int w, int h, int oldW, int oldH) {\n super.onSizeChanged(w, h, oldW, oldH);\n\n canvasWidth = w;\n canvasHeight = h;\n updatePolygonSize();\n\n if (Math.min(canvasWidth, canvasHeight) != Math.min(oldW, oldH)) {\n refreshImage();\n }\n }", "private void updateImageSize(float scale) {\n int w = (int) (mImageWidth * scale);\n int h = (int) (mImageHeight * scale);\n mCanvas.setCoordinateSpaceWidth(w);\n mCanvas.setCoordinateSpaceHeight(h);\n mCanvas.getContext2d().drawImage(ImageElement.as(image.getElement()), 0, 0, w, h);\n }", "public Canvas (Dimension size) {\r\n // set size (a bit of a pain)\r\n setPreferredSize(size);\r\n setSize(size);\r\n // prepare to receive input\r\n setFocusable(true);\r\n requestFocus();\r\n setInputListeners();\r\n }", "@Override\r\n\tprotected void onDraw(Canvas canvas) {\n\t\tsuper.onDraw(canvas);\r\n\t\tif(width > height){\r\n\t\t\tfillRectf.set(0, 0, (float)currentLength/maxLength*width, height);\r\n//\t\t\tlog((float)currentLength/maxLength*width+\":\"+width);\r\n//\t\t\tlog(\"currentLength\"+currentLength);\r\n//\t\t\tlog(\"maxLength\"+maxLength);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tfillRectf.set(0, height - (float)currentLength/maxLength*height, width, height);\r\n\t\t}\r\n\t\tcanvas.drawRect(0, 0, width, height, mPaint);\r\n\t\tcanvas.drawRect(fillRectf, fillPaint);\r\n\t}", "private void rescale() {\n this.affineTransform = AffineTransform.getScaleInstance(this.zoom,\n this.zoom);\n int width = (int) ((this.board.getWidth() * 32) * this.zoom);\n int height = (int) ((this.board.getHeight() * 32) * this.zoom);\n this.setPreferredSize(new Dimension(width, height));\n this.repaint();\n }", "public void settings() {\n size(640, 384);\n }", "void onScaleChange(float scaleFactor, float focusX, float focusY);", "public void setSize(double aWidth, double aHeight) { setWidth(aWidth); setHeight(aHeight); }", "public void setPenSize(int pixelSize){\n myPen.setPenSize(pixelSize);\n }", "@Override\n public void setScale(float scale) {\n this.scale = scale;\n }", "public void preparePaint()\n {\n if(! size.equals(getSize())) { // if the size has changed...\n size = getSize();\n fieldImage = fieldView.createImage(size.width, size.height);\n g = fieldImage.getGraphics();\n\n xScale = size.width / gridWidth;\n if(xScale < 1) {\n xScale = GRID_VIEW_SCALING_FACTOR;\n }\n yScale = size.height / gridHeight;\n if(yScale < 1) {\n yScale = GRID_VIEW_SCALING_FACTOR;\n }\n }\n }", "public void setScale(float scale) {\n this.scale = scale;\n }", "private void sendResizeEventToFX() {\n redraw();\n update();\n \n pWidth = getClientArea().width;\n pHeight = getClientArea().height;\n\n resizePixelBuffer(lastScaleFactor);\n\n if (scenePeer == null) {\n return;\n }\n\n stagePeer.setSize(pWidth, pHeight);\n scenePeer.setSize(pWidth, pHeight);\n }", "public abstract void paint(Graphics2D graphics, float scale);", "@Override\n\tpublic void resize(int width, int height) {\n\t\trenderer.setSize(width, height);\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t}", "@Override\n\tpublic void setResolution(Dimension size) {\n\n\t}", "public void setScale(Scale scale) {\n this.scale = scale;\n }", "@Override\r\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\r\n\t\t// 图所占范围大小\r\n\t\tchart.setChartRange(w, h);\r\n\t}", "public void settings() {\r\n size(750, 550);\r\n }", "protected void onUpdateZoomCanvas(int x, int y) {\n if (mCanvasPreview == null) {\n return;\n }\n double scale = mScale * ZOOM_CANVAS_SCALE;\n Context2d c = mCanvasPreview.getContext2d();\n c.save(); \n c.scale(scale, scale);\n c.setFillStyle(HTMLColors.WHITE);\n c.fillRect(0, 0, mCanvasPreviewSize, mCanvasPreviewSize);\n int half = (int) ((mCanvasPreviewSize >> 1) / scale);\n c.drawImage(ImageElement.as(image.getElement()), -x + half, -y + half);\n c.restore();\n }", "Dimension getCanvasDimension();", "public void setSize(double size) \n {\n this.size = size;\n }", "public void preparePaint()\n {\n if(! size.equals(getSize())) { // if the size has changed...\n size = getSize();\n fieldImage = this.createImage(size.width, size.height);\n g = fieldImage.getGraphics();\n\n xScale = size.width / gridWidth;\n if(xScale < 1) {\n xScale = GRID_VIEW_SCALING_FACTOR;\n }\n yScale = size.height / gridHeight;\n if(yScale < 1) {\n yScale = GRID_VIEW_SCALING_FACTOR;\n }\n }\n }", "public void setBrushSize(float newSize)\n {\n float pixelSize = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,\n newSize, getResources().getDisplayMetrics());\n brushSize=pixelSize;\n drawPaint.setStrokeWidth(brushSize);\n }", "protected final void multiplySize(float size)\n {\n super.setSize(this.bokoblinWidth * size, this.bokoblinHeight * size);\n }", "private void updateSize() {\n double width = pane.getWidth();\n double height = pane.getHeight();\n\n if(oldWidth == 0) {\n oldWidth = width;\n }\n if(oldHeight == 0) {\n oldHeight = height;\n }\n\n double oldHvalue = pane.getHvalue();\n double oldVvalue = pane.getVvalue();\n if(Double.isNaN(oldVvalue)) {\n oldVvalue = 0;\n }\n if(Double.isNaN(oldHvalue)) {\n oldHvalue = 0;\n }\n\n pane.setVmax(height);\n pane.setHmax(width);\n\n if(grow) {\n renderMapGrow(width, height, curZoom);\n } else {\n renderMap(width, height, curZoom);\n }\n\n pane.setVvalue((height/oldHeight)*oldVvalue);\n pane.setHvalue((width/oldWidth)*oldHvalue);\n\n oldWidth = width;\n oldHeight = height;\n }", "void setPaperSize(short size);", "private void setScaleToBoardViewPanes(double scale) {\n boardController.getDrawedBoard().setScaleX(scale);\n boardController.getDrawedBoard().setScaleY(scale);\n boardController.getCanvas().setScaleX(scale);\n boardController.getCanvas().setScaleY(scale);\n boardController.getDartBoard().setScaleX(scale);\n boardController.getDartBoard().setScaleY(scale);\n boardController.getPointsAreaPane().setScaleX(scale);\n boardController.getPointsAreaPane().setScaleY(scale);\n }", "void setSize(Dimension size);", "void setSize(float w, float h) {\n _w = w;\n _h = h;\n }", "public void settings() {\r\n\t\tthis.size(PlayGame.WIDTH,PlayGame.HEIGHT);\r\n\t}", "public Dimension getCanvasSize() {\n return transformManager.getCanvasSize();\n }", "@Override\n\tpublic void settings() {\n\t\tpreviewRect = WallGeometry.scaleRectangleRounded(WallGeometry.getInstance().getWallGeometry(), Preview.SCALE);\n\t\tsize(previewRect.width, previewRect.height, P3D);\n\t}", "public void setScale(double scale) {\n\t\tdouble tx = this.transform.getTranslateX();\n\t\tdouble ty = this.transform.getTranslateY();\n\t\tthis.transform.setToScale(scale, scale);\n\t\tthis.transform.translate(tx, ty);\n\t}", "protected void updateScales() {\n hscale = 1f;\n vscale = 1f;\n viewData.setHscale(hscale);\n viewData.setVscale(vscale);\n }", "public void setSize(int w, int h){\n this.width = w;\n this.height = h;\n ppuX = (float)width / CAMERA_WIDTH;\n ppuY = (float)height / CAMERA_HEIGHT;\n }", "public void setSurfaceSize(int width, int height) {\n\t\t// synchronized to make sure these all change atomically\n\t\tsynchronized (mSurfaceHolder) {\n\t\t\tmCanvasWidth = width;\n\t\t\tmCanvasHeight = height;\n\n\t\t\t// don't forget to resize the background image\n\t\t\tmBackgroundImage = Bitmap.createScaledBitmap(mBackgroundImage, width, height, true);\n\t\t}\n\t}", "public void setBrushSize(float newSize) {\n float pixelAmount = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,\n newSize, getResources().getDisplayMetrics());\n brushSize = newSize;\n Log.i(LOG_TAG, \"Brush size: \" + newSize + \" pizel Amount:\" + pixelAmount);\n drawPaint = new Paint();\n drawPath.setPaint(drawPaint);\n drawPaint.setColor(paintColor);\n drawPaint.setAntiAlias(true);\n drawPaint.setStrokeWidth(brushSize);\n drawPaint.setStyle(Paint.Style.STROKE);\n drawPaint.setStrokeJoin(Paint.Join.ROUND);\n drawPaint.setStrokeCap(Paint.Cap.ROUND);\n\n }", "void draw(@NonNull Canvas canvas, int w, int h, @NonNull IBitmapFactory bitmapFactory) {\n mScaledWidth = w / mViewportWidth;\n mScaledHeight = h / mViewportHeight;\n // Traverse the tree in pre-order to draw.\n drawGraphicElement(mScaledWidth, mScaledHeight, IDENTITY_MATRIX, mRootGroup, canvas, (float)mRootAlpha / 255, bitmapFactory);\n }", "public void size(final int theWidth, final int theHeight);", "public void setReferenceSize() {\n transformManager.setReferenceSize();\n scaledComponentLayout.saveSwingComponentCoordinates( 1.0 );\n setScale( 1.0 );\n\n // Set the canvas size\n determineCanvasSize();\n\n if ( DEBUG_OUTPUT_ENABLED ) {\n System.out.println( \"ApparatusPanel2.setReferenceBounds: referenceBounds=\" + transformManager.getReferenceBounds() );\n }\n }", "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n mBitmap = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);\n // 8888 means that color is stored suing 8 bits (1 byte) for alpha, red, green, blue\n mCanvas = new Canvas(mBitmap);\n mBitmap.eraseColor(Color.WHITE);\n }", "public void draw() {\n StdDraw.clear();\n StdDraw.setPenColor(StdDraw.BLACK);\n StdDraw.setXscale(-drawLength * 0.1, drawLength * 1.2);\n StdDraw.setYscale(-drawLength * 0.65, drawLength * 0.65);\n StdDraw.line(0, 0, drawLength, 0);\n StdDraw.text(-drawLength * 0.05, 0, \"0\");\n StdDraw.text(drawLength * 1.1, 0, Integer.toString(size()));\n }", "public void scaleAffine(){\n //Get the monitors size.\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n transform = new AffineTransform();\n double width = screenSize.getWidth();\n double height = screenSize.getHeight();\n\n //Set up the scale amount for our Affinetransform\n double xscale = width / model.getBbox().getWidth();\n double yscale = height / model.getBbox().getHeight();\n\n double scale = max(xscale, yscale);\n\n adjustZoomLvl(scale);\n transform.translate(-model.getBbox().getMinX(), -model.getBbox().getMaxY());\n\n bounds = new CanvasBounds(getBounds(), transform);\n adjustZoomFactor();\n }", "private void renderMapGrow(double width, double height, double curZoom) {\n if(curMap != null) { // if it can be obtained, set the width and height using the aspect ratio\n double aspectRatio = curMap.getMap().getWidth()/curMap.getMap().getHeight();\n double scaledW, scaledH;\n // keep the aspect ratio\n scaledH = (1 / ((1 / (width)) * aspectRatio));\n scaledW = ((height)*aspectRatio);\n if(scaledH <= pane.getHeight()) {\n canvas.setHeight(height*curZoom);\n canvas.setWidth(scaledW*curZoom);\n if(curZoom <= 1) { // If we aren't zoomed, translate the image to the center of the screen\n canvas.setTranslateX(((width - scaledW) / 2));\n canvas.setTranslateY(0);\n } else {\n canvas.setTranslateX(0);\n }\n }\n\n if(scaledW <= pane.getWidth()) {\n canvas.setHeight(scaledH*curZoom);\n canvas.setWidth(width*curZoom);\n if(curZoom <= 1) { // If we aren't zoomed, translate the image to the center of the screen\n canvas.setTranslateY(((height - scaledH) / 2));\n canvas.setTranslateX(0);\n } else {\n canvas.setTranslateY(0);\n }\n }\n } else {\n canvas.setHeight(height*curZoom);\n canvas.setWidth(width*curZoom);\n }\n render();\n }", "public void displayScaled(float scaleFactor) {\n pushMatrix();\n scale(scaleFactor);\n shape(fullCar);\n popMatrix();\n }", "public void setSize();", "protected void doResize() {\r\n\t\tif (renderer.surface == null) {\r\n\t\t\tdoNew();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tNewResizeDialog dlg = new NewResizeDialog(labels, false);\r\n\t\tdlg.widthText.setText(\"\" + renderer.surface.width);\r\n\t\tdlg.heightText.setText(\"\" + renderer.surface.height);\r\n\t\tdlg.setLocationRelativeTo(this);\r\n\t\tdlg.setVisible(true);\r\n\t\tif (dlg.success) {\r\n\t\t\trenderer.surface.width = dlg.width;\r\n\t\t\trenderer.surface.height = dlg.height;\r\n\t\t\trenderer.surface.computeRenderingLocations();\r\n\t\t}\r\n\t}", "@Override\n public void draw(Canvas canvas){\n final float scaleFactorX = getWidth()/(WIDTH*1.f);\n final float scaleFactorY = getHeight()/(HEIGHT*1.f);\n if(canvas!=null){\n final int savedState = canvas.save();\n canvas.scale(scaleFactorX, scaleFactorY);\n bg.draw(canvas);\n //below was to draw collis boxes\n // canvas.drawRect(new Rect(10, 10, 200,300 - 15*jumpCounter), myPaint);\n // if(!bananas.isEmpty())\n // canvas.drawRect(bananas.get(0).getRectangle(), myPaint );\n player.draw(canvas);\n for(TallBricks c: cones){\n c.draw(canvas);\n }\n for(Banana b: bananas){\n b.draw(canvas);\n }\n drawText(canvas);\n canvas.restoreToCount(savedState);\n }\n }", "@Override\n\tpublic int[] getImageScaleDrawing() {\n\t\treturn new int[] {\n\t\t\t\t80, 80\n\t\t};\n\t}", "@Override\n public void resize(int width, int height) {\n bgViewPort.update(width, height, true);\n stage.getViewport().update(width, height, true);\n fonts.getFontViewport().update(width, height, true);\n }", "public void setScale(float scale) {\n setLocalScale(scale);\n }", "private void updateDimensions() {\r\n width = gui.getWidth();\r\n height = gui.getHeight();\r\n yLabelsMargin = (int) gui.getLabelWidth(Integer.toString(((int) maximumDB / 10) * 10), true) + 2;\r\n if (track != null)\r\n scaleXpx = ((float) width - yLabelsMargin) / track.getBufferCapacity();\r\n else\r\n scaleXpx = 1;\r\n scaleYpx = (float) ((height - 1) / (maximumDB - minimumDB));\r\n if (scaleYpx == 0)\r\n scaleYpx = 1;\r\n }", "public void setScale(float scale) {\n \t\tthis.scale = scale;\n \t\tupdateTransform();\n \t\tfireEvent(new ScalingEvent(scale));\n \t}", "@Override\n\tpublic void settings() {\n\t\tSystem.out.println(\"settings\");\n\t\tsize(800, 800);\n\t}", "public void setSize(RMSize aSize) { setSize(aSize.width, aSize.height); }", "public void setScale(float scaleXY) {\n internalGroup.setScale(scaleXY);\n dataTrait.scaleX = scaleXY;\n dataTrait.scaleY = scaleXY;\n resetSprite();\n }", "@Override\n\tpublic void render() {\n\t\tthis.w=this.width;\n\t\tthis.h=this.height;\n\t\tif(Gdx.graphics.getWidth()<400){\n\t\t\tthis.w=this.width*1.5f;\n\t\t\tthis.h=this.height*1.5f;\n\t\t}\n\t\telse if(Gdx.graphics.getWidth()>=400 && Gdx.graphics.getWidth()<480){\n\t\t\tthis.w=this.width*1.35f;\n\t\t\tthis.h=this.height*1.35f;\n\t\t}\n\t\telse if(Gdx.graphics.getWidth()>600 && Gdx.graphics.getWidth()<=800){\n\t\t\tthis.w=this.width/1.75f;\n\t\t\tthis.h=this.height/1.75f;\n\t\t}\n\t\telse if(Gdx.graphics.getWidth()>800 && Gdx.graphics.getWidth()<1100){\n\t\t\tthis.w=this.width/2f;\n\t\t\tthis.h=this.height/2f;\n\t\t}\n\t\t\n\t\telse if(Gdx.graphics.getWidth()>1100){\n\t\t\tthis.w=this.width/2.5f;\n\t\t\tthis.h=this.height/2.5f;\n\t\t}\n\t\tif(!isShow)\n\t\t\treturn;\n\t\tif(font != null){\n\t\t\tfont.setScale(w, h);\n//\t\t\tfont.draw(GlobalVars.ge.getScreen().getBatch(), text, x, y);\n//\t\t\tfont.drawMultiLine(GlobalVars.ge.getScreen().getBatch(),text, x, y, this.areaWidth, this.hAlignment);\n\t\t\tfont.drawWrapped(GlobalVars.ge.getScreen().getBatch(),text, x, y, this.areaWidth, this.hAlignment);\n\t\t}\n\t}", "public void setBrushSize(int size)\n {\n brushSize = size;\n }", "public void scale(float scale) {\n if (scale != 1.0f) {\n left = (int) (left * scale + 0.5f);\n top = (int) (top * scale + 0.5f);\n right = (int) (right * scale + 0.5f);\n bottom = (int) (bottom * scale + 0.5f);\n }\n }", "public void setScale( float scale ) {\n\t\tthis.scale = scale;\n\t}", "private void controlResized() {\n disposeBackBuffer();\n initializeBackBuffer();\n\n redraw();\n }", "public void drawCanvas() {\n \n // Change the background color to match the state of the plotter\n if( plotter != null ) {\n int state = plotter.getState();\n switch(state) {\n case 0:\n background(33, 134, 248, 100);\n break;\n case 1:\n background(254, 26, 26, 100);\n break;\n case 2:\n background(28, 247, 12, 100);\n break;\n default:\n background(100);\n }\n } else {\n background(100);\n }\n\n // Draw the canvas rectangle\n translate(SCREEN_PADDING, SCREEN_PADDING);\n scale(screenScale * plotterScale);\n fill(255); \n rect(0, 0, MAX_PLOTTER_X, MAX_PLOTTER_Y);\n \n // Draw the grid\n if(DRAW_GRID) {\n stroke(210);\n int cols = MAX_PLOTTER_X / 100;\n int rows = MAX_PLOTTER_Y / 100;\n \n for(int i=0; i<cols; i++)\n line(i*100, 0, i*100, MAX_PLOTTER_Y);\n \n for(int i=0; i<rows; i++)\n line(0, i*100, MAX_PLOTTER_X, i*100);\n }\n \n // Draw the homing crosshairs\n strokeWeight(1);\n stroke(150);\n line(MAX_PLOTTER_X/2, 0, MAX_PLOTTER_X/2, MAX_PLOTTER_Y);\n line(0, MAX_PLOTTER_Y/2, MAX_PLOTTER_X, MAX_PLOTTER_Y/2);\n\n translate(dx, dy); \n \n // Draw the bounding box of the current shape\n if(DRAW_BOUNDING_BOX) {\n // Bounding box\n RPoint bounds[] = shape.getBoundsPoints();\n strokeWeight(5);\n stroke(255,0,0);\n line( bounds[0].x, bounds[0].y, bounds[1].x, bounds[1].y );\n line( bounds[1].x, bounds[1].y, bounds[2].x, bounds[2].y );\n line( bounds[2].x, bounds[2].y, bounds[3].x, bounds[3].y );\n line( bounds[3].x, bounds[3].y, bounds[0].x, bounds[0].y );\n \n // Center cross hairs\n RPoint center = shape.getCenter();\n line( center.x, bounds[0].y, center.x, bounds[0].y - 200 );\n line( center.x, bounds[3].y, center.x, bounds[3].y + 200 );\n line( bounds[0].x, center.y, bounds[0].x - 200, center.y );\n line( bounds[1].x, center.y, bounds[1].x + 200, center.y );\n }\n \n // Draw the SVG content\n strokeWeight(STROKE_WEIGHT);\n stroke(0);\n drawShape(shape);\n }", "private void setGridSize() {\n int width = Math.max(boardView.windowWidth(), buttonPanel.getWidth());\n\n int height = points.getHeight() + boardView.windowHeight() + buttonPanel.getHeight();\n\n setSize(width, height);\n }" ]
[ "0.70051414", "0.69741446", "0.6921431", "0.66898286", "0.66612613", "0.6659254", "0.6625056", "0.6612062", "0.6602486", "0.65871096", "0.6569375", "0.65415317", "0.65107864", "0.64941543", "0.64807236", "0.6466947", "0.645507", "0.6429574", "0.6412908", "0.6399516", "0.63944495", "0.6373062", "0.6356031", "0.63549167", "0.63529265", "0.6331288", "0.63143057", "0.6292418", "0.6239436", "0.6235415", "0.62091804", "0.61920875", "0.61606824", "0.61492777", "0.61213726", "0.6120894", "0.60868174", "0.60701287", "0.6065977", "0.6051293", "0.6048408", "0.6047878", "0.6045292", "0.60356826", "0.6034188", "0.6023942", "0.6016293", "0.60107446", "0.6009595", "0.5998454", "0.5995338", "0.59928656", "0.5987414", "0.5977636", "0.5971755", "0.59677076", "0.5959993", "0.59546864", "0.5946416", "0.594366", "0.5943548", "0.593593", "0.5923406", "0.5922636", "0.5921946", "0.59212035", "0.5911541", "0.59101164", "0.5889869", "0.58867496", "0.58844626", "0.5871749", "0.58522946", "0.58479285", "0.58471936", "0.5844461", "0.5841201", "0.5839958", "0.5832314", "0.5817527", "0.58064556", "0.5800833", "0.5799513", "0.57916343", "0.57797897", "0.5775491", "0.5773467", "0.57704467", "0.57669324", "0.5748245", "0.5748098", "0.5744119", "0.5743468", "0.5742649", "0.5734273", "0.5731166", "0.5720695", "0.57193446", "0.57053316", "0.5705066", "0.5699099" ]
0.0
-1
GET for Read and List
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String action = request.getParameter("action"); if (action.equalsIgnoreCase("list")) { JSONObject json = new JSONObject(); JSONArray ja = new JSONArray(); for (CrisisType c : dao.getAllCrisisType()) { ja.put(c.toJSON()); } json.put("data", ja); response.getWriter().println(json.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List getAll() throws FileNotFoundException, IOException;", "@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 }", "public List<ModelObject> readAll();", "@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}", "@GetMapping(\"/api/obd\")\n public List<Obd> readAll() {\n return obdRepository.findAll();\n }", "public Result get(Get get) throws IOException;", "List<T> readAll();", "@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}", "@GET(\".\")\n Call<List<Logs>> name();", "@RequestMapping(\n\t\t\tvalue = \"/list/{listId}/items\",\n\t\t\tmethod = RequestMethod.GET,\n\t\t\tproduces = \"application/json\")\n\tpublic List<ItemModel> getItemsForList(\n\t\t\t@RequestParam(name = \"userId\") String readUserId,\n\t\t\t@PathVariable(name = \"listId\") String listId) {\n\n\t\treturn handleGetItemsForListRequest(readUserId, listId);\n\t}", "@GET\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response list() {\n\t\t//System.out.println(\"================================= public Response list()\");\n\t\tIterable<Student> students = this.studentService.findAll();\n\t\tif (students != null) {\n\t\t\tList<StudentModelBasic> sbmList = new ArrayList<>();\n\t\t\tfor (Student s : students) {\n\t\t\t\tsbmList.add(this.studentService.convertToModelBasic(s));\n\t\t\t}\n\t\t\t//System.out.println(students.toString());\n\t\t\treturn Response.ok(sbmList).build();\n\t\t} else {\n\t\t\treturn Response.status(Status.NOT_FOUND).build();\n\t\t}\n\t}", "@RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n public ResponseEntity<?> get() {\n List<ReadTodoDto> todos = repository.findAll()\n .stream()\n .map(dtoConverter::convert)\n .collect(Collectors.toList());\n\n return ResponseEntity.ok(todos);\n }", "@GET\n @Path(\"/\")\n public Response read() {\n\n if (entityDefinition == null) {\n return Response.status(Status.NOT_FOUND).build();\n }\n EntityBody entityBody = entityDefinition.getService().getCustom(entityId);\n if (entityBody == null) {\n return Response.status(Status.NOT_FOUND).build();\n }\n return Response.status(Status.OK).entity(entityBody).build();\n }", "@GET\n\t@Path(\"/\") \n\t@Produces(MediaType.TEXT_HTML) \n\tpublic String readItems() \n\t { \n\t return itemObj.readProjects(); \n\t }", "@GET\r\n public List<DocumentoDTO> obtenerDocumento(){\r\n List<DocumentoEntity> documento= logic.obtenerDocumento(); \r\n return DocumentoDTO.toZooList(documento);\r\n }", "@Override\n\tpublic GetContentResponse listContents() {\n\t\tLOGGER.debug(\"LIST ALL CONTENTS\");\n\t\t\n\t\tClientConfig clientConfig = new ClientConfig();\n\t\t \n\t HttpAuthenticationFeature feature = HttpAuthenticationFeature.basic(env.getProperty(\"liferay.user.id\"), env.getProperty(\"liferay.user.key\"));\n\t clientConfig.register( feature) ;\n\t \n\t clientConfig.register(JacksonFeature.class);\n\t\t\n\t\tClient client = ClientBuilder.newClient(clientConfig);\n\t\tWebTarget webTarget = client.target(env.getProperty(\"liferay.api.rootpath\")).path(\"article-id/0/content-type/tagtest\");\n\t\t \n\t\tInvocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n\t\n\t\tResponse response = invocationBuilder.get();\n\t\t \n\t\tGetContentResponse content = response.readEntity(GetContentResponse.class);\n\t\t\n\t\t\n\t\n\t\t \n\t\tLOGGER.info(\"status::\"+response.getStatus());\n\t\t\n\t\t\n\t\t\n\t\tcontent.setStatusCode(200);\n\t\tcontent.setStatusMessage(\"Content List\");\n\t\n\t\treturn content;\n\t}", "@GetMapping(\"/api/todoItems\")\n\t public ResponseEntity<?> fetchAllTodoItems (){\n\t\t \n\t\t \n\t\t \n\t\t \n\t }", "@RequestMapping(value = \"/items\", method = RequestMethod.GET)\n\tpublic @ResponseBody List<Item> itemListRest() {\n\t\treturn (List<Item>) repository.findAll();\n\t}", "@GET\n @Path(\"{id}\")\n @Produces({ \"application/json\" })\n public abstract Response find(@PathParam(\"id\") Long id);", "List<T> read();", "public static int doGetList(Result r) {\n // Make an HTTP GET passing the name on the URL line\n r.setValue(\"\");\n String response = \"\";\n HttpURLConnection conn;\n int status = 0;\n try {\n \n URL url = new URL(\"https://intense-lake-93564.herokuapp.com/menusection/\");\n conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(\"GET\");\n // tell the server what format we want back\n conn.setRequestProperty(\"Accept\", \"text/plain\");\n // wait for response\n status = conn.getResponseCode();\n // If things went poorly, don't try to read any response, just return.\n if (status != 200) {\n // not using msg\n String msg = conn.getResponseMessage();\n return conn.getResponseCode();\n }\n String output = \"\";\n // things went well so let's read the response\n BufferedReader br = new BufferedReader(new InputStreamReader(\n (conn.getInputStream()))); \n while ((output = br.readLine()) != null) {\n response += output; \n } \n conn.disconnect();\n \n }\n catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } \n // return value from server\n // set the response object\n r.setValue(response);\n // return HTTP status to caller\n return status;\n }", "@GetMapping(value = \"/list\", produces = \"application/json\")\n List<Patient> list();", "@RequestMapping(value = \"/rest/accesss\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<Access> getAll() {\n log.debug(\"REST request to get all Accesss\");\n return accessRepository.findAll();\n }", "@RequestMapping(value=\"/list\",method=RequestMethod.GET)\n\tpublic @ResponseBody\n\tList<Book> getBookList(){\n\t\tList<Book> bookList = null;\n\t\ttry{\n\t\t\tbookList = bookService.getBookList();\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"bookList returned\");\n\t\tSystem.out.println(bookList);\n\t\treturn bookList;\n\t}", "@Override\r\n\tpublic String list() {\n\t\tList<HeadLine> dataList=new ArrayList<HeadLine>();\r\n\t\tPagerItem pagerItem=new PagerItem();\r\n\t\tpagerItem.parsePageSize(pageSize);\r\n\t\tpagerItem.parsePageNum(pageNum);\r\n\t\t\r\n\t\tLong count=headLineService.count();\r\n\t\tpagerItem.changeRowCount(count);\r\n\t\t\r\n\t\tdataList=headLineService.pager(pagerItem.getPageNum(), pagerItem.getPageSize());\r\n\t\tpagerItem.changeUrl(SysFun.generalUrl(requestURI, queryString));\r\n\t\t\r\n\t\trequest.put(\"DataList\", dataList);\r\n\t\trequest.put(\"pagerItem\", pagerItem);\r\n\t\t\r\n\t\t\r\n\t\treturn \"list\";\r\n\t}", "@NonNull\n public String getAction() {\n return \"GET\";\n }", "@Override\n public final void doGet() {\n try {\n checkPermissions(getRequest());\n // GET one\n if (id != null) {\n output(api.runGet(id, getParameterAsList(PARAMETER_DEPLOY), getParameterAsList(PARAMETER_COUNTER)));\n } else if (countParameters() == 0) {\n throw new APIMissingIdException(getRequestURL());\n }\n // Search\n else {\n\n final ItemSearchResult<?> result = api.runSearch(Integer.parseInt(getParameter(PARAMETER_PAGE, \"0\")),\n Integer.parseInt(getParameter(PARAMETER_LIMIT, \"10\")), getParameter(PARAMETER_SEARCH),\n getParameter(PARAMETER_ORDER), parseFilters(getParameterAsList(PARAMETER_FILTER)),\n getParameterAsList(PARAMETER_DEPLOY), getParameterAsList(PARAMETER_COUNTER));\n\n head(\"Content-Range\", result.getPage() + \"-\" + result.getLength() + \"/\" + result.getTotal());\n\n output(result.getResults());\n }\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n }\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString action = req.getParameter(\"action\");\r\n\t\t\r\n\t\tif(action == null) {\r\n\t\t\taction = \"List\";\r\n\t\t}\r\n\t\t\r\n\t\tswitch(action) {\r\n\t\t\tcase \"List\":\r\n\t\t\t\tlistUser(req, resp);\r\n\t\t\t\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tlistUser(req, resp);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@RequestMapping( value = \"/{id}/student\", method = RequestMethod.GET )\n public Set<StudentDTO> readStudents(@PathVariable(value=\"id\") long id){\n return classService.read(id).getStudents();\n }", "@RequestMapping(method = RequestMethod.GET)\r\n\t@ResponseBody\r\n\t@Transactional(readOnly = true)\r\n\tpublic Collection<Model> list() {\r\n\t\treturn getService().list();\r\n\t}", "public abstract List get(List oids) throws OIDDoesNotExistException;", "public void doGet( )\n {\n \n }", "@RequestMapping(method = RequestMethod.GET)\n String read(Model model){\n Date now = new Date();\n List<Program> programList = programTableService.readOneDayByNow(now.getTime());\n model.addAttribute(\"programList\", programList);\n return \"programs/list\";\n }", "@GetAction(\"/list\")\n public void list(String q) {\n Iterable<Account> accounts = accountDao.findAll();\n render(accounts);\n }", "@GetMapping(\"/list/{listId}\")\n public List<TodoItem> getItem(@PathVariable UUID listId) {\n return itemService.getAllTodoItemsForListId(listId);\n }", "@RequestMapping(value=\"/show\",method = RequestMethod.GET)\n\n public List<Student> show_data() \n {\n return srt.findAll();\n }", "@Path(\"/node\")\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n public Response nodeRead() {\n HashMap<String, String> schema = new HashMap<>();\n schema.put(\"key_url\",\"string\");\n schema.put(\"num_inlinks\", \"int\");\n schema.put(\"num_outlinks\",\"int\");\n schema.put(\"inlink_score\",\"float\"); \n schema.put(\"outlink_score\",\"float\"); \n schema.put(\"metadata\",\"string\");\n return Response.ok(schema).type(MediaType.APPLICATION_JSON).build();\n }", "@RequestMapping(method = RequestMethod.GET)\n public final Iterable<Entry> list() {\n Iterable<Entry> result = SecurityUtils.actualUser().getEntries();\n if (result == null) {\n result = Collections.emptyList();\n }\n return result;\n }", "@GET(\"posts/\")\n Call<List<Post>>getPosts();", "public List<R> getAll();", "org.naru.park.ParkController.CommonAction getGetLatestReading();", "@Override\n\tpublic String list() throws Exception {\n\t\treturn null;\n\t}", "@Override\n\tpublic String list() throws Exception {\n\t\treturn null;\n\t}", "private void handleListOperation() {\n\n Client client = ClientBuilder.newBuilder().build();\n WebTarget webTarget = client.target(\"http://localhost:8080/pa165/rest/bricks/\");\n webTarget.register(auth);\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n Response response = invocationBuilder.get();\n\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n List<BrickDto> brickDtoList = response.readEntity(new GenericType<List<BrickDto>>() {\n });\n System.out.println(\"Number of bricks returned: \" + brickDtoList.size());\n\n for (BrickDto b : brickDtoList) {\n System.out.println(b);\n }\n } else {\n System.out.println(\"Error code:\" + response.getStatus());\n }\n }", "public static String getAll() {\n Result r = new Result();\n int status = 0;\n if((status = doGetList(r)) != 200) return \"Error from server \"+ status;\n return r.getValue();\n }", "@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}", "@GET\n\t@Path(\"/helloJSONList\")\n\t/**\n\t * Here is an example of a simple REST get request that returns a String.\n\t * We also illustrate here how we can convert Java objects to JSON strings.\n\t * @return - List of words as JSON\n\t * @throws IOException\n\t */\n\tpublic String helloJSONList() throws IOException {\n\n\t\tList<String> listOfWords = new ArrayList<String>();\n\t\tlistOfWords.add(\"Hello\");\n\t\tlistOfWords.add(\"World!\");\n\n\t\t// We can turn arbatory Java objects directly into JSON strings using\n\t\t// Jackson seralization, assuming that the Java objects are not too complex.\n\t\tString listAsJSONString = oWriter.writeValueAsString(listOfWords);\n\n\t\treturn listAsJSONString;\n\t}", "List<T> readList();", "@Override\n public DataObjectResponse<T> handleGET(DataObjectRequest<T> request)\n {\n if(getRequestValidator() != null) getRequestValidator().validateGET(request);\n\n DefaultDataObjectResponse<T> response = new DefaultDataObjectResponse<>();\n try\n {\n VisibilityFilter<T, DataObjectRequest<T>> visibilityFilter = visibilityFilterMap.get(VisibilityMethod.GET);\n List<Query> queryList = new LinkedList<>();\n if(request.getQueries() != null)\n queryList.addAll(request.getQueries());\n\n if(request.getId() != null)\n {\n // if the id is specified\n queryList.add(new ById(request.getId()));\n }\n\n DataObjectFeed<T> feed = objectPersister.retrieve(queryList);\n if(feed == null)\n feed = new DataObjectFeed<>();\n List<T> filteredObjects = visibilityFilter.filterByVisible(request, feed.getAll());\n response.setCount(feed.getCount());\n response.addAll(filteredObjects);\n }\n catch(PersistenceException e)\n {\n ObjectNotFoundException objectNotFoundException = new ObjectNotFoundException(String.format(OBJECT_NOT_FOUND_EXCEPTION, request.getId()), e);\n response.setErrorResponse(ErrorResponseFactory.objectNotFound(objectNotFoundException, request.getCID()));\n }\n return response;\n }", "public EntityType2 get() throws ClientException {\n return send(HttpMethod.GET, null);\n }", "@GET(Service.PATH_GET_LIST_SECTION)\n Call<ApiFilterObject> getSection();", "@Override\r\npublic List<Map<String, Object>> readAll() {\n\treturn detalle_pedidoDao.realAll();\r\n}", "@RequestMapping(value=\"/getbooks\", method=RequestMethod.GET, produces = \"application/json\")\n\tpublic List<Book> getAll() {\n\t\tList<Book> books = new ArrayList<>();\n\t\tbooks = bookDao.getAllFromDB();\n\t\t\n\t\treturn books;\n\t}", "List<String> getList(String id);", "@RequestMapping(value = \"/getLearningList\")\r\n\t public String readingList(){\r\n\t return \"Spring in Action (Manning), Cloud Native Java (O'Reilly), Learning Spring Boot (Packt)\";\r\n\t }", "@RequestMapping(value = \"/retrieve\", method = RequestMethod.POST)\n\t@ResponseBody\n\tString retrieveItems(HttpServletRequest request, HttpServletResponse response) {\n\n\t\t//Get the Logged in User\n\t\tString name = getLoggedUser();\n\n\t\tRetrieveItems ri = new RetrieveItems(env);\n\t\tString type = request.getParameter(\"type\");\n\n\t\t//Pass back all data from the database\n\t\tString xml=\"\";\n\n\t\tif (type.equals(\"active\")) {\n\t\t\txml = ri.getItemsDataSQL(name);\n\t\t\treturn xml;\n\t\t} else {\n\t\t\txml = ri.getArchiveData(name);\n\t\t\treturn xml;\n\t\t}\n\t}", "@Override\n\tpublic String getType() {\n\t\treturn Global.GET;\n\t}", "Object getAll(WebRequest webRequest, HttpServletResponse response, Model model) throws Exception;", "@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 List getList();", "@RequestLine(\"GET /accounts\")\n AccountList getAccountsListOfUser();", "public DResult get(Get get, long startId) throws IOException;", "public Result get(Get get, Integer lockId) throws IOException;", "@GetMapping(\"/list\")\n\tpublic ModelAndView list() {\n\t\t\n\t\tLOGGER.info(\"Ingreso al metodo list\");\n\t\tModelAndView mav =new ModelAndView(Constant.COURSE_VIEW_COURSE);\n\t\tmav.addObject(\"listCourse\", courseService.getAll());\n\t\tmav.addObject(\"course\", new CourseDto());\n\n\t\treturn mav;\n\t\n\t\n\t}", "@RequestMapping(value=\"/treenit\", method = RequestMethod.GET)\n\tpublic @ResponseBody List<Treeni> treeniListaRest() {\t\n\t return (List<Treeni>) repository.findAll();\n\t}", "@Override\r\n\tpublic CookVO listOne(int cno) throws Exception {\n\t\treturn session.selectOne(\"com.mapper.cook.read\", cno);\r\n\t}", "@GET\n @StatusCodes ({\n @ResponseCode ( code = 200, condition = \"Upon a successful read.\"),\n @ResponseCode( code = 204, condition = \"Upon a successful query with no results.\"),\n @ResponseCode( code = 404, condition = \"The specified entity has been moved, deleted, or otherwise not found.\")\n })\n Response get();", "@VTID(38)\n boolean getList();", "public String listar() {\n DocumentoVinculadoDAO documentoVinculadoDAO = new DocumentoVinculadoDAO();\n lista = documentoVinculadoDAO.listarStatus(1);\n return \"listar\";\n\n }", "@GET(\"rest/emprego\")\n Call<List<Posto>> callListPostoSINE();", "List<T> getAll();", "List<T> getAll();", "List<T> getAll();", "List<T> getAll();", "List<T> getAll();", "@GET(\"aktivitas/{id}\")\n Call<List<AktifitasModel>>\n getById(@Path(\"id\") String id);", "@GET\n @Path(\"itemlist\")\n @Produces(MediaType.TEXT_PLAIN)\n public String getItemList(@QueryParam(\"jsonpcallback\") String jsonpcallback) {\n return jsonpcallback + \"(\" + is.getAllItems().toJSONString() + \")\";\n }", "@RequestMapping(method=RequestMethod.GET, value = \"/item\", produces = \"application/json\")\n public List<Item> getItems()\n {\n return this.itemRepository.getItems();\n }", "public List<ReadBookVO> getReadBookList() {\n\t\t\n\t\tList<ReadBookVO> readBookList = readBookDao.selectAll();\n\t\t\n\t\t\n\t\treturn readBookList;\n\t}", "@Override\n\t\t\tpublic Object handle(Request req, Response res) {\n\t\t\t\tfinal String op = req.params(\":op\");\n\t\t\t\tfinal String path = req.queryParams(\"path\");\n\t\t\t\t//--- list will list down all available results for a course ---//\n\t\t\t\tif (op.equals(\"list\")) return Results.list(path);\n\t\t\t\t//--- get will display one single result ---//\n\t\t\t\telse if (op.equals(\"get\")) return Results.get(path);\n\t\t\t\telse return null;\n\t\t\t}", "@Override\n\t\t\tpublic Object handle(Request req, Response res) {\n\t\t\t\tfinal String op = req.params(\":op\");\n\t\t\t\tfinal String path = req.queryParams(\"path\");\n\t\t\t\t//--- list will list down all available results for a course ---//\n\t\t\t\tif (op.equals(\"list\")) return Results.list(path);\n\t\t\t\t//--- get will display one single result ---//\n\t\t\t\telse if (op.equals(\"get\")) return Results.get(path);\n\t\t\t\telse return null;\n\t\t\t}", "@RequestMapping(value = \"/details\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<Detail> getAllDetails() {\n log.debug(\"REST request to get all Details\");\n List<Detail> details = detailRepository.findAll();\n return details;\n }", "@GetMapping(\"/listAll\")\n List<WebformMetabaseVO> getListWebforms();", "@GetMapping(value=\"/getAll\")\n\tpublic List<Question> getAll(){\n\t\tLOGGER.info(\"Viewing all questions\");\n\t\treturn questionObj.viewAllQuestions();\n\t}", "public UserList list();", "@RequestLine(\"GET /show\")\n List<Bucket> getAllEmployeesList();", "public void doGet(HttpServletRequest request, HttpServletResponse response) {\n\t\tList<Singer> singers = new ArrayList<>();\n\t\tsingers = serviceSinger.listar();\n\t\ttry {\n\t\t\tPrintWriter out = response.getWriter();\n\t\t\tfor(Singer singer : singers) {\n\t\t\t\tout.println(singer.getId() + \" || \" + singer.getFirst_name() + \" || \" \n\t\t\t\t\t\t+ singer.getLast_name() + \" || \" + singer.getBirth_date());\n\t\t\t}\n\t\t\tout.close();\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@GET\n @Produces(\"application/hal+json\")\n public Response list(@PathParam(\"regNo\") String regNo, @PathParam(\"accountNo\") String accountNo) {\n Optional<Account> account = admin.findAccount(regNo, accountNo);\n if (account.isPresent()) {\n CacheControl cc = new CacheControl();\n cc.setMaxAge(10);\n return Response.ok(entityBuilder.buildTransactionsJson(account.get(), uriInfo)).cacheControl(cc).build();\n } else {\n return Response.status(Response.Status.NOT_FOUND).build();\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}", "public <T extends Base> List<T> list(Class<T> T) throws IOException,\n\t\t\tClassNotFoundException {\n\t\treturn Core.list(T, getHttpMethodExecutor());\n\t}", "@GET\n @Path(\"/ListCaracteristique\")\n public Response ListCaracteristique() {\n return Response\n\t\t .status(200)\n .header(\"Access-Control-Allow-Origin\", \"*\")\n .header(\"Access-Control-Allow-Headers\", \"origin, content-Type, accept, authorization\")\n .header(\"Access-Control-Allow-Credentials\", \"true\")\n\t\t .header(\"Access-Control-Allow-Methods\", \"GET, POST, PUT, DELETE, OPTIONS, HEAD\")\n\t\t .header(\"Access-Control-Max-Age\", \"1209600\")\n\t\t .entity(caractdao.getAll())\n\t\t .build();\n }", "@GET(Url.END_POINT)\n Call<ArrayList<Recipe>> getRecipes();", "@Override\r\n\tpublic void adminSelectRead() {\n\t\t\r\n\t}", "@GetMapping(\"/person\")\n\tpublic List<Person> get(){\n\t\treturn personService.get();\n\t}", "@Override\n\tpublic ActionForward list(HttpServletRequest request, HttpServletResponse response) {\n\t\treturn null;\n\t}", "@Override\n\tpublic ActionForward list(HttpServletRequest request, HttpServletResponse response) {\n\t\treturn null;\n\t}", "@GetMapping(value = \"/listTest\")\n public List<Test> listTest() {\n return testService.findAll();\n }", "public List<T> showAllClients();", "@GET\n @Path(\"list\")\n public String ScoresList() {\n System.out.println(\"Invoked Scores.ScoresList()\"); //Displays in console log\n JSONArray response = new JSONArray(); //Creates a new JSONArray containing response\n try {\n PreparedStatement ps = Main.db.prepareStatement(\"SELECT Users.Username, Scores.Score FROM Scores JOIN Users ON Scores.UserID=Users.UserID ORDER BY Score DESC\");\n //Prepared statement selecting username and corresponding score using a join between the Scores and Users table.\n ResultSet results = ps.executeQuery();\n while (results.next() == true) {\n JSONObject row = new JSONObject();\n row.put(\"Username\", results.getString(1));\n row.put(\"Score\", results.getInt(2));\n response.add(row);\n }\n //Adds a new object for each user and corresponding score until the end of the results array.\n return response.toString(); //Returns the response as a string.\n } catch (Exception exception) {\n System.out.println(\"Database error: \" + exception.getMessage());\n return \"{\\\"Error\\\": \\\"Unable to list items. Error code xx.\\\"}\"; // Error Message.\n }\n }", "@GET\n\t@Path(\"/\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic List<Tela> getTelas(){\n\t\treturn new TelaDAO().readAllTelas();\n\t}" ]
[ "0.64950305", "0.6455084", "0.63914305", "0.63764226", "0.621033", "0.6184802", "0.6183687", "0.61520886", "0.61319834", "0.61222994", "0.6117875", "0.6104332", "0.6066398", "0.6064593", "0.6063577", "0.6053062", "0.6037641", "0.60325235", "0.6027127", "0.60191894", "0.6013022", "0.6007179", "0.59980404", "0.59754014", "0.59428877", "0.5938161", "0.59343135", "0.59162694", "0.591498", "0.58934903", "0.5871834", "0.5866887", "0.5866807", "0.5858043", "0.58331615", "0.5803389", "0.57888174", "0.5780012", "0.5773161", "0.5766742", "0.5763421", "0.5758207", "0.5758207", "0.5753618", "0.57505107", "0.57353497", "0.5729168", "0.57261074", "0.5718469", "0.57165325", "0.57164013", "0.5709685", "0.569927", "0.5693791", "0.56851697", "0.5683999", "0.568389", "0.5675088", "0.56646967", "0.56557864", "0.56549954", "0.56528", "0.56521267", "0.5649119", "0.5648839", "0.56484216", "0.5636854", "0.5628369", "0.56282824", "0.5624934", "0.56224287", "0.56224287", "0.56224287", "0.56224287", "0.56224287", "0.56193227", "0.5618092", "0.56147903", "0.5614097", "0.560553", "0.560553", "0.56036323", "0.56001186", "0.5600032", "0.55937", "0.5593031", "0.5580227", "0.557793", "0.5577624", "0.5571467", "0.55712306", "0.557106", "0.5564392", "0.5560315", "0.55566156", "0.55566156", "0.55564225", "0.55559826", "0.55548865", "0.55537707" ]
0.56154186
77
Creates new form A4Q9
public A4Q9() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "FORM createFORM();", "public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }", "public static Result startNewForm() {\r\n\t\tString formName = ChangeOrderForm.NAME;\r\n\t\tDecision firstDecision = CMSGuidedFormFill.startNewForm(formName,\r\n\t\t\t\tCMSSession.getEmployeeName(), CMSSession.getEmployeeId());\r\n\t\treturn ok(backdrop.render(firstDecision));\r\n\t}", "@Override\n\tpublic void createForm(ERForm form) {\n\t\t\tString sql = \"insert into project1.reimbursementInfo (userName, fullName, thedate, eventstartdate, thelocation, description, thecost, gradingformat, passingpercentage, eventtype, filename,status,reason) values (?,?,?,?,?,?,?,?,?,?,?,?,?);\";\n\t\t\ttry {PreparedStatement stmt = conn.prepareCall(sql);\n\t\t\t//RID should auto increment, so this isnt necessary\n\t\t\t\n\t\t\tstmt.setString(1, form.getUserName());\n\t\t\tstmt.setString(2, form.getFullName());\n\t\t\tstmt.setDate(3, Date.valueOf(form.getTheDate()));\n\t\t\tstmt.setDate(4, Date.valueOf(form.getEventStartDate()));\n\t\t\tstmt.setString(5, form.getTheLocation());\n\t\t\tstmt.setString(6, form.getDescription());\n\t\t\tstmt.setDouble(7, form.getTheCost());\n\t\t\tstmt.setString(8, form.getGradingFormat());\n\t\t\tstmt.setString(9, form.getPassingPercentage());\n\t\t\tstmt.setString(10, form.getEventType());\n\t\t\tstmt.setString(11, form.getFileName());\n\t\t\tstmt.setString(12, \"pending\");\n\t\t\tstmt.setString(13, \"\");\n\t\t\tstmt.executeUpdate();\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static AssessmentCreationForm openFillCreationForm(Assessment assm) {\n openCreationSearchForm(Roles.STAFF, WingsTopMenu.WingsStaffMenuItem.P_ASSESSMENTS, Popup.Create);\n\n Logger.getInstance().info(\"Fill out the required fields with valid data\");\n AssessmentCreationForm creationForm = new AssessmentCreationForm();\n creationForm.fillAssessmentInformation(new User(Roles.STAFF), assm);\n\n return new AssessmentCreationForm();\n }", "@Override\n\tpublic void onFormCreate(AbstractForm arg0, DataMsgBus arg1) {\n\t}", "public Form(){\n\t\ttypeOfLicenseApp = new TypeOfLicencsApplication();\n\t\toccupationalTrainingList = new ArrayList<OccupationalTraining>();\n\t\taffiadavit = new Affidavit();\n\t\tapplicationForReciprocity = new ApplicationForReciprocity();\n\t\teducationBackground = new EducationBackground();\n\t\toccupationalLicenses = new OccupationalLicenses();\n\t\tofficeUseOnlyInfo = new OfficeUseOnlyInfo();\n\t}", "public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}", "private void fillCreateOrEditForm(String name, int branchId) {\n waitForElementVisibility(xpathFormHeading);\n String actual = assertAndGetAttributeValue(xpathFormHeading, \"innerText\");\n assertEquals(actual, FORM_HEADING,\n \"Actual heading '\" + actual + \"' should be same as expected heading '\" + FORM_HEADING\n + \"'.\");\n logger.info(\"# User is on '\" + actual + \"' form\");\n assertAndType(xpathNameTF, name);\n logger.info(\"# Entered staff name: \" + name);\n selectByValue(xpathSelectBranch, \"number:\" + branchId);\n logger.info(\"# Select branch id: \" + branchId);\n }", "Paper addNewPaper(PaperForm form, Long courseId)throws Exception;", "public static void create(Formulario form){\n daoFormulario.create(form);\n }", "public String createQuiz() {\n quiz = quizEJB.createQuiz(quiz);\n quizList = quizEJB.listQuiz();\n FacesContext.getCurrentInstance().addMessage(\"successForm:successInput\", new FacesMessage(FacesMessage.SEVERITY_INFO, \"Success\", \"New record added successfully\"));\n return \"quiz-list.xhtml\";\n }", "@Override\n\tprotected Fragment createFragment() {\n\t\treturn new FormFragment();\n\t}", "public static FormV1 createEntity() {\n FormV1 formV1 = new FormV1()\n .customerId(DEFAULT_CUSTOMER_ID)\n .formType(DEFAULT_FORM_TYPE);\n return formV1;\n }", "public static AddNewScheduleDialog createInstance(int quantity){\n AddNewScheduleDialog frag = new AddNewScheduleDialog();\n frag.quantity = quantity;\n return frag;\n }", "public frm_tutor_subida_prueba() {\n }", "private void fillCreateOrEditForm(String name, String branch) {\n waitForElementVisibility(xpathFormHeading);\n String actual = assertAndGetAttributeValue(xpathFormHeading, \"innerText\");\n assertEquals(actual, FORM_HEADING,\n \"Actual heading '\" + actual + \"' should be same as expected heading '\" + FORM_HEADING\n + \"'.\");\n logger.info(\"# User is on '\" + actual + \"' form\");\n assertAndType(xpathNameTF, name);\n logger.info(\"# Entered staff name: \" + name);\n selectByVisibleText(xpathSelectBranch, branch);\n logger.info(\"# Select branch name: \" + branch);\n }", "@Test\n public void newTeacher() {\n driver.get(\"http://localhost:3000/teacher\");\n log.info(() -> \"Successfully enter the localhost:3000/teacher for adding a new teacher. time: \" + LocalDateTime.now());\n\n //Button for opening teacher form\n WebElement buttonPlus = driver.findElement(By.xpath(\"/html/body/div/div/main/div[2]/button\"));\n buttonPlus.click();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n TeacherForm teacherForm = new TeacherForm(driver);\n Assertions.assertTrue(teacherForm.isInitialized());\n log.info(() -> \"Teacher form is initialized! time: \" + LocalDateTime.now());\n //I found save button with xpath\n teacherForm.setSaveButton(\"/html/body/div/div/main/div[2]/div[2]/form/div[4]/button[1]\");\n teacherForm.newTeacher(\"Mirko\",\"Vukovic\", \"[email protected]\");\n\n ReceiptPage newTeacherForm = teacherForm.submitSave();\n log.info(() -> \"Submit new teacher was successfully! time: \" + LocalDateTime.now());\n Assertions.assertTrue(newTeacherForm.isInitialized());\n }", "public quanlixe_form() {\n initComponents();\n }", "public BtxDetailsKcFormDefinition() {\n super();\n }", "@Override\n public boolean createApprisialForm(ApprisialFormBean apprisial) {\n apprisial.setGendate(C_Util_Date.generateDate());\n return in_apprisialformdao.createApprisialForm(apprisial);\n }", "public FormInserir() {\n initComponents();\n }", "@RequestMapping(value = \"/new\", method = RequestMethod.POST)\n public Object newAuctionx(@ModelAttribute @Valid AuctionForm form, BindingResult result) throws SQLException {\n if(result.hasErrors()) {\n StringBuilder message = new StringBuilder();\n for(FieldError error: result.getFieldErrors()) {\n message.append(error.getField()).append(\" - \").append(error.getRejectedValue()).append(\"\\n\");\n }\n ModelAndView modelAndView = (ModelAndView)newAuction();\n modelAndView.addObject(\"message\", message);\n modelAndView.addObject(\"form\", form);\n return modelAndView;\n }\n String username = SecurityContextHolder.getContext().getAuthentication().getName();\n UserAuthentication userAuth = UserAuthentication.select(UserAuthentication.class, \"SELECT * FROM user_authentication WHERE username=#1#\", username);\n AuctionWrapper wrapper = new AuctionWrapper();\n wrapper.setDemandResourceId(form.getDemandedResourceId());\n wrapper.setDemandAmount(form.getDemandedAmount());\n wrapper.setOfferResourceId(form.getOfferedResourceId());\n wrapper.setOfferAmount(form.getOfferedAmount());\n wrapper.setSellerId(userAuth.getPlayerId());\n auctionRestTemplate.post(auctionURL + \"/new\", wrapper, String.class);\n return new RedirectView(\"/player/trading\");\n }", "public void clickCreate() {\n\t\tbtnCreate.click();\n\t}", "public static Result getFilledForm() {\r\n\t\tStatus result;\r\n\t\ttry {\r\n\t\t\tString formName = ChangeOrderForm.NAME;\r\n\t\t\tString username = CMSSession.getEmployeeName();\r\n\t\t\tFile pdf = File.createTempFile(\"Change_Order_Form_Filled\", \".pdf\");\r\n\t\t\tCMSGuidedFormFill.fillForm(formName, username, pdf);\r\n\r\n\t\t\tresult = ok(pdf, true);\r\n\r\n\t\t\tFileDeletionHandler.deleteFile(pdf);\r\n\t\t} catch (IOException e) {\r\n\t\t\tLogger.error(\"Couldn't create new temp file.\");\r\n\t\t\tLogger.error(e.getMessage(), e);\r\n\t\t\tresult = internalServerError();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public Form getCreationForm() throws ProcessManagerException {\r\n try {\r\n Action creation = processModel.getCreateAction();\r\n return processModel.getPublicationForm(creation.getName(), currentRole,\r\n getLanguage());\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.ERR_NO_CREATION_FORM\", e);\r\n }\r\n }", "private void creatingNewQuestion() {\r\n AbstractStatement<?> s;\r\n ListQuestions lq = new ListQuestions(ThemesController.getThemeSelected());\r\n switch ((String) typeQuestion.getValue()) {\r\n case \"TrueFalse\":\r\n // just to be sure the answer corresponds to the json file\r\n Boolean answer = CorrectAnswer.getText().equalsIgnoreCase(\"true\");\r\n s = new TrueFalse<>(Text.getText(), answer);\r\n break;\r\n\r\n case \"MCQ\":\r\n s = new MCQ<>(Text.getText(), TextAnswer1.getText(), TextAnswer2.getText(), TextAnswer3.getText(), CorrectAnswer.getText());\r\n break;\r\n\r\n default:\r\n s = new ShortAnswer<>(Text.getText(), CorrectAnswer.getText());\r\n break;\r\n }\r\n lq.addQuestion(new Question(s, ThemesController.getThemeSelected(), Difficulty.fromInteger((Integer) difficulty.getValue()) ));\r\n lq.writeJson(ThemesController.getThemeSelected());\r\n }", "public Element addForm(int screenId, int itemCount, FormProportion proportion, String title, String url) {\r\n\t\tElement form = mDocument.createElement(\"IppForm\");\r\n\t\tform.setAttribute(\"ItemCount\", String.valueOf(itemCount));\r\n\t\tform.setAttribute(\"Proportion\", proportion.getValue());\r\n\t\tmScreens.get(screenId).appendChild(form);\r\n\r\n\t\taddTextNode(form, \"Title\", title);\r\n\r\n\t\taddTextNode(form, \"Url\", url);\r\n\r\n\t\treturn form;\r\n\t}", "public static void insertForm(Form form) {\n\t\t\n\t\ttry {\n\t\t\tConnection connection = getConnection();\n\t\t\ttry {\n\t\t\t\tPreparedStatement statement = connection.prepareStatement(\"INSERT INTO form (form_version, form_name, field_id, field_value) \"\n\t\t\t\t\t\t+ \"VALUES ('\"+form.getTheVersion()+\"','\"+form.getTheName()+\"', '\"+form.getTheFieldId()+\"', '\"+form.getTheFieldValue()+\"')\");\n\t\t\t\t\n\t\t\t\tstatement.executeUpdate();\n\n statement.close();\n connection.close();\n\t\t\t\t\n\t\t\t}catch(SQLException ex) {\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}catch (Exception e) {\n e.printStackTrace();\n }\n\t\t\n\t}", "public frmNewArtist() {\n initComponents();\n lblID.setText(Controller.Agent.ManageController.getNewArtistID());\n lblGreeting.setText(\"Dear \"+iMuzaMusic.getLoggedUser().getFirstName()+\", please use the form below to add an artist to your ranks.\");\n \n }", "@Override\r\n protected void createDbContentCreateEdit() {\n DbContentCreateEdit dbContentCreateEdit = new DbContentCreateEdit();\r\n dbContentCreateEdit.init(null);\r\n form.getModelObject().setDbContentCreateEdit(dbContentCreateEdit);\r\n dbContentCreateEdit.setParent(form.getModelObject());\r\n ruServiceHelper.updateDbEntity(form.getModelObject()); \r\n }", "static public ApplicationFormItem createNew(int id, String shortname, boolean required, ApplicationFormItemType type,\n\t\t\t\t\t\t\t\t\t\t\t\tString federationAttribute, String perunSourceAttribute, String perunDestinationAttribute, String regex,\n\t\t\t\t\t\t\t\t\t\t\t\tList<Application.ApplicationType> applicationTypes, Integer ordnum, boolean forDelete)\t{\n\t\tApplicationFormItem afi = new JSONObject().getJavaScriptObject().cast();\n\t\tafi.setId(id);\n\t\tafi.setShortname(shortname);\n\t\tafi.setRequired(required);\n\t\tafi.setType(type);\n\t\tafi.setFederationAttribute(federationAttribute);\n\t\tafi.setPerunSourceAttribute(perunSourceAttribute);\n\t\tafi.setPerunDestinationAttribute(perunDestinationAttribute);\n\t\tafi.setRegex(regex);\n\t\tafi.setApplicationTypes(applicationTypes);\n\t\tafi.setOrdnum(ordnum);\n\t\tafi.setForDelete(forDelete);\n\t\treturn afi;}", "private void loadForm() {\n CodingProxy icd9 = problem.getIcd9Code();\n \n if (icd9 != null) {\n txtICD.setText(icd9.getProxiedObject().getCode());\n }\n \n String narr = problem.getProviderNarrative();\n \n if (narr == null) {\n narr = icd9 == null ? \"\" : icd9.getProxiedObject().getDisplay();\n }\n \n String probId = problem.getNumberCode();\n \n if (probId == null || probId.isEmpty()) {\n probId = getBroker().callRPC(\"BGOPROB NEXTID\", PatientContext.getActivePatient().getIdElement().getIdPart());\n }\n \n String pcs[] = probId.split(\"\\\\-\", 2);\n lblPrefix.setValue(pcs[0] + \" - \");\n txtID.setValue(pcs.length < 2 ? \"\" : pcs[1]);\n txtNarrative.setText(narr);\n datOnset.setValue(problem.getOnsetDate());\n \n if (\"P\".equals(problem.getProblemClass())) {\n radPersonal.setSelected(true);\n } else if (\"F\".equals(problem.getProblemClass())) {\n radFamily.setSelected(true);\n } else if (\"I\".equals(problem.getStatus())) {\n radInactive.setSelected(true);\n } else {\n radActive.setSelected(true);\n }\n \n int priority = NumberUtils.toInt(problem.getPriority());\n cboPriority.setSelectedIndex(priority < 0 || priority > 5 ? 0 : priority);\n loadNotes();\n }", "@Override\n\tpublic void create(CreateCoinForm form) throws Exception {\n\t}", "public CreateTremaDbDialogForm(AnActionEvent event) {\n this.event = event;\n this.windowTitle = \"New Trema XML database file\";\n init();\n }", "private void generateScreen(String form,String text) throws IOException {\r\n \r\n MainScreenController.formName = text;\r\n Stage stage = new Stage();\r\n Parent root = FXMLLoader.load(getClass().getResource(form));\r\n stage.setScene(new Scene(root));\r\n stage.initModality(Modality.APPLICATION_MODAL);\r\n stage.initOwner(partAddBtn.getScene().getWindow());\r\n stage.showAndWait();\r\n \r\n }", "private void submitForm(){\n String toast_message;\n\n int time = getValueOfField(R.id.at_editTextNumberSigned_timeValue);\n int easyNumber = getValueOfField(R.id.at_editTextNumberSigned_levelEasyValue);\n int mediumNumber = getValueOfField(R.id.at_editTextNumberSigned_levelMiddleValue);\n int highNumber = getValueOfField(R.id.at_editTextNumberSigned_levelHighValue);\n int hardcoreNumber = getValueOfField(R.id.at_editTextNumberSigned_levelExpertValue);\n\n // if time is between 0 and 1440 min\n if (time > 0){\n if(time < 24*60){\n // if numbers are positives\n if (easyNumber >= 0 && mediumNumber >= 0 && highNumber >= 0 && hardcoreNumber >= 0){\n\n // save data\n int id = this.controller.getLastIdTraining() + 1;\n\n ArrayList<Level> listLevel = new ArrayList<>();\n listLevel.add(new Level(\"EASY\", easyNumber));\n listLevel.add(new Level(\"MEDIUM\", mediumNumber));\n listLevel.add(new Level(\"HIGHT\", highNumber));\n listLevel.add(new Level(\"HARDCORE\", hardcoreNumber));\n\n Training training = new Training(id, inputCalendar.getTime(), time, listLevel);\n\n this.controller.AddTraining(training);\n\n // init values of Form\n initForm(null);\n\n // redirection to stats page\n Navigation.findNavController(getActivity(),\n R.id.nav_host_fragment).navigate(R.id.navigation_list_training);\n\n toast_message = \"L'entrainement a bien été ajouté !\";\n }else toast_message = \"Erreur:\\nToutes les valeurs de voies ne sont pas positive !\";\n }else toast_message = \"La durée ne doit pas exceder 1440 min.\";\n }else toast_message = \"La durée doit être supérieur à 0 min.\\n\";\n\n // Send alert\n Toast.makeText(getContext(), toast_message, Toast.LENGTH_LONG).show();\n }", "public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}", "public void AddQuestionToBank(ActionEvent actionEvent) throws IOException {\n QuestionModel questionModel = new QuestionModel();\n ArrayList<QuestionModel> questionBank = DBObject.getInstance().getQuestionBank();\n if(questionName.getText() != null && question.getText() != null && subjects.getValue() != null){\n if(className.getValue() != null && answer.getText() != null){\n if (easy.isSelected() || medium.isSelected() || hard.isSelected()) {\n questionModel.setQuestionName(questionName.getText());\n questionModel.setPointsPossible(Integer.parseInt(points.getText()));\n questionModel.setClassNumber(className.getValue().toString());\n questionModel.setSubject(subjects.getValue().toString());\n questionModel.setQuestion(question.getText());\n questionModel.getQuestionHelper().setAnswer(answer.getText());\n questionModel.setHint(hint.getText());\n if(easy.isSelected()){\n questionModel.setDifficulty(1);\n }\n else if(medium.isSelected()){\n questionModel.setDifficulty(2);\n }\n else if(hard.isSelected()){\n questionModel.setDifficulty(3);\n }\n SetUpNewView(questionBank, questionModel);\n }\n }\n }\n }", "public void buildAndShowMenuForm() {\n SimpleForm.Builder builder =\n SimpleForm.builder()\n .translator(MinecraftLocale::getLocaleString, session.locale())\n .title(\"gui.advancements\");\n\n List<String> rootAdvancementIds = new ArrayList<>();\n for (Map.Entry<String, GeyserAdvancement> advancement : storedAdvancements.entrySet()) {\n if (advancement.getValue().getParentId() == null) { // No parent means this is a root advancement\n builder.button(MessageTranslator.convertMessage(advancement.getValue().getDisplayData().getTitle(), session.locale()));\n rootAdvancementIds.add(advancement.getKey());\n }\n }\n\n if (rootAdvancementIds.isEmpty()) {\n builder.content(\"advancements.empty\");\n }\n\n builder.validResultHandler((response) -> {\n String id = rootAdvancementIds.get(response.clickedButtonId());\n if (!id.equals(\"\")) {\n if (id.equals(currentAdvancementCategoryId)) {\n // The server thinks we are already on this tab\n buildAndShowListForm();\n } else {\n // Send a packet indicating that we intend to open this particular advancement window\n ServerboundSeenAdvancementsPacket packet = new ServerboundSeenAdvancementsPacket(id);\n session.sendDownstreamPacket(packet);\n // Wait for a response there\n }\n }\n });\n\n session.sendForm(builder);\n }", "public void createSurvey(int tid);", "public void fillForm() {\n\t\t// fills the name field with nameOfProject\n\t\tprojName.sendKeys(nameOfProject);\n\t\t// selects the first option from the 'Client partner' dropdown list\n\t\tSelect sel = new Select(clientList);\n\t\tsel.selectByIndex(1);\n\t\t// enters valid date data\n\t\tstartDate.sendKeys(\"06042018\");\n\t\tendDate.sendKeys(\"06052018\");\n\t}", "public SalidaCajaForm() {\n\t\tinicializarComponentes();\n }", "public S2SSubmissionDetailForm() {\r\n initComponents();\r\n }", "protected void nuevo(){\n wp = new frmEspacioTrabajo();\n System.runFinalization();\n inicializar();\n }", "public String formCreated()\r\n {\r\n return formError(\"201 Created\",\"Object was created\");\r\n }", "public PDMRelationshipForm() {\r\n initComponents();\r\n }", "private HStack createEditForm() {\r\n\t\teditFormHStack = new HStack();\r\n\t\t\r\n\t\tVStack editFormVStack = new VStack();\r\n\t\teditFormVStack.addMember(addStarRatings());\r\n\t\t\r\n\t\tboundSwagForm = new DynamicForm();\r\n\t\tboundSwagForm.setNumCols(2);\r\n//\t\tboundSwagForm.setLongTextEditorThreshold(40);\r\n\t\tboundSwagForm.setDataSource(SmartGWTRPCDataSource.getInstance());\r\n\t\tboundSwagForm.setAutoFocus(true);\r\n\r\n\t\tHiddenItem keyItem = new HiddenItem(\"key\");\r\n\t\tTextItem nameItem = new TextItem(\"name\");\r\n\t\tnameItem.setLength(50);\r\n\t\tnameItem.setSelectOnFocus(true);\r\n\t\tTextItem companyItem = new TextItem(\"company\");\r\n\t\tcompanyItem.setLength(20);\r\n\t\tTextItem descriptionItem = new TextItem(\"description\");\r\n\t\tdescriptionItem.setLength(100);\r\n\t\tTextItem tag1Item = new TextItem(\"tag1\");\r\n\t\ttag1Item.setLength(15);\r\n\t\tTextItem tag2Item = new TextItem(\"tag2\");\r\n\t\ttag2Item.setLength(15);\r\n\t\tTextItem tag3Item = new TextItem(\"tag3\");\r\n\t\ttag3Item.setLength(15);\r\n\t\tTextItem tag4Item = new TextItem(\"tag4\");\r\n\t\ttag4Item.setLength(15);\r\n\t\t\r\n\t\tStaticTextItem isFetchOnlyItem = new StaticTextItem(\"isFetchOnly\");\r\n\t\tisFetchOnlyItem.setVisible(false);\r\n\t\tStaticTextItem imageKeyItem = new StaticTextItem(\"imageKey\");\r\n\t\timageKeyItem.setVisible(false);\r\n\t\t\r\n\t\tTextItem newImageURLItem = new TextItem(\"newImageURL\");\r\n\r\n\t\tboundSwagForm.setFields(keyItem, nameItem, companyItem, descriptionItem, tag1Item,\r\n\t\t\t\ttag2Item, tag3Item, tag4Item, isFetchOnlyItem, imageKeyItem, newImageURLItem);\r\n\t\teditFormVStack.addMember(boundSwagForm);\r\n\t\t\r\n\t\tcurrentSwagImage = new Img(\"/images/no_photo.jpg\"); \r\n\t\tcurrentSwagImage.setImageType(ImageStyle.NORMAL); \r\n\t\teditFormVStack.addMember(currentSwagImage);\r\n\t\teditFormVStack.addMember(createImFeelingLuckyImageSearch());\r\n\t\t\r\n\t\tIButton saveButton = new IButton(\"Save\");\r\n\t\tsaveButton.setAutoFit(true);\r\n\t\tsaveButton.addClickHandler(new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\t//TODO\r\n\t\t\t\t//uploadForm.submitForm();\r\n\t\t\t\t//Turn off fetch only (could have been on from them rating the item\r\n\t\t\t\tboundSwagForm.getField(\"isFetchOnly\").setValue(false);\r\n\t\t\t\tboundSwagForm.saveData();\r\n\t\t\t\thandleSubmitComment(); //in case they commented while editing\r\n\t\t\t\t//re-sort\r\n\t\t\t\tdoSort();\r\n\t\t\t\tif (boundSwagForm.hasErrors()) {\r\n\t\t\t\t\tWindow.alert(\"\" + boundSwagForm.getErrors());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tboundSwagForm.clearValues();\r\n\t\t\t\t\t\r\n\t\t\t\t\teditFormHStack.hide();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tIButton cancelButton = new IButton(\"Cancel\");\r\n\t\tcancelButton.setAutoFit(true);\r\n\t\tcancelButton.addClickHandler(new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tboundSwagForm.clearValues();\r\n\t\t\t\teditFormHStack.hide();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tIButton deleteButton = new IButton(\"Delete\");\r\n\t\tdeleteButton.setAutoFit(true);\r\n\t\tdeleteButton.addClickHandler(new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tshowConfirmRemovePopup(itemsTileGrid.getSelectedRecord());\r\n\t\t\t\teditFormHStack.hide();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\teditButtonsLayout = new HLayout();\r\n\t\teditButtonsLayout.setHeight(20);\r\n\t\teditButtonsLayout.addMember(saveButton);\r\n\t\teditButtonsLayout.addMember(cancelButton);\r\n\t\teditButtonsLayout.addMember(deleteButton);\r\n\t\t\r\n\t\teditFormVStack.addMember(editButtonsLayout);\r\n\t\t\r\n\t\ttabSet = new TabSet();\r\n\t\ttabSet.setDestroyPanes(false);\r\n tabSet.setTabBarPosition(Side.TOP);\r\n tabSet.setTabBarAlign(Side.LEFT);\r\n tabSet.setWidth(570);\r\n tabSet.setHeight(570);\r\n \r\n\r\n Tab viewEditTab = new Tab();\r\n viewEditTab.setPane(editFormVStack);\r\n\r\n commentsTab = new Tab(\"Comments\");\r\n commentsTab.setPane(createComments());\r\n \r\n tabSet.addTab(viewEditTab);\r\n tabSet.addTab(commentsTab);\r\n //put focus in commentsEditor when they click the Comments tab\r\n tabSet.addClickHandler(new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tTab selectedTab = tabSet.getSelectedTab();\r\n\t\t\t\tif (commentsTab==selectedTab) {\r\n\t\t\t\t\trichTextCommentsEditor.focus();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n \r\n VStack tabsVStack = new VStack();\r\n itemEditTitleLabel = new Label(); \r\n itemEditTitleLabel.setHeight(30); \r\n itemEditTitleLabel.setAlign(Alignment.LEFT); \r\n itemEditTitleLabel.setValign(VerticalAlignment.TOP); \r\n itemEditTitleLabel.setWrap(false); \r\n tabsVStack.addMember(itemEditTitleLabel);\r\n //make sure this is drawn since we set the tab names early\r\n tabSet.draw();\r\n tabsVStack.addMember(tabSet);\r\n\t\teditFormHStack.addMember(tabsVStack);\r\n\t\teditFormHStack.hide();\r\n\t\treturn editFormHStack;\r\n\t}", "public static Result postAddPaper() {\n Form<PaperFormData> formData = Form.form(PaperFormData.class).bindFromRequest();\n Paper info1 = new Paper(formData.get().title, formData.get().authors, formData.get().pages,\n formData.get().channel);\n info1.save();\n return redirect(routes.PaperController.listProject());\n }", "private void initFormCreateMode() {\n initSpinnerSelectionChamps();\n //TODO\n }", "public WCreateExam() {\n initComponents();\n setLocationRelativeTo(null);\n this.setExamID();\n this.updateTable();\n }", "public void createQuestion(int sid,int qid,String qtype,String qtitle,String answer_a,String answer_b,String answer_c,String answer_d);", "public ViewPrescriptionForm() {\n initComponents();\n }", "public void onCreate() {\r\n Session session = sessionService.getCurrentSession();\r\n Map<String, Region> items = ControlUtility.createForm(Pc.class);\r\n\r\n ControlUtility.fillComboBox((ComboBox<Kind>) items.get(\"Kind\"), session.getCampaign().getCampaignVariant().getKinds());\r\n ControlUtility.fillComboBox((ComboBox<Race>) items.get(\"Race\"), session.getCampaign().getCampaignVariant().getRaces());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Ability>) items.get(\"SavingThrows\"), Arrays.asList(Ability.values()));\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Proficiency>) items.get(\"Proficiencies\"), session.getCampaign().getCampaignVariant().getProficiencies());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Feature>) items.get(\"Features\"), session.getCampaign().getCampaignVariant().getFeatures());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Trait>) items.get(\"Traits\"), session.getCampaign().getCampaignVariant().getTraits());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Equipment>) items.get(\"Equipment\"), session.getCampaign().getCampaignVariant().getEquipments());\r\n\r\n Campaign campaign = session.getCampaign();\r\n\r\n Dialog<String> dialog = ControlUtility.createDialog(\"Create Playable Character\", items);\r\n dialog.show();\r\n\r\n dialog.setResultConverter(buttonType -> {\r\n if (buttonType != null) {\r\n Pc pc = null;\r\n try {\r\n pc = ControlUtility.controlsToValues(Pc.class, items);\r\n } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException | InstantiationException | ClassNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n if (pc != null) {\r\n try {\r\n characterService.createPlayerCharacter(pc);\r\n } catch (SessionAlreadyExists | IndexAlreadyExistsException sessionAlreadyExists) {\r\n sessionAlreadyExists.printStackTrace();\r\n }\r\n try {\r\n playerManagementService.addOrUpdatePcForRegisteredPlayer(pc);\r\n Player player = playerManagementService.getRegisteredPlayer();\r\n campaign.addPlayer(player);\r\n campaign.addCharacter(pc);\r\n if (campaignListingService.campaignExists(campaign.getId())) {\r\n manipulationService.updateCampaign(campaign);\r\n } else {\r\n manipulationService.createCampaign(campaign);\r\n }\r\n } catch (MultiplePlayersException | EntityNotFoundException | SessionAlreadyExists | IndexAlreadyExistsException e) {\r\n e.printStackTrace();\r\n }\r\n try {\r\n playerManagementService.addOrUpdatePcForRegisteredPlayer(pc);\r\n } catch (MultiplePlayersException | EntityNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n try {\r\n sessionService.updateParticipant(playerManagementService.getRegisteredPlayer().getId(), pc.getId());\r\n sessionService.updateCampaign(campaign);\r\n } catch (EntityNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n render();\r\n return pc.toString();\r\n }\r\n }\r\n return null;\r\n });\r\n }", "public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }", "public void crearProgramaFormacion(String nombre, String descripcion, Date fechaI, Date fechaF, Date fechaA, String url) throws ProgramaFormacionExcepcion;", "public InvoiceCreate() {\n initComponents();\n }", "public void fillForm(Event e){\n // name\n eventName.setText(e.getEventname().toString());\n // room\n room.setText(e.getRoom() + \"\");\n // dates\n Calendar from = extractDate(e.getFromDate());\n writeDateToButton(from, R.id.newEvent_button_from);\n Calendar to = extractDate(e.getToDate());\n writeDateToButton(to, R.id.newEvent_button_to);\n Calendar fromTime = null;\n Calendar toTime = null;\n if(e.getFromTime() == -1)\n wholeDay.setChecked(true);\n else {\n fromTime = extractTime(e.getFromTime());\n writeDateToButton(fromTime, R.id.newEvent_button_from_hour);\n toTime = extractTime(e.getToTime());\n writeDateToButton(toTime, R.id.newEvent_button_to_hour);\n }\n // notification\n spinner.setSelection(e.getNotificiation());\n // patient\n PatientAdapter pa = new PatientAdapter(this);\n Patient p = pa.getPatientById(e.getPatient());\n patient_id = p.getPatient_id();\n patient.setText(p.getName());\n // desc\n desc.setText(e.getDescription().toString());\n // putting time and date togehter\n this.fromDate = Calendar.getInstance();\n this.toDate = Calendar.getInstance();\n this.fromDate.set(from.get(Calendar.YEAR), from.get(Calendar.MONTH), from.get(Calendar.DAY_OF_MONTH),\n (fromTime != null ? fromTime.get(Calendar.HOUR_OF_DAY) : 0),\n (fromTime != null ? fromTime.get(Calendar.MINUTE) : 0));\n this.toDate.set(to.get(Calendar.YEAR), to.get(Calendar.MONTH), to.get(Calendar.DAY_OF_MONTH),\n (toTime != null ? toTime.get(Calendar.HOUR_OF_DAY) : 0),\n (toTime != null ? toTime.get(Calendar.MINUTE) : 0));\n startYear = fromDate.get(Calendar.YEAR);\n startMonth = fromDate.get(Calendar.MONTH);\n startDay = fromDate.get(Calendar.DAY_OF_MONTH);\n startHour = fromDate.get(Calendar.HOUR_OF_DAY);\n }", "@GetMapping(\"/create\")\n public ModelAndView create(@ModelAttribute(\"form\") final CardCreateForm form) {\n return getCreateForm(form);\n }", "public sub_Form(HashMap<String, ReturnedValue> entry, int index){\n this.form_ID = entry.get(\"formID\").to_string();\n this.repID = entry.get(\"repID\").to_string();\n this.plantRegistry = entry.get(\"plantRegistry\").to_string();\n this.domesticOrImported = entry.get(\"domesticOrImported\").to_string();\n this.serialNumber = entry.get(\"serialNumber\").to_string();\n this.beverageType = entry.get(\"beverageType\").to_string();\n this.brandName = entry.get(\"brandName\").to_string();\n this.fancifulName = entry.get(\"fancifulName\").to_string();\n this.vintage = entry.get(\"vintage\").to_string();\n this.grapeVarietals = entry.get(\"grapeVarietals\").to_string();\n this.pHValue = entry.get(\"pHValue\").to_string();\n this.wineAppellation = entry.get(\"wineAppellation\").to_string();\n this.alcoholContent = entry.get(\"alcoholContent\").to_string();\n this.phoneNumber = entry.get(\"phoneNumber\").to_string();\n this.email = entry.get(\"email\").to_string();\n this.index = index;\n }", "private void formFiller(FormLayout fl)\n\t{\n fl.setSizeFull();\n\n\t\ttf0=new TextField(\"Name\");\n\t\ttf0.setRequired(true);\n\t\t\n sf1 = new Select (\"Customer\");\n try \n {\n\t\t\tfor(String st :db.selectAllCustomers())\n\t\t\t{\n\t\t\t\tsf1.addItem(st);\n\t\t\t}\n\t\t} \n \tcatch (UnsupportedOperationException | SQLException e) \n \t{\n \t\tErrorWindow wind = new ErrorWindow(e); \n\t UI.getCurrent().addWindow(wind);\n \t\te.printStackTrace();\n \t}\n sf1.setRequired(true);\n \n sf2 = new Select (\"Project Type\");\n sf2.addItem(\"In house\");\n sf2.addItem(\"Outsourcing\");\n df3=new DateField(\"Start Date\");\n df3.setDateFormat(\"d-M-y\");\n df3.setRequired(true);\n \n df4=new DateField(\"End Date\");\n df4.setDateFormat(\"d-M-y\");\n \n df4.setRangeStart(df3.getValue());\n \n df5=new DateField(\"Next DeadLine\");\n df5.setDateFormat(\"d-M-y\");\n df5.setRangeStart(df3.getValue());\n df5.setRangeEnd(df4.getValue());\n sf6 = new Select (\"Active\");\n sf6.addItem(\"yes\");\n sf6.addItem(\"no\");\n sf6.setRequired(true);\n \n tf7=new TextField(\"Budget(mandays)\");\n \n tf8=new TextArea(\"Description\");\n \n tf9=new TextField(\"Inserted By\");\n \n tf10=new TextField(\"Inserted At\");\n \n tf11=new TextField(\"Modified By\");\n \n tf12=new TextField(\"Modified At\");\n \n if( project.getName()!=null)tf0.setValue(project.getName());\n else tf0.setValue(\"\");\n\t\tif(!editable)tf0.setReadOnly(true);\n fl.addComponent(tf0, 0);\n \n\n if(project.getCustomerID()!=-1)\n\t\t\ttry \n \t{\n\t\t\t\tsf1.setValue(db.selectCustomerforId(project.getCustomerID()));\n\t\t\t}\n \tcatch (ReadOnlyException | SQLException e) \n \t{\n \t\tErrorWindow wind = new ErrorWindow(e); \n\t\t UI.getCurrent().addWindow(wind);\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\telse sf1.setValue(\"\");\n if(!editable)sf1.setReadOnly(true);\n fl.addComponent(sf1, 1);\n \n \n if(project.getProjectType()!=null)sf2.setValue(project.getProjectType());\n else sf2.setValue(\"\");\n if(!editable)sf2.setReadOnly(true);\n fl.addComponent(sf2, 2);\n \n if(project.getStartDate()!=null) df3.setValue(project.getStartDate());\n if(!editable)df3.setReadOnly(true);\n fl.addComponent(df3, 3);\n \n if(project.getEndDate()!=null) df4.setValue(project.getEndDate());\n if(!editable)df4.setReadOnly(true);\n fl.addComponent(df4, 4);\n \n if(project.getNextDeadline()!=null)df5.setValue(project.getNextDeadline());\n if(!editable)df5.setReadOnly(true);\n fl.addComponent(df5, 5);\n \n if (project.isActive())sf6.setValue(\"yes\");\n else sf6.setValue(\"no\");\n if(!editable)sf6.setReadOnly(true);\n fl.addComponent(sf6, 6);\n \n if(project.getBudget()!=-1.0) tf7.setValue(String.valueOf(project.getBudget()));\n else tf7.setValue(\"\");\n if(!editable)tf7.setReadOnly(true);\n fl.addComponent(tf7, 7);\n \n if(project.getDescription()!=null)tf8.setValue(project.getDescription());\n else tf8.setValue(\"\");\n if(!editable)tf8.setReadOnly(true);\n fl.addComponent(tf8, 8);\n \n if(project.getInserted_by()!=null)tf9.setValue(project.getInserted_by());\n else tf9.setValue(\"\");\n tf9.setEnabled(false);\n fl.addComponent(tf9, 9);\n \n if(project.getInserted_at()!=null)tf10.setValue(project.getInserted_at().toString());\n else tf10.setValue(\"\");\n tf10.setEnabled(false);\n fl.addComponent(tf10, 10);\n \n if(project.getModified_by()!=null)tf11.setValue(project.getModified_by());\n else tf11.setValue(\"\");\n tf11.setEnabled(false);\n fl.addComponent(tf11, 11);\n \n if(project.getModified_at()!=null)tf12.setValue(project.getModified_at().toString());\n else tf12.setValue(\"\");\n tf12.setEnabled(false);\n fl.addComponent(tf12, 12);\n \n \n\t}", "public CreateAccount() {\n initComponents();\n selectionall();\n }", "public void saveAndCreateNew() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"saveAndCreateNewButton\").click();\n\t}", "public void saveAndCreateNew() throws Exception {\n\t\tVoodooUtils.focusFrame(\"bwc-frame\");\n\t\tgetControl(\"saveAndCreateNew\").click();\n\t\tVoodooUtils.waitForReady();\n\t\tVoodooUtils.focusDefault();\n\t}", "public void crearDialogo() {\r\n final PantallaCompletaDialog a2 = PantallaCompletaDialog.a(getString(R.string.hubo_error), getString(R.string.no_hay_internet), getString(R.string.cerrar).toUpperCase(), R.drawable.ic_error);\r\n a2.f4589b = new a() {\r\n public void onClick(View view) {\r\n a2.dismiss();\r\n }\r\n };\r\n a2.show(getParentFragmentManager(), \"TAG\");\r\n }", "public ProposalSpecialReviewForm() {\r\n }", "protected void do_mntmStartNewForm_actionPerformed(ActionEvent arg0) {\n\t\tthis.dispose();\n\t\tmain(null);\n\t}", "private void challengeStartNew() {\n FragmentManager fm = getSupportFragmentManager();\n FragmentNewChallenge newChallenge = FragmentNewChallenge.newInstance(\"Titel\");\n newChallenge.show(fm, \"fragment_start_new_challenge\");\n }", "public MechanicForm() {\n initComponents();\n }", "public ProductCreate() {\n initComponents();\n }", "public static void form_Save_And_New() throws InterruptedException {\n\t\tAndroidLocators.resourceId(\"in.spoors.effortplus:id/saveForm\").click();\n\t\tCommonUtils.alertContentXpath();\n\t\tif (AndroidLocators.findElements_With_ResourceId(\"new UiSelector().resourceId(\\\"in.spoors.effortplus:id/formSaveAndNewButton\\\")\")\n\t\t\t\t.size() > 0) {\n\t\t\tAndroidLocators.resourceId(\"in.spoors.effortplus:id/formSaveAndNewButton\").click();\n\t\t\tCommonUtils.interruptSyncAndLetmeWork();\n\t\t\tCommonUtils.waitForElementVisibility(\"//*[@resource-id='in.spoors.effortplus:id/saveForm']\");\n\t\t}\n\t}", "int insert(AbiFormsForm record);", "@RequestMapping(value = \"/report.create\", method = RequestMethod.GET)\n @ResponseBody public ModelAndView newreportForm(HttpSession session) throws Exception {\n ModelAndView mav = new ModelAndView();\n mav.setViewName(\"/sysAdmin/reports/details\");\n\n //Create a new blank provider.\n reports report = new reports();\n \n mav.addObject(\"btnValue\", \"Create\");\n mav.addObject(\"reportdetails\", report);\n\n return mav;\n }", "private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}", "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}", "public String create() {\n\n if (log.isDebugEnabled()) {\n log.debug(\"create()\");\n }\n FacesContext context = FacesContext.getCurrentInstance();\n StringBuffer sb = registration(context);\n sb.append(\"?action=Create\");\n forward(context, sb.toString());\n return (null);\n\n }", "@Test\n public void test011() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n ActionExpression actionExpression0 = new ActionExpression(\"'tj#~9z\");\n Form form0 = new Form(errorPage0, \"'tj#~9z\", actionExpression0);\n Submit submit0 = (Submit)form0.submit(\"'tj#~9z\");\n Form form1 = form0.id(\"'tj#~9z\");\n }", "public Project_Create() {\n initComponents();\n }", "public void createActionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\n\t}", "public void initContactCreation() {\n click(By.linkText(\"add new\"));\n //wd.findElement(By.linkText(\"add new\")).click();\n }", "private void loadForm() {\n service.getReasons(refusalReasons);\n service.getVacEligibilty(vacElig);\n service.getVacSites(vacSites);\n service.getReactions(vacReactions);\n service.getOverrides(vacOverrides);\n updateComboValues();\n \n selPrv = \"\";\n selLoc = \"\";\n \n //datGiven.setDateConstraint(new SimpleDateConstraint(SimpleDateConstraint.NO_NEGATIVE, DateUtil.addDays(patient.getBirthDate(), -1, true), null, BgoConstants.TX_BAD_DATE_DOB));\n datGiven.setDateConstraint(getConstraintDOBDate());\n datEventDate.setConstraint(getConstraintDOBDate());\n radFacility.setLabel(service.getParam(\"Caption-Facility\", \"&Facility\"));\n if (immunItem != null) {\n \n txtVaccine.setValue(immunItem.getVaccineName());\n txtVaccine.setAttribute(\"ID\", immunItem.getVaccineID());\n txtVaccine.setAttribute(\"DATA\", immunItem.getVaccineID() + U + immunItem.getVaccineName());\n setEventType(immunItem.getEventType());\n \n radRefusal.setDisabled(!radRefusal.isChecked());\n radHistorical.setDisabled(!radHistorical.isChecked());\n radCurrent.setDisabled(!radCurrent.isChecked());\n \n visitIEN = immunItem.getVisitIEN();\n if (immunItem.getProvider() != null) {\n txtProvider.setText(FhirUtil.formatName(immunItem.getProvider().getName()));\n txtProvider.setAttribute(\"ID\", immunItem.getProvider().getId().getIdPart());\n selPrv = immunItem.getProvider().getId().getIdPart() + U + U + immunItem.getProvider().getName();\n }\n switch (immunItem.getEventType()) {\n case REFUSAL:\n ListUtil.selectComboboxItem(cboReason, immunItem.getReason());\n txtComment.setText(immunItem.getComment());\n datEventDate.setValue(immunItem.getDate());\n break;\n case HISTORICAL:\n datEventDate.setValue(immunItem.getDate());\n txtLocation.setValue(immunItem.isImmunization() ? immunItem.getLocationName() : \"\");\n txtLocation.setAttribute(\"ID\", immunItem.isImmunization() ? immunItem.getLocationID() : \"\");\n selLoc = immunItem.getLocationID() + U + U + immunItem.getLocationName();\n radOther.setSelected(txtLocation.getAttribute(\"ID\") != null\n ? txtLocation.getAttribute(\"ID\").toString().isEmpty() : false);\n txtAdminNote.setText(immunItem.getAdminNotes());\n ZKUtil.disableChildren(fraDate, true);\n ZKUtil.disableChildren(fraHistorical, true);\n default:\n service.getLot(lotNumbers, getVaccineID());\n loadComboValues(cboLot, lotNumbers, comboRenderer);\n loadVaccination();\n txtLocation.setValue(immunItem.isImmunization() ? immunItem.getLocationName() : \"\");\n txtLocation.setAttribute(\"ID\", immunItem.isImmunization() ? immunItem.getLocationID() : \"\");\n selLoc = immunItem.getLocationID() + U + U + immunItem.getLocationName();\n radOther.setSelected(txtLocation.getAttribute(\"ID\") != null\n ? txtLocation.getAttribute(\"ID\").toString().isEmpty() : false);\n ListUtil.selectComboboxItem(cboLot, immunItem.getLot());\n ListUtil.selectComboboxItem(cboSite, StrUtil.piece(immunItem.getInjSite(), \"~\", 2));\n spnVolume.setText(immunItem.getVolume());\n datGiven.setDate(immunItem.getDate());\n datVIS.setValue(immunItem.isImmunization() ? immunItem.getVISDate() : null);\n ListUtil.selectComboboxItem(cboReaction, immunItem.getReaction());\n ListUtil.selectComboboxData(cboOverride, immunItem.getVacOverride());\n txtAdminNote.setText(immunItem.getAdminNotes());\n cbCounsel.setChecked(immunItem.wasCounseled());\n }\n } else {\n IUser user = UserContext.getActiveUser();\n Practitioner provider = new Practitioner();\n provider.setId(user.getLogicalId());\n provider.setName(FhirUtil.parseName(user.getFullName()));\n txtProvider.setValue(FhirUtil.formatName(provider.getName()));\n txtProvider.setAttribute(\"ID\", VistAUtil.parseIEN(provider)); //provider.getId().getIdPart());\n selPrv = txtProvider.getAttribute(\"ID\") + U + U + txtProvider.getValue();\n Location location = new Location();\n location.setName(\"\");\n location.setId(\"\");\n datGiven.setDate(getBroker().getHostTime());\n onClick$btnVaccine(null);\n \n if (txtVaccine.getValue().isEmpty()) {\n close(true);\n return;\n }\n \n Encounter encounter = EncounterContext.getActiveEncounter();\n if (!EncounterUtil.isPrepared(encounter)) {\n setEventType(EventType.HISTORICAL);\n radCurrent.setDisabled(true);\n } else {\n if (isCategory(encounter, \"E\")) {\n setEventType(EventType.HISTORICAL);\n Date date = encounter == null ? null : encounter.getPeriod().getStart();\n datEventDate.setValue(DateUtil.stripTime(date == null ? getBroker().getHostTime() : date));\n radCurrent.setDisabled(true);\n txtLocation.setText(user.getSecurityDomain().getName());\n PromptDialog.showInfo(user.getSecurityDomain().getLogicalId());\n txtLocation.setAttribute(\"ID\", user.getSecurityDomain().getLogicalId());\n \n } else {\n if (isVaccineInactive()) {\n setEventType(EventType.HISTORICAL);\n radCurrent.setDisabled(true);\n } else {\n setEventType(EventType.CURRENT);\n radCurrent.setDisabled(false);\n }\n }\n }\n selectItem(cboReason, NONESEL);\n }\n btnSave.setLabel(immunItem == null ? \"Add\" : \"Save\");\n btnSave.setTooltiptext(immunItem == null ? \"Add record\" : \"Save record\");\n txtVaccine.setFocus(true);\n }", "public String newBoleta() {\n\t\tresetForm();\n\t\treturn \"/boleta/insert.xhtml\";\n\t}", "@Override\n public void formPopulated(FormEvent fe) {\n formObject = FormContext.getCurrentInstance().getFormReference();\n\n formObject.setNGValue(\"purchasestatus\", \"\");\n formObject.setNGValue(\"purchaseremarks\", \"\");\n formObject.setNGValue(\"previousstatus\", \"\");\n formObject.setNGValue(\"returnpo\", \"\");\n\n String previousactivity = formObject.getNGValue(\"previousactivity\");\n if (previousactivity.equalsIgnoreCase(\"Initiator\")\n || previousactivity.equalsIgnoreCase(\"StoreMaker\")\n || previousactivity.equalsIgnoreCase(\"StoreChecker\")\n || previousactivity.equalsIgnoreCase(\"AccountsMaker\")\n || previousactivity.equalsIgnoreCase(\"AccountsChecker\")) {\n formObject.addComboItem(\"purchasestatus\", \"Hold\", \"Hold\");\n formObject.addComboItem(\"purchasestatus\", \"Exception Cleared\", \"Exception Cleared\");\n }\n\n if (previousactivity.equalsIgnoreCase(\"QualityMaker\")\n || previousactivity.equalsIgnoreCase(\"QualityChecker\")) {\n formObject.addComboItem(\"purchasestatus\", \"Hold\", \"Hold\");\n formObject.addComboItem(\"purchasestatus\", \"Replacement or Exchange\", \"Replacement or Exchange\");\n formObject.addComboItem(\"purchasestatus\", \"Purchase Return\", \"Purchase Return\");\n }\n\n formObject.clear(\"proctype\");\n Query = \"select HeadName from supplypoheadmaster order by HeadName asc\";\n System.out.println(\"Query is \" + Query);\n result = formObject.getDataFromDataSource(Query);\n for (int i = 0; i < result.size(); i++) {\n formObject.addComboItem(\"proctype\", result.get(i).get(0), result.get(i).get(0));\n }\n }", "public FormFieldsReport() {}", "public TransferOfFundsForm() {\n super();\n }", "public void buildAndShowListForm() {\n GeyserAdvancement categoryAdvancement = storedAdvancements.get(currentAdvancementCategoryId);\n String language = session.locale();\n\n SimpleForm.Builder builder =\n SimpleForm.builder()\n .title(MessageTranslator.convertMessage(categoryAdvancement.getDisplayData().getTitle(), language))\n .content(MessageTranslator.convertMessage(categoryAdvancement.getDisplayData().getDescription(), language));\n\n List<GeyserAdvancement> visibleAdvancements = new ArrayList<>();\n if (currentAdvancementCategoryId != null) {\n for (GeyserAdvancement advancement : storedAdvancements.values()) {\n boolean earned = isEarned(advancement);\n if (earned || !advancement.getDisplayData().isHidden()) {\n if (advancement.getParentId() != null && currentAdvancementCategoryId.equals(advancement.getRootId(this))) {\n String color = earned ? advancement.getDisplayColor() : \"\";\n builder.button(color + MessageTranslator.convertMessage(advancement.getDisplayData().getTitle()) + '\\n');\n\n visibleAdvancements.add(advancement);\n }\n }\n }\n }\n\n builder.button(GeyserLocale.getPlayerLocaleString(\"gui.back\", language));\n\n builder.closedResultHandler(() -> {\n // Indicate that we have closed the current advancement tab\n session.sendDownstreamPacket(new ServerboundSeenAdvancementsPacket());\n\n }).validResultHandler((response) -> {\n if (response.getClickedButtonId() < visibleAdvancements.size()) {\n GeyserAdvancement advancement = visibleAdvancements.get(response.clickedButtonId());\n buildAndShowInfoForm(advancement);\n } else {\n buildAndShowMenuForm();\n // Indicate that we have closed the current advancement tab\n session.sendDownstreamPacket(new ServerboundSeenAdvancementsPacket());\n }\n });\n\n session.sendForm(builder);\n }", "public Add_Lecture_Form() {\n initComponents();\n \n this.setVisible(true);\n this.pack();\n this.setLocationRelativeTo(null);\n }", "public form_for_bd() {\n initComponents();\n }", "private void readForm() {\n }", "@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "public StorageForm() {\n}", "protected void doNew() {\n\t\tgetRegisterView().clearTableSelection();\n\t\tclear();\n\t\tenableForm(true);\n\t\tgetForm().getButton(EDIT).setEnabled(false);\n\t\tgetForm().getField(CHECK_NUMBER).requestFocus();\n\t}", "public form() {\n initComponents();\n }", "private void actionNewProject ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tDataController.scenarioNewProject();\r\n\r\n\t\t\thelperDisplayProjectFiles();\r\n\r\n\t\t\t//---- Change button icon\r\n\t\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_VIEW_SAMPLES);\r\n\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setIcon(iconButton);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setActionCommand(FormMainHandlerCommands.AC_VIEW_SAMPLES_ON);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setToolTipText(\"View detected samples\");\r\n\r\n\t\t\tmainFormLink.reset();\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "private void createForm(ArrayList<HashMap<String, String>> data) {\n\t\tLayoutInflater inflater = LayoutInflater.from(IPropertyRegistrationActivity.this);\n\t\tLinearLayout.LayoutParams params = new LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams.MATCH_PARENT,\n\t\t\t\tandroid.widget.LinearLayout.LayoutParams.WRAP_CONTENT);\n\t\tparams.topMargin = 10;\n\n\t\tfields = data;\n\t\tLinearLayout layout = null;\n\t\tint len = fields.size();\n\t\tfor (int j = 0; j < len; j++) {\n\t\t\tfinal HashMap<String, String> field = fields.get(j);\n\t\t\tView fieldView = inflater.inflate(R.layout.iproperty_registration_dynamic_view_item, null);\n\n\t\t\tif (field.get(TYPE).equals(LABEL)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrLabel));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t} else if (field.get(TYPE).equals(PASSWORD)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEdit));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tif (field.get(NAME).contains(getString(R.string.phone)) || field.get(NAME).contains(getString(R.string.year))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_CLASS_NUMBER);\n\t\t\t\t} else if (field.get(NAME).contains(getString(R.string.website)) || field.get(NAME).contains(getString(R.string.email))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);\n\t\t\t\t}\n\t\t\t} else if (field.get(TYPE).equals(TEXT)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEdit));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tif (field.get(NAME).contains(getString(R.string.phone)) || field.get(NAME).contains(getString(R.string.year))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_CLASS_NUMBER);\n\t\t\t\t} else if (field.get(NAME).contains(getString(R.string.website)) || field.get(NAME).contains(getString(R.string.email))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);\n\t\t\t\t}\n\t\t\t} else if (field.get(TYPE).equals(TEXTAREA)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditArea));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\n\t\t\t\tif (field.get(VALUE).toString().trim().length() > 0) {\n\t\t\t\t\tedit.setText(field.get(VALUE));\n\t\t\t\t} else {\n\t\t\t\t}\n\n\t\t\t} else if (field.get(TYPE).equals(MAP)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tfinal ImageView imgMap;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditMap));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\timgMap = ((ImageView) layout.findViewById(R.id.imgMap));\n\t\t\t\tif (field.get(NAME).equalsIgnoreCase(getString(R.string.state))) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tedit.setText(address.getAdminArea().replace(address.getCountryName() == null ? \"\" : address.getCountryName(), \"\")\n\t\t\t\t\t\t\t\t.replace(address.getPostalCode() == null ? \"\" : address.getPostalCode(), \"\"));\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\tedit.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t} else if (field.get(NAME).equalsIgnoreCase(getString(R.string.city_town))) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tedit.setText(address.getSubAdminArea());\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\tedit.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\timgMap.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\teditMap = edit;\n\t\t\t\t\t\tIntent intent = new Intent(IPropertyRegistrationActivity.this, IjoomerMapAddress.class);\n\t\t\t\t\t\tstartActivityForResult(intent, GET_ADDRESS_FROM_MAP);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(SELECT)) {\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrSpin));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tfinal Spinner spn;\n\t\t\t\tspn = ((Spinner) layout.findViewById(R.id.txtValue));\n\t\t\t\tspn.setAdapter(IjoomerUtilities.getSpinnerAdapter(field));\n\t\t\t\tif (field.get(NAME).equalsIgnoreCase(getString(R.string.country))) {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tString country = address.getCountryName();\n\t\t\t\t\t\tint selectedIndex = 0;\n\t\t\t\t\t\tJSONArray jsonArray = null;\n\n\t\t\t\t\t\tjsonArray = new JSONArray(field.get(OPTIONS));\n\t\t\t\t\t\tint optionSize = jsonArray.length();\n\t\t\t\t\t\tfor (int k = 0; k < optionSize; k++) {\n\t\t\t\t\t\t\tJSONObject options = (JSONObject) jsonArray.get(k);\n\n\t\t\t\t\t\t\tif (options.getString(VALUE).equalsIgnoreCase(country)) {\n\t\t\t\t\t\t\t\tselectedIndex = k;\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\tspn.setSelection(selectedIndex);\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tspn.setSelection(0);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else if (field.get(TYPE).equals(DATE)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getDateDialog(((IjoomerEditText) v).getText().toString(), true, new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setError(null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(TIME)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getTimeDialog(((IjoomerEditText) v).getText().toString(), new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setError(null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(MULTIPLESELECT)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getMultiSelectionDialog(field.get(NAME), field.get(OPTIONS), ((IjoomerEditText) v).getText().toString(), new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (field.get(REQUIRED).equalsIgnoreCase(\"1\")) {\n\t\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME) + \" *\");\n\t\t\t} else {\n\t\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME));\n\t\t\t}\n\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEdit)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEditArea)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrSpin)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrLabel)).setVisibility(View.GONE);\n\n\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrReadOnly));\n\t\t\tlayout.setVisibility(View.VISIBLE);\n\n\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME));\n\t\t\t((IjoomerEditText) layout.findViewById(R.id.txtValue)).setText(field.get(VALUE));\n\t\t\tfieldView.setTag(field);\n\t\t\tlnr_form.addView(fieldView, params);\n\t\t}\n\t}", "public frmAfiliado() {\n initComponents();\n \n }", "@Test(timeout = 4000)\n public void test216() throws Throwable {\n Form form0 = new Form((String) null);\n form0._clear();\n assertEquals(\"wheel_components_Form\", form0.getComponentId());\n }", "@OnClick (R.id.create_course_btn)\n public void createCourse()\n {\n\n CourseData courseData = new CourseData();\n courseData.CreateCourse( getView() ,UserData.user.getId() ,courseName.getText().toString() , placeName.getText().toString() , instructor.getText().toString() , Integer.parseInt(price.getText().toString()), date.getText().toString() , descreption.getText().toString() ,location.getText().toString() , subField.getSelectedItem().toString() , field.getSelectedItem().toString());\n }", "public TorneoForm() {\n initComponents();\n }" ]
[ "0.72535807", "0.6734193", "0.6485586", "0.6430647", "0.617686", "0.60488737", "0.60020447", "0.5980599", "0.5972172", "0.5929175", "0.5926719", "0.5918148", "0.58929944", "0.58695424", "0.58634436", "0.5849182", "0.5818161", "0.5802887", "0.57779413", "0.57235783", "0.57139254", "0.56752074", "0.566608", "0.5660549", "0.56598324", "0.5657879", "0.56551564", "0.56426096", "0.5618028", "0.56140816", "0.560673", "0.5594854", "0.55931336", "0.5585964", "0.5581137", "0.5580437", "0.5580118", "0.5568157", "0.5565287", "0.55421126", "0.55346835", "0.55337906", "0.5533092", "0.5524665", "0.5517008", "0.55111057", "0.55076474", "0.54662514", "0.544698", "0.5433774", "0.5427462", "0.5414048", "0.54117155", "0.5406613", "0.5406528", "0.5404202", "0.5398423", "0.5392328", "0.5391366", "0.539103", "0.5386442", "0.5381642", "0.53807884", "0.5372793", "0.5370741", "0.53664553", "0.53650177", "0.5359625", "0.535702", "0.5348149", "0.53453445", "0.5335939", "0.53314084", "0.5328189", "0.53261524", "0.5325124", "0.53163975", "0.5313232", "0.5313022", "0.5311995", "0.5302869", "0.53020895", "0.5300321", "0.52996343", "0.529927", "0.52986526", "0.52942604", "0.52902293", "0.5287618", "0.5287393", "0.52850777", "0.5283466", "0.52763295", "0.52696043", "0.52690184", "0.5265569", "0.52559423", "0.5243831", "0.5240758", "0.5239555" ]
0.5687341
21
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() { num1 = new javax.swing.JLabel(); num2 = new javax.swing.JLabel(); num3 = new javax.swing.JLabel(); number1 = new javax.swing.JTextField(); number2 = new javax.swing.JTextField(); resultBox = new javax.swing.JTextField(); Add = new javax.swing.JButton(); Subtract = new javax.swing.JButton(); Multiply = new javax.swing.JButton(); Divide = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); num1.setText("First number"); num2.setText("Second number"); num3.setText("Results"); number1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { number1ActionPerformed(evt); } }); Add.setText("Add"); Add.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { AddActionPerformed(evt); } }); Subtract.setText("Subtract"); Subtract.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { SubtractActionPerformed(evt); } }); Multiply.setText("Multiply"); Multiply.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { MultiplyActionPerformed(evt); } }); Divide.setText("Divide"); Divide.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { DivideActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup() .addGap(54, 54, 54) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(num1) .addComponent(num2) .addComponent(num3)) .addGap(115, 115, 115) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(number1) .addComponent(number2) .addComponent(resultBox))) .addGroup(layout.createSequentialGroup() .addGap(37, 37, 37) .addComponent(Add) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(Subtract) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(Multiply) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(Divide))) .addContainerGap(79, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(56, 56, 56) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(num1) .addComponent(number1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(44, 44, 44) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(num2) .addComponent(number2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(38, 38, 38) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(num3) .addComponent(resultBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 40, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(Add) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Subtract) .addComponent(Multiply) .addComponent(Divide))) .addGap(39, 39, 39)) ); 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 kunde() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public MusteriEkle() {\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 UploadForm() {\n initComponents();\n }", "public FormHorarioSSE() {\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 JFrmPrincipal() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\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.73197734", "0.72914416", "0.72914416", "0.72914416", "0.72862023", "0.72487676", "0.7213741", "0.7207628", "0.7196503", "0.7190263", "0.71850693", "0.71594703", "0.7147939", "0.7093137", "0.70808756", "0.70566356", "0.6987119", "0.69778043", "0.6955563", "0.6953879", "0.6945632", "0.6943359", "0.69363457", "0.6931661", "0.6927987", "0.6925778", "0.6925381", "0.69117576", "0.6911631", "0.68930036", "0.6892348", "0.6890817", "0.68904495", "0.6889411", "0.68838716", "0.6881747", "0.6881229", "0.68778914", "0.6876094", "0.6874808", "0.68713", "0.6859444", "0.6856188", "0.68556464", "0.6855074", "0.68549985", "0.6853093", "0.6853093", "0.68530816", "0.6843091", "0.6837124", "0.6836549", "0.6828579", "0.68282986", "0.68268806", "0.682426", "0.6823653", "0.6817904", "0.68167645", "0.68102163", "0.6808751", "0.680847", "0.68083245", "0.6807882", "0.6802814", "0.6795573", "0.6794048", "0.6792466", "0.67904556", "0.67893785", "0.6789265", "0.6788365", "0.67824304", "0.6766916", "0.6765524", "0.6765339", "0.67571205", "0.6755559", "0.6751974", "0.67510027", "0.67433685", "0.67390305", "0.6737053", "0.673608", "0.6733373", "0.67271507", "0.67262334", "0.67205364", "0.6716807", "0.67148036", "0.6714143", "0.67090863", "0.67077154", "0.67046666", "0.6701339", "0.67006236", "0.6699842", "0.66981244", "0.6694887", "0.6691074", "0.66904294" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { ArrayList<Integer> arr = new ArrayList<>(); for(int i = 1; i <= 10; i++) { arr.add(i); } arr.set(4, 10); arr.remove(3); for(int i : arr) { System.out.println(i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
creates a new external document associated with file 'fileName'. The format of the file is given by 'format'. At present on the format 'sgml' (a file with SGML markup which is to be converted to annotations) is recognized.
public ExternalDocument (String format, String fileName) { this.format = format; this.directory = null; this.fileName = fileName; this.open = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static RDFFormat syntaxForFileName(String fileName) {\n\t\treturn RDFFormat.forFileName(fileName, RDFFormat.RDFXML);\n\t}", "public String buildWithFileFormat(String fileFormat) {\n StringBuilder strBuilder = startBuild()\n .append(\" STORED AS \")\n .append(fileFormat);\n\n return finishBuild(strBuilder);\n }", "public SLDStyle(String filename) {\n \n File f = new File(filename);\n setInput(f);\n readXML();\n }", "Object create(File file) throws IOException, SAXException, ParserConfigurationException;", "public void save () {\n\t\tif (!open) {\n\t\t\tSystem.out.println (\"ExternalDocument.save: attempt to save unopened document \" + fileName);\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tif (format.equals(\"sgml\")) {\n\t\t\t\tString tagToWrite;\n\t\t\t\tif (allTags)\n\t\t\t\t\ttagToWrite = null;\n\t\t\t\telse if (SGMLtags.length == 0)\n\t\t\t\t\ttagToWrite = \"***\"; // unused annotation type\n\t\t\t\telse if (SGMLtags.length == 1)\n\t\t\t\t\ttagToWrite = SGMLtags[0];\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println (\"ExternalDocument.save: cannot write more than 1 annotation type\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tString string = writeSGML(tagToWrite).toString();\n\t\t\t\tFile file = new File(fullFileName());\n\t\t\t\tBufferedWriter writer = new BufferedWriter (\n\t\t\t\t\t\tnew OutputStreamWriter (new FileOutputStream(file), JetTest.encoding));\n\t\t\t\twriteWithSystemNewlines (writer, string);\n\t\t\t\twriter.close();\n\t\t\t} else {\n\t\t\t\t\tSystem.out.println (\"Error saving document \" + fileName);\n\t\t\t\t\tSystem.out.println (\"Unknown document format.\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println (\"Error opening document \" + fileName);\n\t\t\t\tSystem.out.println (e);\n\t\t}\n\t}", "public boolean open() {\n\t\tif (!open) {\n\t\t\ttry {\n\t\t\t\tif (format.equals(\"sgml\")) {\n\t\t\t\t\tFile file = new File(fullFileName());\t//return the full file name,including directory and filename\n\t\t\t\t\tString line;\n\t\t\t\t\tBufferedReader reader = new BufferedReader (\n\t\t\t\t\t\t// (new FileReader(file));\n\t\t\t\t\t\tnew InputStreamReader (new FileInputStream(file), JetTest.encoding));\n\t\t\t\t\tStringBuffer fileText = new StringBuffer();\t\t//store all text in filename\n\t\t\t\t\twhile((line = reader.readLine()) != null)\n\t\t\t\t\t\tfileText.append(line + \"\\n\");\n\t\t\t\t\tString text = fileText.toString(); //Store the converted text\n\t\t\t\t\tSGMLProcessor.allTags = allTags;\t\n\t\t\t\t\tSGMLProcessor.emptyTags = emptyTags;\n\t\t\t\t\tDocument doc = SGMLProcessor.sgmlToDoc (this, text, SGMLtags);\t//Because format.equals(\"sgml\")\n\t\t\t\t\topen = true;\n\t\t\t\t\treturn true;\n\t\t\t\t} else if (format.equals(\"pos\")) {\n\t\t\t\t\tposRead();\n\t\t\t\t\topen = true;\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println (\"Error opening document \" + fileName);\n\t\t\t\t\tSystem.out.println (\"Unknown document format.\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\t\tSystem.out.println (\"Error opening document \" + fileName);\n\t\t\t\t\tSystem.out.println (e);\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\t// return true if already open\n\t\t\treturn true;\n\t\t}\n\t}", "private void createDOCDocument(String from, File file) throws Exception {\n\t\tPOIFSFileSystem fs = new POIFSFileSystem(Thread.currentThread().getClass().getResourceAsStream(\"/poi/template.doc\"));\n\t\tHWPFDocument doc = new HWPFDocument(fs);\n\t\n\t\tRange range = doc.getRange();\n\t\tParagraph par1 = range.getParagraph(0);\n\t\n\t\tCharacterRun run1 = par1.insertBefore(from, new CharacterProperties());\n\t\trun1.setFontSize(11);\n\t\tdoc.write(new FileOutputStream(file));\n\t}", "@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}", "public void newFileCreated(OpenDefinitionsDocument doc) { }", "public void newFileCreated(OpenDefinitionsDocument doc) { }", "void createNewInstance(String filename)\n {\n iIncomingLobsFactory = new incomingLobsFactory();\n iIncomingLobsFactory.setPackageName(\"com.loadSample\");\n \n // include schemaLocation hint for validation\n iIncomingLobsFactory.setXSDFileName(\"LoadSample.xsd\");\n \n // encoding for output document\n iIncomingLobsFactory.setEncoding(\"UTF8\");\n \n // encoding tag for xml declaration\n iIncomingLobsFactory.setEncodingTag(\"UTF-8\");\n \n // Create the root element in the document using the specified root element name\n iIncomingLobs = (incomingLobs) iIncomingLobsFactory.createRoot(\"incomingLobs\");\n createincomingLobs();\n \n iIncomingLobsFactory.save(filename);\n }", "FileReference createFile(String fileName, String toolId);", "public static SymbolDocumentInfo symbolDocument(String fileName, UUID language) { throw Extensions.todo(); }", "public PdfAValidator createValidatorInstance(String format, ValidatorConfig conf)\n throws ValidationException {\n\n\tif (conf == null) {\n\t return createValidatorInstance(format);\n\t}\n \n if (PDF_A_1_b.equals(format)) {\n return new PdfA1bValidator(conf);\n } else {\n throw new ValidationException(\"Unknown pdf format : \" + format);\n }\n }", "String documentFormat();", "public static Document parse(String filename) throws ParserException {\n\t\t// TODO YOU MUST IMPLEMENT THIS\n\t\t// girish - All the code below is mine\n\t\t\t\n\t\t// Creating the object for the new Document\n\t\t\n\t\t\n\t\tif (filename == null){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t\n\t\t// Variable indexPos to track the current pointer location in the String Array\n\t\tint indexPos = 0;\n\t\t\n\t\t// Creating an instance of the document class to store the parsed content\n\t\tDocument d = new Document();\n\t\t\n\t\t// to store the result sent from the regexAuthor method and regexPlaceDate method\n\t\tObject[] resultAuthor = {null, null, null};\n\t\tObject[] resultPlaceDate = {null, null, null};\n\t\tStringBuilder news = new StringBuilder();\n\t\t\n\t\t// Next 4 lines contains the code to get the fileID and Category metadata\n\t\tString[] fileCat = new String[2];\n\t\t\n\t\tfileCat = regexFileIDCat(\"/((?:[a-z]|-)+)/([0-9]{7})\", filename);\n\t\t// System.out.println(filename);\n\t\t// throw an exception if the file is blank, junk or null\n\t\tif (fileCat[0] == null){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\td.setField(FieldNames.CATEGORY, fileCat[0]);\n\t\td.setField(FieldNames.FILEID, fileCat[1]);\n\t\t\n\t\t\n\t\t// Now , parsing the file\n\t\tFile fileConnection = new File(filename);\n\t\t\n\t\t// newscollated - it will store the parsed file content on a line by line basis\n\t\tArrayList<String> newscollated = new ArrayList<String>();\n\t\t\n\t\t// String that stores the content obtained from the . readline() operation\n\t\tString temp = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\t\n\t\t\tBufferedReader getInfo = new BufferedReader(new FileReader(fileConnection));\n\t\t\twhile ((temp = getInfo.readLine()) != null)\n\t\t\t{\n\t\t\t\tif(temp.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\n\t\t\t\t\ttemp = temp + \" \";\n\t\t\t\t\tnewscollated.add(temp);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tgetInfo.close();\n\t\t\t\n\t\t\t//-- deprecated (REMOVE THIS IF OTHER WORKS)\n\t\t\t// setting the title using the arraylist's 0th index element\n\t\t\t//d.setField(FieldNames.TITLE, newscollated.get(0));\n\t\t\t\n\t\t\t// Appending the lines into one big string using StringBuilder\n\t\t\t\n\t\t\tfor (String n: newscollated)\n\t\t\t{\n\t\t\t\tnews.append(n);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// Obtaining the TITLE of the file\n\t\t\tObject[] titleInfo = new Object[2];\n\t\t\t\n\t\t\ttitleInfo = regexTITLE(\"([^a-z]+)\\\\s{2,}\", news.toString());\n\t\t\td.setField(FieldNames.TITLE, titleInfo[0].toString().trim());\n\t\t\tindexPos = (Integer) titleInfo[1];\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// Getting the Author and Author Org\n\t\t\tresultAuthor = regexAuthor(\"<AUTHOR>(.*)</AUTHOR>\", news.toString());\n\t\t\t\n\t\t\tif (resultAuthor[0] != null)\n\t\t\t{\n\t\t\t\td.setField(FieldNames.AUTHOR, resultAuthor[0].toString());\n\t\t\t}\n\t\t\t\n\t\t\tif (resultAuthor[1] != null)\n\t\t\t{\n\t\t\t\td.setField(FieldNames.AUTHORORG, resultAuthor[1].toString());\n\t\t\t}\n\t\t \n\t\t \n\t\t \n\t\t if ((Integer) resultAuthor[2] != 0)\n\t\t {\n\t\t \tindexPos = (Integer) resultAuthor[2];\n\t\t }\n\t\t\t\n\t\t \n\t\t \n\t\t // Getting the Place and Date\n \t\t\tresultPlaceDate = regexPlaceDate(\"\\\\s{2,}(.+),\\\\s(?:([A-Z][a-z]+\\\\s[0-9]{1,})\\\\s{1,}-)\", news.toString());\n \t\t\t\n \t\t\tif (resultPlaceDate[0] != null)\n \t\t\t{\n \t\t\t\td.setField(FieldNames.PLACE, resultPlaceDate[0].toString().trim());\n \t\t\t}\n \t\t \n \t\t\tif (resultPlaceDate[1] != null)\n \t\t\t{\n \t\t\t\td.setField(FieldNames.NEWSDATE, resultPlaceDate[1].toString().trim());\n \t\t\t}\n \t\t\t\n \t\t // getting the content\n \t\t \n \t\t if ((Integer) resultPlaceDate[2] != 0)\n\t\t {\n\t\t \tindexPos = (Integer) resultPlaceDate[2];\n\t\t }\n \t\t \n \t\t \n \t\t d.setField(FieldNames.CONTENT, news.substring(indexPos + 1));\n \t\t \n \t\t return d;\n \t\t \n\t\t \n\t\t \n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(FileNotFoundException e){\n\t\t\tthrow new ParserException();\n\t\t\t\n\t\t}\n\n\t\tcatch(IOException e){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\treturn d;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "private void createSource(String sourceName, String content) {\n\t\t\n\t}", "public static Document fileToSciXML(File f) throws Exception {\n\t\tString name = f.getName();\n\t\tif(name.endsWith(\".xml\")) {\n\t\t\tDocument doc = new Builder().build(f);\n\t\t\t/* is this an RSC document? */\n\t\t\tif(PubXMLToSciXML.isRSCDoc(doc)) {\n\t\t\t\tPubXMLToSciXML rtsx = new PubXMLToSciXML(doc);\n\t\t\t\tdoc = rtsx.getSciXML();\n\t\t\t}\n\t\t\treturn doc;\n\t\t} else if(name.endsWith(\".html\") || name.endsWith(\".htm\")) {\n\t\t\treturn TextToSciXML.textToSciXML(HtmlCleaner.cleanHTML(FileTools.readTextFile(f)));\n\t\t} else if(name.matches(\"source_file_\\\\d+_\\\\d+.src\")) {\n\t\t\treturn TextToSciXML.bioIEAbstractToXMLDoc(FileTools.readTextFile(f));\n\t\t} else {\n\t\t\t/* Assume plain text */\n\t\t\treturn TextToSciXML.textToSciXML(FileTools.readTextFile(f));\n\t\t}\n\t}", "public static Document parse(String filename) throws ParserException {\n\t\tif (filename == null) {\n\t\t\tthrow new ParserException();\n\t\t}\n\t\tFile file = new File(filename);\n\t\tif (!file.exists() || !file.isFile()) {\n\t\t\tthrow new ParserException();\n\t\t}\n\t\tFile subDir = file.getParentFile();\n\t\tif (!subDir.exists() || !subDir.isDirectory()) {\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t// Document should be valid by here\n\t\tDocument doc = new Document();\n\t\tFieldNames field = FieldNames.TITLE;\n\t\tList<String> authors = new LinkedList<String>();\n\t\tString content = new String();\n\t\tboolean startContent = false;\n\n\t\tdoc.setField(FieldNames.FILEID, file.getName());\n\t\tdoc.setField(FieldNames.CATEGORY, subDir.getName());\n\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(file));\n\t\t\tString line = reader.readLine();\n\n\t\t\twhile (line != null) {\n\t\t\t\tif (!line.isEmpty()) {\n\t\t\t\t\tswitch (field) {\n\t\t\t\t\tcase TITLE:\n\t\t\t\t\t\tdoc.setField(field, line);\n\t\t\t\t\t\tfield = FieldNames.AUTHOR;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase AUTHOR:\n\t\t\t\t\tcase AUTHORORG:\n\t\t\t\t\t\tif (line.startsWith(\"<AUTHOR>\") || !authors.isEmpty()) {\n\t\t\t\t\t\t\tString[] seg = null;\n\t\t\t\t\t\t\tString[] author = null;\n\n\t\t\t\t\t\t\tline = line.replace(\"<AUTHOR>\", \"\");\n\t\t\t\t\t\t\tseg = line.split(\",\");\n\t\t\t\t\t\t\tauthor = seg[0].split(\"and\");\n\t\t\t\t\t\t\tauthor[0] = author[0].replaceAll(\"BY|By|by\", \"\");\n\t\t\t\t\t\t\t// Refines author names\n\t\t\t\t\t\t\tfor (int i = 0; i < author.length; ++i) {\n\t\t\t\t\t\t\t\tauthor[i] = author[i].trim();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tauthor[author.length - 1] = author[author.length - 1]\n\t\t\t\t\t\t\t\t\t.replace(\"</AUTHOR>\", \"\").trim();\n\t\t\t\t\t\t\tauthors.addAll(Arrays.asList(author));\n\n\t\t\t\t\t\t\t// Saves author organization\n\t\t\t\t\t\t\tif (seg.length > 1) {\n\t\t\t\t\t\t\t\tdoc.setField(FieldNames.AUTHORORG, seg[1]\n\t\t\t\t\t\t\t\t\t\t.replace(\"</AUTHOR>\", \"\").trim());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (line.endsWith(\"</AUTHOR>\")) {\n\t\t\t\t\t\t\t\t// Saves author\n\t\t\t\t\t\t\t\tdoc.setField(FieldNames.AUTHOR, authors\n\t\t\t\t\t\t\t\t\t\t.toArray(new String[authors.size()]));\n\t\t\t\t\t\t\t\tfield = FieldNames.PLACE;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// This should be a PLACE\n\t\t\t\t\t\t\tfield = FieldNames.PLACE;\n\t\t\t\t\t\t}\n\t\t\t\t\tcase PLACE:\n\t\t\t\t\t\tif (!line.contains(\"-\")) {\n\t\t\t\t\t\t\tfield = FieldNames.CONTENT;\n\t\t\t\t\t\t\tstartContent = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tString[] seg = line.split(\"-\");\n\t\t\t\t\t\t\tString[] meta = seg[0].split(\",\");\n\t\t\t\t\t\t\tif (seg.length != 0 && !seg[0].isEmpty()) {\n\n\t\t\t\t\t\t\t\tif (meta.length > 1) {\n\t\t\t\t\t\t\t\t\tdoc.setField(\n\t\t\t\t\t\t\t\t\t\t\tFieldNames.PLACE,\n\t\t\t\t\t\t\t\t\t\t\tseg[0].substring(0,\n\t\t\t\t\t\t\t\t\t\t\t\t\tseg[0].lastIndexOf(\",\"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t.trim());\n\t\t\t\t\t\t\t\t\tdoc.setField(FieldNames.NEWSDATE,\n\t\t\t\t\t\t\t\t\t\t\tmeta[meta.length - 1].trim());\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmeta[0] = meta[0].trim();\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tnew SimpleDateFormat(\"MMM d\",\n\t\t\t\t\t\t\t\t\t\t\t\tLocale.ENGLISH).parse(meta[0]);\n\t\t\t\t\t\t\t\t\t\t// This is a news date\n\t\t\t\t\t\t\t\t\t\tdoc.setField(FieldNames.NEWSDATE,\n\t\t\t\t\t\t\t\t\t\t\t\tmeta[0]);\n\t\t\t\t\t\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t\t\t\t\t\t// This is a place\n\t\t\t\t\t\t\t\t\t\tdoc.setField(FieldNames.PLACE, meta[0]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfield = FieldNames.CONTENT;\n\t\t\t\t\tcase CONTENT:\n\t\t\t\t\t\tif (!startContent) {\n\t\t\t\t\t\t\t// First line of content\n\t\t\t\t\t\t\tString[] cont = line.split(\"-\");\n\t\t\t\t\t\t\tif (cont.length > 1) {\n\t\t\t\t\t\t\t\tfor (int i = 1; i < cont.length; ++i) {\n\t\t\t\t\t\t\t\t\tcontent += cont[i];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstartContent = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontent += \" \" + line;\n\t\t\t\t\t\t}\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tline = reader.readLine();\n\t\t\t}\n\t\t\tdoc.setField(FieldNames.CONTENT, content);\n\t\t\tdoc.setField(FieldNames.LENGTH, Integer.toString(content.trim().split(\"\\\\s+\").length));\n\t\t\treader.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new ParserException();\n\t\t}\n\n\t\treturn doc;\n\t}", "public PdfAValidator createValidatorInstance(String format)\n throws ValidationException {\n if (PDF_A_1_b.equals(format)) {\n return new PdfA1bValidator(getStandardPDFA1BConfiguration());\n } else {\n throw new ValidationException(\"Unknown pdf format : \" + format);\n }\n }", "@UML(identifier=\"fileFormat\", obligation=MANDATORY, specification=ISO_19139)\n Format getFileFormat();", "FileFormat getFormat();", "private void createDocs() {\n\t\t\n\t\tArrayList<Document> docs=new ArrayList<>();\n\t\tString foldername=\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\input\";\n\t\tFile folder=new File(foldername);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tfor (File file : listOfFiles) {\n\t\t\ttry {\n\t\t\t\tFileInputStream fisTargetFile = new FileInputStream(new File(foldername+\"\\\\\"+file.getName()));\n\t\t\t\tString fileContents = IOUtils.toString(fisTargetFile, \"UTF-8\");\n\t\t\t\tString[] text=fileContents.split(\"ParseText::\");\n\t\t\t\tif(text.length>1){\n\t\t\t\t\tString snippet=text[1].trim().length()>100 ? text[1].trim().substring(0, 100): text[1].trim();\n\t\t\t\t\tDocument doc=new Document();\n\t\t\t\t\tdoc.setFileName(file.getName().replace(\".txt\", \"\"));\n\t\t\t\t\tdoc.setUrl(text[0].split(\"URL::\")[1].trim());\n\t\t\t\t\tdoc.setText(snippet+\"...\");\n\t\t\t\t\tdocs.add(doc);\n\t\t\t\t}\n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\t\n\t\t}\t\n\t\tDBUtil.insertDocs(docs);\n\t}", "IDocument getDocument(File file);", "FileContent createFileContent();", "public static SymbolDocumentInfo symbolDocument(String fileName, UUID language, UUID vendor) { throw Extensions.todo(); }", "public static Document newDocument(final URI uri, boolean useNamespaces) throws IOException, XMLException {\n\t\tString scheme = uri.getScheme();\n\t\tif(scheme==null || scheme.equals(\"file\") || scheme.equals(\"\")){\n\t\t\treturn newDocument(new File(uri), useNamespaces);\n\t\t}else{\n\t\t\treturn newDocument(uri.toURL(), useNamespaces);\n\t\t}\n\t}", "public interface GPMLFormatVersion {\n\n\t/**\n\t * Returns the GPML namespace.\n\t */\n\tNamespace getGpmlNamespace();\n\n\t/**\n\t * Returns the GPML schema file.\n\t */\n\tString getSchemaFile();\n\n\t/**\n\t * Validates a JDOM document against the xml-schema definition specified by\n\t * 'xsdFile'\n\t *\n\t * @param doc the document to validate\n\t */\n\tvoid validateDocument(Document doc) throws ConverterException;\n}", "GmMacro createGmMacro(File file) throws IOException, SAXException, ParserConfigurationException;", "public Document load(final String filename) throws IOException, SAXException {\n final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n factory.setNamespaceAware(true);\n final DocumentBuilder builder;\n try {\n builder = factory.newDocumentBuilder();\n } catch (final ParserConfigurationException pce) {\n pce.printStackTrace();\n return null;\n }\n final InputStream inputStream = getClass().getResourceAsStream(filename);\n if (inputStream != null) {\n // for files found in JARs\n return builder.parse(inputStream);\n } else {\n // for files directly on the file system\n return builder.parse(new File(filename));\n }\n }", "@GetMapping(\"/create\")\n public String create(@RequestParam(\"fileExt\")\n final String fileExt, // create a sample file of the specified extension\n @RequestParam(value = \"sample\", required = false) final Optional<Boolean> isSample,\n @CookieValue(value = \"uid\", required = false) final String uid,\n final Model model) {\n Boolean sampleData = (isSample.isPresent() && !isSample.isEmpty()) && isSample.get();\n if (fileExt != null) {\n try {\n Optional<User> user = userService.findUserById(Integer.parseInt(uid)); // find a user by their ID\n if (!user.isPresent()) {\n // if the user with the specified ID doesn't exist, an error occurs\n throw new RuntimeException(\"Could not fine any user with id = \" + uid);\n }\n String fileName = documentManager.createDemo(fileExt,\n sampleData,\n uid,\n user.get().getName()); // create a demo document with the sample data\n if (fileName.isBlank() || fileName == null) {\n throw new RuntimeException(\"You must have forgotten to add asset files\");\n }\n return \"redirect:editor?fileName=\" + URLEncoder\n .encode(fileName, StandardCharsets.UTF_8); // redirect the request\n } catch (Exception ex) {\n model.addAttribute(\"error\", ex.getMessage());\n return \"error.html\";\n }\n }\n return \"redirect:/\";\n }", "public static Document parse(String filename) throws ParserException {\n\n\t\tString FileID, Category, Title = null, Author = null, AuthorOrg = null, Place = null, NewsDate = null, Content = null, FileN;\n\t\tDocument d = new Document();\n\t\tif (filename == null || filename == \"\")\n\t\t\tthrow new ParserException();\n\t\tFileN = filename;\n\t\tHashMap<Integer, String> map = new HashMap<Integer, String>();\n\t\tBufferedReader r = null;\n\t\tFile file = new File(FileN);\n\t\tif (!file.exists())\n\t\t\tthrow new ParserException();\n\t\tFileID = file.getName();\n\t\tCategory = file.getParentFile().getName();\n\t\ttry {\n\t\t\tr = new BufferedReader(new FileReader(file));\n\t\t\tint i = 1, j = 3;\n\t\t\tBoolean isTitle = true, hasAuthor = false;\n\t\t\tString line;\n\t\t\twhile ((line = r.readLine()) != null) {\n\t\t\t\tline = line.trim();\n\t\t\t\tif (!line.equals(\"\")) {\n\t\t\t\t\tmap.put(i, line);\n\t\t\t\t\tif (isTitle) {\n\t\t\t\t\t\tTitle = line;\n\t\t\t\t\t\tisTitle = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (hasAuthor == false && i == 2) {\n\t\t\t\t\t\tPattern pattern = Pattern\n\t\t\t\t\t\t\t\t.compile(\"<AUTHOR>(.+?)</AUTHOR>\");\n\t\t\t\t\t\tMatcher matcher = pattern.matcher(line);\n\t\t\t\t\t\tif (matcher.find()) {\n\t\t\t\t\t\t\tAuthor = matcher.group(1).replace(\"BY\", \"\");\n\t\t\t\t\t\t\tAuthorOrg = Author.substring(\n\t\t\t\t\t\t\t\t\tAuthor.lastIndexOf(\",\") + 1).trim();\n\t\t\t\t\t\t\tAuthor = Author.split(\",\")[0].trim();\n\t\t\t\t\t\t\thasAuthor = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!hasAuthor && i == 2) {\n\t\t\t\t\t\tString[] str = checkPlace(line);\n\t\t\t\t\t\tContent = str[0];\n\t\t\t\t\t\tPlace = str[1];\n\t\t\t\t\t\tNewsDate = str[2];\n\t\t\t\t\t} else if (hasAuthor && i == 3) {\n\t\t\t\t\t\tString[] str = checkPlace(line);\n\t\t\t\t\t\tContent = str[0];\n\t\t\t\t\t\tPlace = str[1];\n\t\t\t\t\t\tNewsDate = str[2];\n\t\t\t\t\t\tj = 4;\n\t\t\t\t\t}\n\t\t\t\t\tif (i >= j) {\n\t\t\t\t\t\tContent = Content + map.get(i) + \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tr.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (Author != null) {\n\t\t\tAuthor = Author.replace(\"By\", \"\").trim();\n\t\t\td.setField(FieldNames.AUTHOR, Author);\n\t\t\td.setField(FieldNames.AUTHORORG, AuthorOrg);\n\t\t} \n\t\td.setField(FieldNames.FILEID, FileID);\n\t\td.setField(FieldNames.CATEGORY, Category);\n\t\td.setField(FieldNames.TITLE, Title);\n\t\td.setField(FieldNames.PLACE, Place);\n\t\td.setField(FieldNames.NEWSDATE, NewsDate);\n\t\td.setField(FieldNames.CONTENT, Content);\n\n\t\treturn d;\n\t}", "public XGMMLReader(String fileName) {\n \t\ttry {\n \t\t\tnetworkStream = new FileInputStream(fileName);\n \t\t} catch (FileNotFoundException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\tinitialize();\n \t}", "public static void main(String[] args) throws Exception {\n \tString filename = null;\n \tboolean dtdValidate = false;\n \tboolean xsdValidate = false;\n \tString schemaSource = null;\n \t\n \targs[1] = \"/home/users/xblepa/git/labs/java/parser/src/test/data/personal-schema.xml\";\n \n boolean ignoreWhitespace = false;\n boolean ignoreComments = false;\n boolean putCDATAIntoText = false;\n boolean createEntityRefs = false;\n\n\t\t \n\t\tfor (int i = 0; i < args.length; i++) {\n\t\t if (args[i].equals(\"-dtd\")) { \n\t\t \t\tdtdValidate = true;\n\t\t } \n\t\t else if (args[i].equals(\"-xsd\")) {\n\t\t \txsdValidate = true;\n\t\t } \n\t\t else if (args[i].equals(\"-xsdss\")) {\n\t\t if (i == args.length - 1) {\n\t\t usage();\n\t\t }\n\t\t xsdValidate = true;\n\t\t schemaSource = args[++i];\n\t\t }\n\t\t else if (args[i].equals(\"-ws\")) {\n\t ignoreWhitespace = true;\n\t } \n\t else if (args[i].startsWith(\"-co\")) {\n\t ignoreComments = true;\n\t }\n\t else if (args[i].startsWith(\"-cd\")) {\n\t putCDATAIntoText = true;\n\t } \n\t else if (args[i].startsWith(\"-e\")) {\n\t createEntityRefs = true;\n\t // ...\n\t } \n\t\t else {\n\t\t filename = args[i];\n\t\t if (i != args.length - 1) {\n\t\t usage();\n\t\t }\n\t\t }\n\t\t}\n\t\t\n\t\tif (filename == null) {\n\t\t usage();\n\t\t}\n\t \t\n // Next, add the following code to the main() method, to obtain an instance of a factory that can give us a document builder.\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n \n dbf.setNamespaceAware(true);\n dbf.setValidating(dtdValidate || xsdValidate);\n \n // Now, add the following code to main() to get an instance of a builder, and use it to parse the specified file.\n DocumentBuilder db = dbf.newDocumentBuilder(); \n \n // The following code configures the document builder to use the error handler defined in Handle Errors. \n OutputStreamWriter errorWriter = new OutputStreamWriter(System.err,outputEncoding);\n db.setErrorHandler(new MyErrorHandler (new PrintWriter(errorWriter, true)));\n\n \n Document doc = db.parse(new File(filename)); \n \n }", "public abstract WalkerDocument newDocument(String path, IOptions options) throws HtmlWalkerException;", "public static Document newDocument(final File file, boolean useNamespaces) throws IOException, XMLException {\n\t\tfinal InputStream in = new FileInputStream(file);\n\t\treturn XMLHelper.parse(in, useNamespaces);\n\t}", "public ActionScriptBuilder createFile(String filecontents, String filepath){\n\t\treturn createFile(filecontents,filepath,true);\n\t}", "Object create(Document doc) throws IOException, SAXException, ParserConfigurationException;", "FileNameReference createFileNameReference();", "private Font(File fontFile, int fontFormat,\n boolean isCopy, CreatedFontTracker tracker)\n throws FontFormatException {\n\tthis.createdFont = true;\n\t/* Font2D instances created by this method track their font file\n\t * so that when the Font2D is GC'd it can also remove the file.\n\t */\n\tthis.font2DHandle =\n\t FontManager.createFont2D(fontFile, fontFormat,\n isCopy, tracker).handle;\n\n\tthis.name = this.font2DHandle.font2D.getFontName(Locale.getDefault());\n\tthis.style = Font.PLAIN;\n\tthis.size = 1;\n\tthis.pointSize = 1f;\n }", "public Document getDocFromFile(String filename)\r\n throws ParserConfigurationException{\r\n {\r\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder db = dbf.newDocumentBuilder();\r\n Document doc = null;\r\n try{\r\n doc = db.parse(filename);\r\n }\r\n catch (Exception ex){\r\n System.out.println(\"XML parse failure\");\r\n ex.printStackTrace();\r\n }\r\n return doc;\r\n } \r\n }", "public abstract WalkerDocument newDocument(IOptions options);", "public void open(){\n\t\ttry {\n\t\t\tdocFactory = DocumentBuilderFactory.newInstance();\n\t\t\tdocBuilder = docFactory.newDocumentBuilder();\n\t\t\tdoc = docBuilder.parse(ManipXML.class.getResourceAsStream(path));\n\t\t\t\n\t\t} catch (ParserConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SAXException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public boolean checkDocument(String fileName) throws IOException;", "public BusinessObjectFormat createBusinessObjectFormat(BusinessObjectFormatCreateRequest businessObjectFormatCreateRequest);", "public static SymbolDocumentInfo symbolDocument(String filename, UUID language, UUID vendor, UUID documentType) { throw Extensions.todo(); }", "private static Document processFile(String filename, String mode) throws Exception {\t\t\n\t\t// First make sure the properties file is loaded...\n\t\tOscar3Props.getInstance();\n\t\tDocument doc;\n\n\t\tPubXMLToSciXML ptsx = null;\n\t\t\n\t\tif(mode.equals(\"Process\") || mode.equals(\"SAF\") || mode.equals(\"Data\")) {\n\t\t\tSystem.out.println(\"Loading file...\");\n\t\t\tdoc = ToSciXML.fileToSciXML(new File(filename));\n\t\t} else if(mode.equals(\"RoundTrip\")) {\n\t\t\tptsx = new PubXMLToSciXML(new Builder().build(new File(filename)));\n\t\t\tdoc = ptsx.getSciXML();\n\t\t} else {\n\t\t\tthrow new Error(\"Mode not recognised\");\n\t\t}\n\t\t\n\t\tOscarFlow oscarFlow = new OscarFlow(doc);\n\n\t\tif(mode.equals(\"Process\")) {\n\t\t\toscarFlow.processLite();\n\t\t\treturn oscarFlow.getInlineXML();\n\t\t} else if(mode.equals(\"SAF\")) {\n\t\t\toscarFlow.processToSAF();\n\t\t\treturn oscarFlow.getSafXML();\n\t\t} else if(mode.equals(\"Data\")) {\n\t\t\toscarFlow.parseData();\n\t\t\treturn oscarFlow.getDataXML();\n\t\t} else if(mode.equals(\"RoundTrip\")) {\n\t\t\toscarFlow.processLite();\n\t\t\tptsx.setSciXMLDoc(oscarFlow.getInlineXML());\n\t\t\treturn ptsx.getAnnotatedPubXML();\n\t\t}\n\t\treturn null;\n\t}", "public interface WikiFileFactory {\n boolean isValidWikiFile(String fileContent);\n WikiFile createWikiFile(String path, String content);\n}", "@Override\r\n public String createTranlatedDocument(TopElement topElement, String filePath, boolean is) {\n return null;\r\n }", "public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n stylesheetEClass = createEClass(STYLESHEET);\n createEAttribute(stylesheetEClass, STYLESHEET__CHAR_SET);\n createEReference(stylesheetEClass, STYLESHEET__IMPORTS);\n createEReference(stylesheetEClass, STYLESHEET__STATEMENTS);\n\n cssTopLevelStatementEClass = createEClass(CSS_TOP_LEVEL_STATEMENT);\n\n cssOtherTopLevelDeclarationEClass = createEClass(CSS_OTHER_TOP_LEVEL_DECLARATION);\n\n importDeclarationEClass = createEClass(IMPORT_DECLARATION);\n createEAttribute(importDeclarationEClass, IMPORT_DECLARATION__IMPORT_URI);\n createEAttribute(importDeclarationEClass, IMPORT_DECLARATION__URL);\n createEAttribute(importDeclarationEClass, IMPORT_DECLARATION__MEDIA);\n\n mediaDeclarationEClass = createEClass(MEDIA_DECLARATION);\n createEReference(mediaDeclarationEClass, MEDIA_DECLARATION__MEDIA_QUERIES);\n createEReference(mediaDeclarationEClass, MEDIA_DECLARATION__MEDIA);\n createEReference(mediaDeclarationEClass, MEDIA_DECLARATION__MEMBERS);\n\n mediaDeclarationMembersEClass = createEClass(MEDIA_DECLARATION_MEMBERS);\n\n mediaQueryEClass = createEClass(MEDIA_QUERY);\n createEAttribute(mediaQueryEClass, MEDIA_QUERY__ONLY);\n createEAttribute(mediaQueryEClass, MEDIA_QUERY__NOT);\n createEAttribute(mediaQueryEClass, MEDIA_QUERY__MEDIA_TYPE);\n createEReference(mediaQueryEClass, MEDIA_QUERY__EXPRESSIONS);\n\n mediaQueryExpressionEClass = createEClass(MEDIA_QUERY_EXPRESSION);\n createEAttribute(mediaQueryExpressionEClass, MEDIA_QUERY_EXPRESSION__FEATURE);\n createEReference(mediaQueryExpressionEClass, MEDIA_QUERY_EXPRESSION__EXPRESSION);\n\n pageDeclarationEClass = createEClass(PAGE_DECLARATION);\n createEAttribute(pageDeclarationEClass, PAGE_DECLARATION__PSEUDO_PAGE);\n createEReference(pageDeclarationEClass, PAGE_DECLARATION__BODY);\n\n namespaceDeclarationEClass = createEClass(NAMESPACE_DECLARATION);\n createEAttribute(namespaceDeclarationEClass, NAMESPACE_DECLARATION__NAME);\n createEAttribute(namespaceDeclarationEClass, NAMESPACE_DECLARATION__URL);\n\n fontFaceDeclarationEClass = createEClass(FONT_FACE_DECLARATION);\n createEReference(fontFaceDeclarationEClass, FONT_FACE_DECLARATION__BODY);\n\n ruleSetEClass = createEClass(RULE_SET);\n createEReference(ruleSetEClass, RULE_SET__SELECTORS);\n createEReference(ruleSetEClass, RULE_SET__BODY);\n\n ruleSetBodyEClass = createEClass(RULE_SET_BODY);\n createEReference(ruleSetBodyEClass, RULE_SET_BODY__DECLARATIONS);\n\n propertyDeclarationEClass = createEClass(PROPERTY_DECLARATION);\n createEReference(propertyDeclarationEClass, PROPERTY_DECLARATION__VALUES_LISTS);\n\n knownPropertyDeclarationEClass = createEClass(KNOWN_PROPERTY_DECLARATION);\n createEAttribute(knownPropertyDeclarationEClass, KNOWN_PROPERTY_DECLARATION__NAME);\n\n unrecognizedPropertyDeclarationEClass = createEClass(UNRECOGNIZED_PROPERTY_DECLARATION);\n createEAttribute(unrecognizedPropertyDeclarationEClass, UNRECOGNIZED_PROPERTY_DECLARATION__NAME);\n\n propertyValuesListsEClass = createEClass(PROPERTY_VALUES_LISTS);\n createEReference(propertyValuesListsEClass, PROPERTY_VALUES_LISTS__LISTS);\n\n propertyValuesListEClass = createEClass(PROPERTY_VALUES_LIST);\n createEReference(propertyValuesListEClass, PROPERTY_VALUES_LIST__VALUES);\n\n propertyValueEClass = createEClass(PROPERTY_VALUE);\n createEReference(propertyValueEClass, PROPERTY_VALUE__VALUE);\n createEAttribute(propertyValueEClass, PROPERTY_VALUE__IMPORTANT);\n\n selectorEClass = createEClass(SELECTOR);\n\n simpleSelectorEClass = createEClass(SIMPLE_SELECTOR);\n\n typeSelectorEClass = createEClass(TYPE_SELECTOR);\n createEReference(typeSelectorEClass, TYPE_SELECTOR__NAMESPACE_PREFIX);\n createEAttribute(typeSelectorEClass, TYPE_SELECTOR__TYPE);\n\n namespacePrefixEClass = createEClass(NAMESPACE_PREFIX);\n createEReference(namespacePrefixEClass, NAMESPACE_PREFIX__NAMESPACE);\n\n universalSelectorEClass = createEClass(UNIVERSAL_SELECTOR);\n createEReference(universalSelectorEClass, UNIVERSAL_SELECTOR__NAMESPACE_PREFIX);\n\n attributeSelectorEClass = createEClass(ATTRIBUTE_SELECTOR);\n createEReference(attributeSelectorEClass, ATTRIBUTE_SELECTOR__ATTRIBUTE);\n createEAttribute(attributeSelectorEClass, ATTRIBUTE_SELECTOR__MATCHER);\n createEReference(attributeSelectorEClass, ATTRIBUTE_SELECTOR__VALUE);\n\n attributeEClass = createEClass(ATTRIBUTE);\n createEReference(attributeEClass, ATTRIBUTE__NAMESPACE_PREFIX);\n createEAttribute(attributeEClass, ATTRIBUTE__NAME);\n\n attributeValueLiteralEClass = createEClass(ATTRIBUTE_VALUE_LITERAL);\n\n idSelectorEClass = createEClass(ID_SELECTOR);\n createEAttribute(idSelectorEClass, ID_SELECTOR__NAME);\n\n classSelectorEClass = createEClass(CLASS_SELECTOR);\n createEAttribute(classSelectorEClass, CLASS_SELECTOR__NAME);\n\n pseudoSelectorEClass = createEClass(PSEUDO_SELECTOR);\n\n noArgsPseudoClassSelectorEClass = createEClass(NO_ARGS_PSEUDO_CLASS_SELECTOR);\n createEAttribute(noArgsPseudoClassSelectorEClass, NO_ARGS_PSEUDO_CLASS_SELECTOR__PSEUDO);\n\n pseudoElementSelectorEClass = createEClass(PSEUDO_ELEMENT_SELECTOR);\n createEAttribute(pseudoElementSelectorEClass, PSEUDO_ELEMENT_SELECTOR__DOUBLE_SEMI_COLON);\n createEAttribute(pseudoElementSelectorEClass, PSEUDO_ELEMENT_SELECTOR__PSEUDO);\n\n languagePseudoClassSelectorEClass = createEClass(LANGUAGE_PSEUDO_CLASS_SELECTOR);\n createEAttribute(languagePseudoClassSelectorEClass, LANGUAGE_PSEUDO_CLASS_SELECTOR__LANGUGAGE_ID);\n\n functionalPseudoClassSelectorEClass = createEClass(FUNCTIONAL_PSEUDO_CLASS_SELECTOR);\n createEAttribute(functionalPseudoClassSelectorEClass, FUNCTIONAL_PSEUDO_CLASS_SELECTOR__PSEUDO);\n createEReference(functionalPseudoClassSelectorEClass, FUNCTIONAL_PSEUDO_CLASS_SELECTOR__ARGUMENT);\n\n typeArgumentEClass = createEClass(TYPE_ARGUMENT);\n\n linearArgumentEClass = createEClass(LINEAR_ARGUMENT);\n createEReference(linearArgumentEClass, LINEAR_ARGUMENT__COEFFICIENT);\n createEAttribute(linearArgumentEClass, LINEAR_ARGUMENT__CONSTANT_SIGN);\n createEAttribute(linearArgumentEClass, LINEAR_ARGUMENT__CONSTANT);\n\n coefficientEClass = createEClass(COEFFICIENT);\n createEAttribute(coefficientEClass, COEFFICIENT__IDENT);\n createEAttribute(coefficientEClass, COEFFICIENT__INT);\n\n constantArgumentEClass = createEClass(CONSTANT_ARGUMENT);\n createEAttribute(constantArgumentEClass, CONSTANT_ARGUMENT__SIGN);\n createEAttribute(constantArgumentEClass, CONSTANT_ARGUMENT__INT);\n\n parityArgumentEClass = createEClass(PARITY_ARGUMENT);\n createEAttribute(parityArgumentEClass, PARITY_ARGUMENT__PARITY);\n\n negationSelectorEClass = createEClass(NEGATION_SELECTOR);\n createEReference(negationSelectorEClass, NEGATION_SELECTOR__SIMPLE_SELECTOR);\n\n valueLiteralEClass = createEClass(VALUE_LITERAL);\n\n numberLiteralEClass = createEClass(NUMBER_LITERAL);\n\n sizeLiteralEClass = createEClass(SIZE_LITERAL);\n\n stringLiteralEClass = createEClass(STRING_LITERAL);\n createEAttribute(stringLiteralEClass, STRING_LITERAL__VALUE);\n\n colorLiteralEClass = createEClass(COLOR_LITERAL);\n\n componentColorLiteralEClass = createEClass(COMPONENT_COLOR_LITERAL);\n\n colorComponentLiteralEClass = createEClass(COLOR_COMPONENT_LITERAL);\n createEReference(colorComponentLiteralEClass, COLOR_COMPONENT_LITERAL__NUMBER);\n createEAttribute(colorComponentLiteralEClass, COLOR_COMPONENT_LITERAL__PERCENTAGE);\n\n urlLiteralEClass = createEClass(URL_LITERAL);\n createEAttribute(urlLiteralEClass, URL_LITERAL__VALUE);\n\n bareWordLiteralEClass = createEClass(BARE_WORD_LITERAL);\n createEAttribute(bareWordLiteralEClass, BARE_WORD_LITERAL__BARE_WORD);\n\n functionCallLiteralEClass = createEClass(FUNCTION_CALL_LITERAL);\n createEAttribute(functionCallLiteralEClass, FUNCTION_CALL_LITERAL__FUNCTION);\n createEReference(functionCallLiteralEClass, FUNCTION_CALL_LITERAL__ARGUMENTS);\n\n descendantCombinatorEClass = createEClass(DESCENDANT_COMBINATOR);\n createEReference(descendantCombinatorEClass, DESCENDANT_COMBINATOR__LEFT);\n createEAttribute(descendantCombinatorEClass, DESCENDANT_COMBINATOR__WS_I);\n createEReference(descendantCombinatorEClass, DESCENDANT_COMBINATOR__RIGHT);\n\n childCombinatorEClass = createEClass(CHILD_COMBINATOR);\n createEReference(childCombinatorEClass, CHILD_COMBINATOR__LEFT);\n createEAttribute(childCombinatorEClass, CHILD_COMBINATOR__WS_L);\n createEAttribute(childCombinatorEClass, CHILD_COMBINATOR__WS_R);\n createEReference(childCombinatorEClass, CHILD_COMBINATOR__RIGHT);\n\n adjacentSiblingCombinatorEClass = createEClass(ADJACENT_SIBLING_COMBINATOR);\n createEReference(adjacentSiblingCombinatorEClass, ADJACENT_SIBLING_COMBINATOR__LEFT);\n createEAttribute(adjacentSiblingCombinatorEClass, ADJACENT_SIBLING_COMBINATOR__WS_L);\n createEAttribute(adjacentSiblingCombinatorEClass, ADJACENT_SIBLING_COMBINATOR__WS_R);\n createEReference(adjacentSiblingCombinatorEClass, ADJACENT_SIBLING_COMBINATOR__RIGHT);\n\n generalSiblingCombinatorEClass = createEClass(GENERAL_SIBLING_COMBINATOR);\n createEReference(generalSiblingCombinatorEClass, GENERAL_SIBLING_COMBINATOR__LEFT);\n createEAttribute(generalSiblingCombinatorEClass, GENERAL_SIBLING_COMBINATOR__WS_L);\n createEAttribute(generalSiblingCombinatorEClass, GENERAL_SIBLING_COMBINATOR__WS_R);\n createEReference(generalSiblingCombinatorEClass, GENERAL_SIBLING_COMBINATOR__RIGHT);\n\n simpleSelectorSequenceEClass = createEClass(SIMPLE_SELECTOR_SEQUENCE);\n createEReference(simpleSelectorSequenceEClass, SIMPLE_SELECTOR_SEQUENCE__HEAD);\n createEReference(simpleSelectorSequenceEClass, SIMPLE_SELECTOR_SEQUENCE__SIMPLE_SELECTORS);\n\n universalNamespacePrefixEClass = createEClass(UNIVERSAL_NAMESPACE_PREFIX);\n\n withoutNamespacePrefixEClass = createEClass(WITHOUT_NAMESPACE_PREFIX);\n\n stringAttributeValueLiteralEClass = createEClass(STRING_ATTRIBUTE_VALUE_LITERAL);\n createEAttribute(stringAttributeValueLiteralEClass, STRING_ATTRIBUTE_VALUE_LITERAL__VALUE);\n\n integerAttributeValueLiteralEClass = createEClass(INTEGER_ATTRIBUTE_VALUE_LITERAL);\n createEAttribute(integerAttributeValueLiteralEClass, INTEGER_ATTRIBUTE_VALUE_LITERAL__VALUE);\n\n decimalAttributeValueLiteralEClass = createEClass(DECIMAL_ATTRIBUTE_VALUE_LITERAL);\n createEAttribute(decimalAttributeValueLiteralEClass, DECIMAL_ATTRIBUTE_VALUE_LITERAL__VALUE);\n\n integerLiteralEClass = createEClass(INTEGER_LITERAL);\n createEAttribute(integerLiteralEClass, INTEGER_LITERAL__INT);\n\n decimalLiteralEClass = createEClass(DECIMAL_LITERAL);\n createEAttribute(decimalLiteralEClass, DECIMAL_LITERAL__DECIMAL);\n\n quantifiedSizeLiteralEClass = createEClass(QUANTIFIED_SIZE_LITERAL);\n createEReference(quantifiedSizeLiteralEClass, QUANTIFIED_SIZE_LITERAL__NUMBER);\n createEAttribute(quantifiedSizeLiteralEClass, QUANTIFIED_SIZE_LITERAL__DIMENSION);\n\n qualifiedSizeLiteralEClass = createEClass(QUALIFIED_SIZE_LITERAL);\n createEAttribute(qualifiedSizeLiteralEClass, QUALIFIED_SIZE_LITERAL__BAREWORD);\n\n fontHeightLiteralEClass = createEClass(FONT_HEIGHT_LITERAL);\n createEReference(fontHeightLiteralEClass, FONT_HEIGHT_LITERAL__FONT_HEIGHT);\n createEReference(fontHeightLiteralEClass, FONT_HEIGHT_LITERAL__LINE_HEIGHT);\n createEAttribute(fontHeightLiteralEClass, FONT_HEIGHT_LITERAL__LINE_HEIGHT_DIMENSION);\n\n rgbColorEClass = createEClass(RGB_COLOR);\n createEAttribute(rgbColorEClass, RGB_COLOR__RGB);\n\n namedColorEClass = createEClass(NAMED_COLOR);\n createEAttribute(namedColorEClass, NAMED_COLOR__COLOR);\n\n componentRGBColorEClass = createEClass(COMPONENT_RGB_COLOR);\n createEReference(componentRGBColorEClass, COMPONENT_RGB_COLOR__RED);\n createEReference(componentRGBColorEClass, COMPONENT_RGB_COLOR__GREEN);\n createEReference(componentRGBColorEClass, COMPONENT_RGB_COLOR__BLUE);\n\n componentRGBAlphaColorEClass = createEClass(COMPONENT_RGB_ALPHA_COLOR);\n createEReference(componentRGBAlphaColorEClass, COMPONENT_RGB_ALPHA_COLOR__RED);\n createEReference(componentRGBAlphaColorEClass, COMPONENT_RGB_ALPHA_COLOR__GREEN);\n createEReference(componentRGBAlphaColorEClass, COMPONENT_RGB_ALPHA_COLOR__BLUE);\n createEReference(componentRGBAlphaColorEClass, COMPONENT_RGB_ALPHA_COLOR__OPACITY);\n\n componentHSLColorEClass = createEClass(COMPONENT_HSL_COLOR);\n createEReference(componentHSLColorEClass, COMPONENT_HSL_COLOR__HUE);\n createEReference(componentHSLColorEClass, COMPONENT_HSL_COLOR__SATURATION);\n createEReference(componentHSLColorEClass, COMPONENT_HSL_COLOR__LIGHTNESS);\n\n componentHSLAlphaColorEClass = createEClass(COMPONENT_HSL_ALPHA_COLOR);\n createEReference(componentHSLAlphaColorEClass, COMPONENT_HSL_ALPHA_COLOR__HUE);\n createEReference(componentHSLAlphaColorEClass, COMPONENT_HSL_ALPHA_COLOR__SATURATION);\n createEReference(componentHSLAlphaColorEClass, COMPONENT_HSL_ALPHA_COLOR__LIGHTNESS);\n createEReference(componentHSLAlphaColorEClass, COMPONENT_HSL_ALPHA_COLOR__OPACITY);\n\n alphaLiteralEClass = createEClass(ALPHA_LITERAL);\n createEReference(alphaLiteralEClass, ALPHA_LITERAL__OPACITY);\n\n // Create enums\n knownPropertiesEEnum = createEEnum(KNOWN_PROPERTIES);\n attributeSelectorMatchersEEnum = createEEnum(ATTRIBUTE_SELECTOR_MATCHERS);\n noArgsPseudosEEnum = createEEnum(NO_ARGS_PSEUDOS);\n pseudoElementsEEnum = createEEnum(PSEUDO_ELEMENTS);\n functionalPseudoClassesEEnum = createEEnum(FUNCTIONAL_PSEUDO_CLASSES);\n paritiesEEnum = createEEnum(PARITIES);\n dimensionsEEnum = createEEnum(DIMENSIONS);\n colorNamesEEnum = createEEnum(COLOR_NAMES);\n }", "@Test\n public void testCreateDocumentWithContentStreamAndFileName() throws Exception {\n String filename = \"C:\\\\My Documents\\\\foo.txt\";\n ContentStream cs = new ContentStreamImpl(filename, \"text/plain\", Helper.FILE1_CONTENT);\n String id = objService.createDocument(repositoryId, createBaseDocumentProperties(\"bar.txt\", \"File\"),\n rootFolderId, cs, VersioningState.NONE, null, null, null, null);\n ObjectData data = getObject(id);\n assertEquals(id, data.getId());\n assertEquals(\"bar.txt\", getString(data, PropertyIds.NAME));\n assertEquals(\"bde9eb59c76cb432a0f8d02057a19923\", getString(data, NuxeoTypeHelper.NX_DIGEST));\n cs = objService.getContentStream(repositoryId, id, null, null, null, null);\n // check filename has been normalized\n assertEquals(\"foo.txt\", cs.getFileName());\n assertEquals(Helper.FILE1_CONTENT, Helper.read(cs.getStream(), \"UTF-8\"));\n }", "private IProgramElement createFileStructureNode(String sourceFilePath) {\n\t\tint lastSlash = sourceFilePath.lastIndexOf('\\\\');\n\t\tif (lastSlash == -1) {\n\t\t\tlastSlash = sourceFilePath.lastIndexOf('/');\n\t\t}\n\t\t// '!' is used like in URLs \"c:/blahblah/X.jar!a/b.class\"\n\t\tint i = sourceFilePath.lastIndexOf('!');\n\t\tint j = sourceFilePath.indexOf(\".class\");\n\t\tif (i > lastSlash && i != -1 && j != -1) {\n\t\t\t// we are a binary aspect in the default package\n\t\t\tlastSlash = i;\n\t\t}\n\t\tString fileName = sourceFilePath.substring(lastSlash + 1);\n\t\tIProgramElement fileNode = new ProgramElement(asm, fileName, IProgramElement.Kind.FILE_JAVA, new SourceLocation(new File(\n\t\t\t\tsourceFilePath), 1, 1), 0, null, null);\n\t\t// fileNode.setSourceLocation();\n\t\tfileNode.addChild(NO_STRUCTURE);\n\t\treturn fileNode;\n\t}", "public CreateDocumentRequest withDocumentFormat(String documentFormat) {\n setDocumentFormat(documentFormat);\n return this;\n }", "public ImageWriterSVG(String format)\n\t{\n\t\tif (!(\"svg\".equals(format) || \"svgz\".equals(format)))\n\t\t{\n\t\t\tthrow new IllegalArgumentException(\"format \" + format + \" is not accepted by this ImageWriter\");\n\t\t}\n\t\t\n\t\tacceptedFormat = format;\n\t}", "public abstract TextDocument getTextDocumentFromFile(String path) throws FileNotFoundException, IOException;", "public static void create(File collectionsFile) throws IOException\n\t{\t\t\n\t\tHashMap books = null;\n\t\t\n\t\t// If updateOnly is true then we are only updating the existing\n\t\t// JAD/JAR files and won't be parsing the source text\n\t\tif (!updateOnly)\n\t\t{\n\t\t\t// Extract xml file from the collectionsFile property: Source-Text\n\t\t\tString sourceTextPath = extractSourceTextPath(collectionsFile);\n\n // Extract the source file type from the collectionsFile property: SourceFormat\n sourceFormatType = extractSourceFormatType(collectionsFile);\n if (sourceFormatType.equals(SourceFormatType.unknown))\n {\n //do extra testing on the file to see if the format can be determined\n //this is for backward compatibility for GBC 2.2.6 version and prior\n //which did not specify the Source-Format property\n sourceFormatType = SourceFormatTypeRetry(baseSourceDirectory, sourceTextPath);\n }\n\n\t\t\t// Base source directory can be overridden with the -d argument\n\t\t\tUpdateBaseSourceDirectory(collectionsFile);\n\t\t\t/*if (baseSourceDirectory == null)\n\t\t\t{\n\t\t\t\t// By default the sourceTextPath is relative to the collectionsFile\n\t\t\t\t//baseSourceDirectory = \"\" + collectionsFile.getParent();\n baseSourceDirectory = collectionsFile.getAbsolutePath();\n baseSourceDirectory = baseSourceDirectory.substring(0, baseSourceDirectory.length() - collectionsFile.getName().length());\n\t\t\t}*/\n\t\t\tif (sourceFormatType == SourceFormatType.osis\n || sourceFormatType == SourceFormatType.thml)\n {\n File xmlFile = new File(baseSourceDirectory, sourceTextPath);\n books = parseXml(xmlFile);\n }\n else if (sourceFormatType == SourceFormatType.usfm)\n {\n extractCommonFields(collectionsFile);\n //make sure that the file extension is retrieved\n extractUSFMfields(collectionsFile);\n books = parseUSFM(collectionsFile, baseSourceDirectory, sourceTextPath, sTitleTag);\n }\n else\n {\n //dump out message saying that it cannot determine the file format type\n System.out.println(\"Error: Could not determine Bible format type, \" + sourceFormatType + \". Please use the 'Source-Format'\");\n System.out.println(\"property in your collections file.\");\n return;\n }\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Allow the relative path in the collections file to work for updateing\n\t\t\t// the icon as well.\n\t\t\tUpdateBaseSourceDirectory(collectionsFile);\n\t\t}\n\t\t\n\t\tif (books != null || updateOnly)\n\t\t{\n\t\t\tparseUiProperties();\n\t\t\t\n\t\t\t// Parse the collections file\n\t\t\tVector collections = parseCollectionsFile(collectionsFile, books);\n\t\t\t\n\t\t\tif (customFontString != null)\n\t\t\t{\n\t\t\t\tgenerateCustomFont(customFontString, collectionsFile, books);\n\t\t\t}\n\t\t\t\n\t\t\t// Open GoBibleCore based on MIDP version \n\t\t\tString goBibleJarFileName = \"GoBibleCore/GoBibleCore2.jar\";\n\t\t\t\n\t\t\t// Set some fields based on the MIDP version\n\t\t\t// Version 2.4.0 has removed MIDP-1.0 as an option\n//\t\t\tif (midpVersion.equals(\"MIDP-1.0\"))\n//\t\t\t{\n//\t\t\t\tversionString = \"1.\" + SUB_VERSION;\n//\t\t\t\tgoBibleJarFileName = \"GoBibleCore/GoBibleCore1.jar\";\n//\t\t\t}\n\t\t\t\n\t\t\t// Work out the current directory of the GoBibleCreator.jar\n\t\t\tFile jarDirectory = getJarDirectory();\n\t\t\tFile jarFile = new File(jarDirectory, goBibleJarFileName);\n\t\t\t\n\t\t\tJarFile goBibleJar = new JarFile(jarFile);\n\t\t\t\n\t\t\t// Write out the Go Bible data files into the same directory as the collections file\n\t\t\twriteCollections(collectionsFile.getParentFile(), collections, books, goBibleJar);\n\t\t}\n\t}", "public JsnParser(String filename) {\n this.filename = filename;\n }", "public boolean fileFormatSupported(String fmt);", "public SCMLReader() {}", "@Override\r\n\tpublic void startDocument() throws SAXException\r\n\t{\r\n\t\t//\t\ttry \n\t\t//\t\t{\n\t\t//\t\t\tif (task.isMergeSourceFiles())\r\n\t\t//\t\t\t{\r\n\t\t//\t\t\t\t//\r\n\t\t//\t\t\t}\r\n\t\t//\t\t\telse\r\n\t\t//\t\t\t{\r\n\t\t//\t\t\t\tmultiFileStartDocument();\r\n\t\t//\t\t\t}\n\t\t//\t\t} \n\t\t//\t\tcatch (Exception e) \n\t\t//\t\t{\n\t\t//\t\t\tthrow new SAXException(\"Exception on starting document \", e);\n\t\t//\t\t}\r\n\t}", "public SVGView(String fileName, FileWriter newFile) {\n super(fileName, newFile);\n this.textDescription = this.textualize();\n }", "protected abstract void parseSource(final Document doc, final Resource.Builder resource);", "public void fileOpened(OpenDefinitionsDocument doc) { }", "public void fileOpened(OpenDefinitionsDocument doc) { }", "public void buildDocument( InputStream is ) {\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder = null;\n try {\n dBuilder = dbFactory.newDocumentBuilder();\n } catch ( ParserConfigurationException ex ) {\n Global.warning( \"Parser configuration exception: \" + ex.getMessage() );\n }\n try {\n doc = dBuilder.parse( is );\n } catch ( SAXException ex ) {\n Global.warning( \"SAX parser exception: \" + ex.getMessage() );\n } catch ( IOException ex ) {\n Global.warning( \"IO exception: \" + ex.getMessage() );\n }\n\n }", "public abstract WalkerDocument newDocument(DocumentTag adapter, IOptions options);", "private void startDoc(Attributes attributes) {\n\n\t\t// Start storing the document in the content store\n\t\tstartCaptureContent();\n\n\t\t// Create a new Lucene document\n\t\tcurrentLuceneDoc = new Document();\n\t\tcurrentLuceneDoc.add(new Field(\"fromInputFile\", fileName, Store.YES, Index.NOT_ANALYZED,\n\t\t\t\tTermVector.NO));\n\n\t\t// Store attribute values from the <doc> tag as fields\n\t\tfor (int i = 0; i < attributes.getLength(); i++) {\n\t\t\tString attName = attributes.getLocalName(i);\n\t\t\tString value = attributes.getValue(i);\n\n\t\t\tcurrentLuceneDoc.add(new Field(attName, value, Store.YES, Index.ANALYZED_NO_NORMS,\n\t\t\t\t\tTermVector.WITH_POSITIONS_OFFSETS));\n\t\t}\n\n\t\t// Report indexing progress\n\t\treportDocumentStarted(attributes);\n\t}", "public static Document parseXMLFile(final String fileName) throws IOException {\n\t\treturn parseXMLFile(new File(fileName));\n\t}", "void formatContactInformation(String fileName);", "public void addFormat(Format format);", "public static Menu createDocument(File file, Menu parent, String userName, String language) throws Exception {\r\n // extract content\r\n Parser parser = ParserFactory.getParser(file);\r\n String content = null;\r\n if (parser != null)\r\n content = parser.getContent();\r\n if (content == null)\r\n content = \"\";\r\n\r\n // store in database\r\n String filename = file.getName();\r\n Document doc = new Document();\r\n Version vers = new Version();\r\n Menu menu = new Menu();\r\n String ext = filename.substring(filename.lastIndexOf(\".\") + 1);\r\n ext = ext.toLowerCase();\r\n String name = \"\";\r\n if (parser != null) {\r\n if (parser.getTitle().length() == 0)\r\n name = filename.substring(0, filename.lastIndexOf(\".\"));\r\n else\r\n name = parser.getTitle();\r\n } else {\r\n name = filename;\r\n }\r\n menu.setMenuText(name);\r\n menu.setMenuParent(parent.getMenuId());\r\n\r\n // select a file icon based on the extension\r\n String icon = IconSelector.selectIcon(ext);\r\n menu.setMenuIcon(icon);\r\n\r\n menu.setMenuSort(0);\r\n menu.setMenuPath(parent.getMenuPath() + \"/\" + parent.getMenuId());\r\n menu.setMenuType(Menu.MENUTYPE_FILE);\r\n menu.setMenuHier(parent.getMenuHier() + 1);\r\n menu.setMenuRef(filename);\r\n for (MenuGroup mg : parent.getMenuGroups()) {\r\n menu.getMenuGroups().add(mg);\r\n }\r\n\r\n MenuDAO menuDao = (MenuDAO) Context.getInstance().getBean(MenuDAO.class);\r\n menuDao.store(menu);\r\n\r\n doc.setMenu(menu);\r\n doc.setDocName(name);\r\n doc.setDocDate(DateBean.toCompactString());\r\n doc.setDocPublisher(userName);\r\n doc.setDocStatus(Document.DOC_CHECKED_IN);\r\n doc.setDocType(filename.substring(filename.lastIndexOf(\".\") + 1));\r\n doc.setDocVersion(\"1.0\");\r\n doc.setSource(\"\");\r\n if (parser != null) {\r\n doc.setSourceAuthor(parser.getAuthor());\r\n String srcDate = DateBean.toCompactString(parser.getSourceDate(), language);\r\n if (srcDate != null)\r\n doc.setSourceDate(srcDate);\r\n String keywords = parser.getKeywords();\r\n if (keywords != null && keywords.length() > 0) {\r\n DocumentDAO docDao = (DocumentDAO) Context.getInstance().getBean(DocumentDAO.class);\r\n doc.setKeywords(docDao.toKeywords(keywords));\r\n }\r\n }\r\n doc.setSourceType(\"\");\r\n doc.setCoverage(\"\");\r\n doc.setLanguage(language);\r\n\r\n /* insert initial version 1.0 */\r\n vers.setVersion(\"1.0\");\r\n vers.setVersionComment(\"\");\r\n vers.setVersionDate(DateBean.toCompactString());\r\n vers.setVersionUser(userName);\r\n doc.addVersion(vers);\r\n DocumentDAO docDao = (DocumentDAO) Context.getInstance().getBean(DocumentDAO.class);\r\n docDao.store(doc);\r\n\r\n // create history entry\r\n createHistoryEntry(doc.getDocId(), userName, History.STORED);\r\n\r\n // store document in the repository\r\n SettingsConfig settings = (SettingsConfig) Context.getInstance().getBean(SettingsConfig.class);\r\n String path = settings.getValue(\"docdir\");\r\n if (!path.endsWith(File.pathSeparator))\r\n path += \"/\";\r\n path += menu.getMenuPath() + \"/\" + doc.getMenuId();\r\n FileBean.createDir(path);\r\n FileBean.copyFile(file.getAbsolutePath(), path + \"/\" + filename);\r\n\r\n /* create search index entry */\r\n String lang = doc.getLanguage();\r\n Indexer index = (Indexer) Context.getInstance().getBean(Indexer.class);\r\n int luceneId = index.addFile(new File(path + \"/\" + filename), doc, content, language);\r\n SearchDocument searchDoc = new SearchDocument();\r\n searchDoc.setLuceneId(luceneId);\r\n searchDoc.setMenuId(menu.getMenuId());\r\n\r\n String luceneIndex = new Locale(lang).getDisplayLanguage(Locale.ENGLISH).toLowerCase();\r\n if (StringUtils.isEmpty(luceneIndex))\r\n luceneIndex = \"english\";\r\n\r\n searchDoc.setIndex(luceneIndex);\r\n\r\n SearchDocumentDAO searchDocDao = (SearchDocumentDAO) Context.getInstance().getBean(SearchDocumentDAO.class);\r\n searchDocDao.store(searchDoc);\r\n\r\n //Update file size\r\n menuDao.store(menu);\r\n \r\n return menu;\r\n }", "@Override\n public void unpackMarkup(Document doc, RepositioningInfo repInfo,\n RepositioningInfo ampCodingInfo) throws DocumentFormatException {\n if((doc == null)\n || (doc.getSourceUrl() == null && doc.getContent() == null)) {\n\n throw new DocumentFormatException(\n \"GATE document is null or no content found. Nothing to parse!\"); }// End\n // if\n\n // Create a status listener\n StatusListener statusListener = new StatusListener() {\n @Override\n public void statusChanged(String text) {\n // This is implemented in DocumentFormat.java and inherited here\n fireStatusChanged(text);\n }\n };\n\n // determine whether we have a GATE format document or not\n /*String content = doc.getContent().toString();\n if(content.length() > 2048) {\n content = content.substring(0, 2048);\n }*/\n boolean gateFormat = isGateFIFormat(doc);\n \n\n if(gateFormat) {\n unpackGateFormatMarkup(doc, statusListener);\n } else {\n unpackGeneralXmlMarkup(doc, repInfo, ampCodingInfo, statusListener);\n }\n }", "public void setDocumentFormat(String documentFormat) {\n this.documentFormat = documentFormat;\n }", "@Override\n\tpublic void createPDF(){\n File xsltFile = new File(RESOURCES_DIR + \"/pdfBook.xsl\");\n \n // the XML file which provides the input\n StreamSource xmlSource = new StreamSource(file);\n \n // create an instance of fop factory\n FopFactory fopFactory = FopFactory.newInstance();\n \n // a user agent is needed for transformation\n FOUserAgent foUserAgent = fopFactory.newFOUserAgent();\n \n // Setup output\n OutputStream out = null;\n try {\n\t\t\tout = new java.io.FileOutputStream(OUTPUT_DIR + \"/output.pdf\");\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\n try {\n // Construct fop with desired output format\n Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out);\n\n // Setup XSLT\n TransformerFactory factory = TransformerFactory.newInstance();\n Transformer transformer = factory.newTransformer(new StreamSource(xsltFile));\n\n // Resulting SAX events (the generated FO) must be piped through to\n // FOP\n Result res = new SAXResult(fop.getDefaultHandler());\n\n // Start XSLT transformation and FOP processing\n // That's where the XML is first transformed to XSL-FO and then\n // PDF is created\n try {\n\t\t\t\ttransformer.transform(xmlSource, res);\n\t\t\t} catch (TransformerException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n } catch (FOPException | TransformerConfigurationException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} finally {\n try {\n\t\t\t\tout.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 }", "GmMacro createGmMacro(InputStream in) throws IOException, SAXException, ParserConfigurationException;", "Documentation createDocumentation();", "Documentation createDocumentation();", "ReleaseFile parse( InputStream is ) throws IOException;", "public AceDocument (String textFileName, String APFfileName) {\n\t\ttry {\n\t\t// initialize APF reader\n\t\tif (builder == null) {\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\t\tfactory.setValidating(false);\n\t\t\tbuilder = factory.newDocumentBuilder();\n\t\t\t}\n\t\t\tanalyzeDocument (textFileName, APFfileName);\n\t\t} catch (SAXException e) {\n\t\t\tSystem.err.println (\"AceDocument: Exception in initializing APF reader: \" + e);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println (\"AceDocument: Exception in initializing APF reader: \" + e);\n\t\t} catch (ParserConfigurationException e) {\n\t\t\tSystem.err.println (\"AceDocument: Exception in initializing APF reader: \" + e);\n\t\t}\n\t}", "public SourceFile getSourceFile() throws InvalidFormatException;", "@Override\n public DocumentServiceEntry createDocument(String title, String contents) throws DocumentServiceException {\n DocsService svc = getDocsService();\n DocumentEntry newDocument = new DocumentEntry();\n newDocument.setTitle(new PlainTextConstruct(title));\n DocumentEntry entry;\n try {\n MediaByteArraySource source = new MediaByteArraySource(contents.getBytes(\"UTF8\"), \"text/plain\");\n newDocument.setMediaSource(source);\n entry = svc.insert(new URL(DOCS_SCOPE + \"default/private/full\"), newDocument);\n } catch (Exception e) {\n e.printStackTrace();\n throw new DocumentServiceException(e.getMessage());\n }\n return getDocumentReference(entry);\n }", "Object create(InputSource is) throws IOException, SAXException, ParserConfigurationException;", "@Override\n\tpublic void openDocument(String path, String name) {\n\t\t\n\t}", "public GridFSInputFile createFile(InputStream in, String filename) {\n\treturn new GridFSInputFile(this, in, filename);\n }", "private File createRefFile( File f )\n {\n \tfinal String refExtension = \".ref\";\n \n \tString origFileName = f.getName();\n \tint dotPos = origFileName.lastIndexOf( \".\" );\n \tString strippedFileName = origFileName.substring( 0, dotPos ); // filename without extension, and without the dot!\n \n \treturn FileHandler.getFile( new String( harvesterDirName + File.separator + strippedFileName + refExtension ) );\n }", "@ApiModelProperty(required = true, value = \"The file type of the file.\")\n public String getFormat() {\n return format;\n }", "void open(String fileName) throws IOException, ParserConfigurationException, SAXException;", "public static void main(String args[]) throws Exception {\n\t String filePath = \"test.pdf\";\r\n\t \r\n\t String pdfText = FileReader.getFile(filePath, 581, 584); \r\n\t text_position.position(580, 584);\r\n\t \r\n//\t String pdfText = FileReader.getFile(filePath, 396, 407); \r\n//\t text_position.position(395, 407);\r\n\r\n\t txtCreate.creatTxtFile(\"test\");\r\n\t txtCreate.writeTxtFile(pdfText);\r\n\t xmlCreater.getXML(\"test.txt\");\r\n }", "public SVGView(String fileName) {\n super(fileName);\n this.textDescription = this.textualize();\n }", "public static final Document parse(final File f) {\r\n String uri = \"file:\" + f.getAbsolutePath();\r\n\r\n if (File.separatorChar == '\\\\') {\r\n uri = uri.replace('\\\\', '/');\r\n }\r\n\r\n return parse(new InputSource(uri));\r\n }", "@Override\n\tpublic Document loadDocument(String file) {\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t\tdbf.setNamespaceAware(true);\n\t\tDocumentBuilder db;\n\t\ttry {\n\t\t\tdb = dbf.newDocumentBuilder();\n\t\t\tDocument document = db.parse(new File(file));\n\t\t\treturn document;\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (SAXException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (FactoryConfigurationError e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t}", "public GridFSInputFile createFile(InputStream in) {\n\treturn createFile(in, null);\n }", "private File createContent (String fileName, InputStream in) throws IOException {\n // keep original extension so MIME can be guessed by the extension\n File tmp = new File(Utils.getTempFolder(), fileName); // NOI18N\n tmp = FileUtil.normalizeFile(tmp);\n tmp.deleteOnExit(); // hard to track actual lifetime\n FileUtils.copyStreamToFile(new BufferedInputStream(in), tmp);\n return tmp;\n }", "public static void createDocument(String[] attributes) {\n\t\tattributes[2] = attributes[2].toUpperCase();\n\t\tint orgID = OrganizationService.getOrgByUsername(attributes[2]).getId();\n\t\ttry {\n\t\t\t\n\t\t\tDocument docu = DocumentService.getDocumentByTitleAndOrg(attributes[5], orgID);\n\t\t\t//System.out.println(orgID);\n\t\t\tif(docu == null) {\n\t\t\t\t//create document\n\t\t\t\tDocument document = new Document();\n\t\t\t\t//System.out.println(attributes[2]);\n\t\t\t\t\n\t\t\t\tdocument.setOrgID(orgID);\n\t\t\t\tdocument.setTitle(attributes[5]);\n\t\t\t\tdocument.setTerm(attributes[1]);\n\t\t\t\t\n\t\t\t\tDocumentService.addDocument(document);\n\n\t\t\t} \n\t\t\tcreateActivity(attributes, docu.getId(), orgID);\n\t\t} catch(Exception e){\n\t\t\tSystem.out.println(\"Error\");\n\t\t}\n\t\t/*else if(attributes.length >= 20) {\n\t\t\tif (attributes[19].equals(\"In Case of Change\")\n\t\t\t\t || attributes[19].equals(\"Activity Not in GOSM\")) {\n\t\t\t\tcreateActivity(attributes);\n\t\t\t} else {\n\t\t\t\tcreateSubmission(attributes);\n\t\t\t}\n\t\t} else {\n\t\t\tcreateSubmission(attributes);\n\t\t}*/\n\t\t\n\t}", "public SYEParser(InputStream input, String name) throws FileNotFoundException {\n super(input);\n this.filename = name;\n }", "public boolean isAllowedLogoDocumentFormat(String format) throws DataServiceException {\r\n\t\treturn false;\r\n\t}", "@Override\r\n public String createSubDocument(File file, List<FirstElement> partElement) {\n return null;\r\n }", "void loadExistingInstance(String filename)\n {\n iIncomingLobsFactory = new incomingLobsFactory();\n iIncomingLobsFactory.setPackageName(\"com.loadSample\");\n \n // Load the document\n iIncomingLobs = (incomingLobs) iIncomingLobsFactory.loadDocument(filename);\n printincomingLobs();\n }", "public void createEmptyDocument()\n throws IOException, SAXException {\n URL url = WPVSCapabilitiesDocument.class.getResource( XML_TEMPLATE );\n if ( url == null ) {\n throw new IOException( \"The resource '\" + XML_TEMPLATE + \" could not be found.\" );\n }\n load( url );\n }", "Builder addFileFormat(Text value);" ]
[ "0.5620377", "0.5544188", "0.552198", "0.5416392", "0.53828937", "0.52331215", "0.52075756", "0.51565975", "0.5139678", "0.5139678", "0.50879747", "0.5061238", "0.50288194", "0.50249624", "0.4988616", "0.497263", "0.4949829", "0.49450853", "0.4920768", "0.4907248", "0.4880382", "0.48797613", "0.48612875", "0.4850246", "0.48355794", "0.47877842", "0.47746268", "0.4767208", "0.47607455", "0.47585174", "0.47506082", "0.4745807", "0.47359222", "0.4733426", "0.4729328", "0.47289425", "0.47276577", "0.47239578", "0.4715795", "0.47088972", "0.46964172", "0.46852428", "0.46694222", "0.4659948", "0.46549952", "0.4651849", "0.4646551", "0.46453437", "0.4638597", "0.46323937", "0.4614293", "0.4610075", "0.4607275", "0.4607224", "0.45994034", "0.45987552", "0.4597048", "0.45961398", "0.45879316", "0.45799032", "0.45776236", "0.45745474", "0.45730397", "0.45730397", "0.45726603", "0.45716935", "0.4569345", "0.45681375", "0.4564351", "0.4560291", "0.45565444", "0.4554161", "0.45536634", "0.45433852", "0.45432973", "0.4542535", "0.4542535", "0.45340097", "0.45337135", "0.45249394", "0.4523575", "0.45232427", "0.45224598", "0.45199323", "0.4514576", "0.45022622", "0.45015597", "0.449511", "0.44887584", "0.4476995", "0.4468984", "0.44625145", "0.44622767", "0.44612643", "0.44441065", "0.44234908", "0.44229445", "0.4418647", "0.44171238", "0.44138873" ]
0.7094014
0
sets the list of SGML tags which are to be converted to annotations when this document is opened. Applicable only to documents of format 'sgml'.
public void setSGMLtags (String[] tags) { SGMLtags = tags; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void save () {\n\t\tif (!open) {\n\t\t\tSystem.out.println (\"ExternalDocument.save: attempt to save unopened document \" + fileName);\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tif (format.equals(\"sgml\")) {\n\t\t\t\tString tagToWrite;\n\t\t\t\tif (allTags)\n\t\t\t\t\ttagToWrite = null;\n\t\t\t\telse if (SGMLtags.length == 0)\n\t\t\t\t\ttagToWrite = \"***\"; // unused annotation type\n\t\t\t\telse if (SGMLtags.length == 1)\n\t\t\t\t\ttagToWrite = SGMLtags[0];\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println (\"ExternalDocument.save: cannot write more than 1 annotation type\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tString string = writeSGML(tagToWrite).toString();\n\t\t\t\tFile file = new File(fullFileName());\n\t\t\t\tBufferedWriter writer = new BufferedWriter (\n\t\t\t\t\t\tnew OutputStreamWriter (new FileOutputStream(file), JetTest.encoding));\n\t\t\t\twriteWithSystemNewlines (writer, string);\n\t\t\t\twriter.close();\n\t\t\t} else {\n\t\t\t\t\tSystem.out.println (\"Error saving document \" + fileName);\n\t\t\t\t\tSystem.out.println (\"Unknown document format.\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println (\"Error opening document \" + fileName);\n\t\t\t\tSystem.out.println (e);\n\t\t}\n\t}", "public void setToTag(String tag) throws ParseException,NullPointerException;", "public void setTags(ArrayList<String> tags){\n for(String s : tags){\n this.tags.add(s);\n }\n }", "private void setSymptomTagsListAdapter() {\n AdapterTagSymptomList adapter = new AdapterTagSymptomList(symptomTagsList, this, this::onItemClick);\n RecyclerView.LayoutManager layoutManager = new StaggeredGridLayoutManager(10, StaggeredGridLayoutManager.HORIZONTAL);\n symptomTagListRecyclerView.setLayoutManager(layoutManager);\n symptomTagListRecyclerView.setItemAnimator(new DefaultItemAnimator());\n symptomTagListRecyclerView.setAdapter(adapter);\n }", "public void tagDocument (Document doc) {\n\t\tmene.newDocument();\n\t\tVector textSegments = doc.annotationsOfType (\"TEXT\");\n\t\tIterator it = textSegments.iterator ();\n\t\twhile (it.hasNext ()) {\n\t\t\tAnnotation ann = (Annotation)it.next ();\n\t\t\tSpan textSpan = ann.span ();\n\t\t\tSentenceSplitter.split (doc, textSpan);\n\t\t}\n\t\tVector sentences = doc.annotationsOfType (\"sentence\");\n\t\tIterator is = sentences.iterator ();\n\t\twhile (is.hasNext ()) {\n\t\t\tAnnotation sentence = (Annotation)is.next ();\n\t\t\tSpan sentenceSpan = sentence.span();\n\t\t\tTokenizer.tokenize (doc, sentenceSpan);\n\t\t\tLexicon.annotateWithDefinitions(doc, sentenceSpan.start(), sentenceSpan.end());\n\t\t\ttag (doc, sentenceSpan);\n\t\t}\n\t}", "void setTagCollection(Collection<Tag> tagCollection);", "public void setIdTagsOff () {\n\t\tidTags = false;\n\t}", "public void setTags(List<Tag> tags) {\n this.tags = tags;\n }", "public void setFirstSentenceTags(Tag[] _firstSentenceTags)\n\t{ firstSentenceTags = _firstSentenceTags; }", "public void setTagSet(Tag [] TagSet) {\n this.TagSet = TagSet;\n }", "public void setTags(String tags) {\n\t\tthis.tags = tags;\n\t}", "void updateTags();", "@Override\n public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {\n // <document>\n if (localName.equals(\"document\")) {\n curArticle = new ArticleSmallOpinion();\n curTagiot = new ArrayList<Tagit>();\n\n // add values\n if (atts.getValue(\"doc_id\") != null) curArticle.setDoc_id(atts.getValue(\"doc_id\"));\n if (atts.getValue(\"title\") != null) curArticle.setTitle(atts.getValue(\"title\"));\n if (atts.getValue(\"sub_title\") != null) curArticle.setSubTitle(atts.getValue(\"sub_title\"));\n if (atts.getValue(\"f7\") != null) curArticle.setF7(atts.getValue(\"f7\"));\n String author = atts.getValue(\"author_icon\");\n author = extractImageUrl(author);\n if (atts.getValue(\"author_icon\") != null) curArticle.setAuthorImgURL(author);\n if (atts.getValue(\"Created_On\") != null) curArticle.setCreatedOn(atts.getValue(\"Created_On\"));\n\n }\n // <f2>\n else if (localName.equals(\"f2\")) {\n if (atts.getValue(\"src\") != null) curArticle.setF2(atts.getValue(\"src\"));\n\n // currently not holding image photographer via \"title=\"\n }\n // <f3>\n if (localName.equals(\"f3\")) {\n if (atts.getValue(\"src\") != null) curArticle.setF3(atts.getValue(\"src\"));\n // currently not holding image photographer via \"title=\"\n }\n // <f4>\n else if (localName.equals(\"f4\")) {\n if (atts.getValue(\"src\") != null) curArticle.setF4(atts.getValue(\"src\"));\n // currently not holding image photographer via \"title=\"\n }\n // <tagit>\n else if (localName.equals(\"tagit\")) {\n Tagit tagit = new Tagit(atts.getValue(\"id\"), atts.getValue(\"simplified\"), \"\");\n curTagiot.add(tagit);\n }\n\n }", "public void setFromTag(String tag) throws ParseException,NullPointerException;", "public void setXmlSchema(Document doc) {\n\t\tString schemaUrl = \"https://raw.githubusercontent.com/biosemantics/schemas/master/semanticMarkupInput.xsd\";\n\t\tElement rootElement = doc.getRootElement();\n\t\trootElement.setNamespace(bioNamespace);\n\t\trootElement.addNamespaceDeclaration(bioNamespace);\n\t\trootElement.addNamespaceDeclaration(xsiNamespace);\n\t\trootElement.setAttribute(\"schemaLocation\", \"http://www.github.com/biosemantics \" + schemaUrl, xsiNamespace);\n\t}", "public void setTagDefinitions(List<XmlTagDefinition> tagDefinitions) {\n this.tagDefinitions = tagDefinitions;\n }", "public void setTags(String tags) {\n this.tags = tags;\n }", "public void setTags(List<Tag> tags) {\n this.tags.clear();\n if (tags != null) {\n this.tags.addAll(tags);\n }\n }", "private void setAllTags(ArrayList<String> allTags) {\r\n this.allTags = allTags;\r\n }", "public Tags() {\n set (\"\");\n }", "public XMLSaxHandler(JCas aJCas, String mXmlTagContainingText, HashMap XmlTagsToTurnIntoAnnotationHashMap) {\n\t\tthis.setaJCas(aJCas);\n\t\tthis.mXmlTagContainingText = mXmlTagContainingText;\n\t\tthis.XmlTagsToTurnIntoAnnotationHashMap = XmlTagsToTurnIntoAnnotationHashMap;\n\n\t\t// Si l'on n'a pas spécifié de tag particulier dont il faut traiter le contenu textuel \n\t\t// alors on traite tous les tags\n\t\t// par défaut insideTextTag devient true\n\t\t//insideTextTag = (mXmlTagContainingText == null);\n\t\t// TODO there is a bug when mXmlTagContainingText is set (like \"p\") and when there is empty elements previously\n\t\t// to avoid such a problem, we prefer to desactivate it \n\t\t// see the text of solen gsearch_paper_1.xml to threw the same error\n\t\tinsideTextTag = true; \n\n\t}", "public void setTag(String tag);", "public void reset() {\n\t\tfor (int i = 0; i < markedElements.size(); i++) {\n\t\t\tif (markedElements.get(i) instanceof Word) {\n\t\t\t\tWord word = (Word) markedElements.get(i);\n\t\t\t\teditor.setCaretPosition(word.getEndPosition() + 1);\n\t\t\t\tint start = word.getStartPosition();\n\t\t\t\tint end = word.getEndPosition();\n\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN, true);\n\t\t\t} else if (markedElements.get(i) instanceof FunctionWord) {\n\t\t\t\tFunctionWord fword = (FunctionWord) markedElements.get(i);\n\t\t\t//\tif(fword.getWord().getEndPosition()!= fword.getEndPosition()) {\n\t\t\t\t\t// fword ist teil eines gr��eren Wortes-> Endposition als caretposition verwenden\n\t\t\t//\t\teditor.setCaretPosition(fword.getEndPosition() + 1);\n\t\t\t//\t}\n\t\t\t//\telse {\n\t\t\t\t\teditor.setCaretPosition(fword.getEndPosition() + 1);\n\t\t\t//\t}\n\t\t\t\tint start = fword.getStartPosition();\n\t\t\t\tint end = fword.getEndPosition();\n\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN, true);\n\t\t\t} else if (markedElements.get(i) instanceof ConstitutiveWord) {\n\t\t\t\tConstitutiveWord cword = (ConstitutiveWord) markedElements\n\t\t\t\t\t\t.get(i);\n\t\t\t\teditor.setCaretPosition(cword.getEndPosition() + 1);\n\t\t\t\tint start = cword.getStartPosition();\n\t\t\t\tint end = cword.getEndPosition();\n\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN, true);\n\t\t\t} else if (markedElements.get(i) instanceof IllocutionUnit) {\n\t\t\t\tIllocutionUnit iu = (IllocutionUnit) markedElements.get(i);\n\t\t\t\tfor (int j = 0; j < iu.getTokens().size(); j++) {\n\t\t\t\t\tToken token = (Token) iu.getTokens().get(j);\n\t\t\t\t\tint start = token.getStartPosition();\n\t\t\t\t\tint end = token.getEndPosition();\n\t\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN,\n\t\t\t\t\t\t\ttrue);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tmarkedElements.clear();\n\t\tdesignText(Model.getIllocutionUnitRoots());\n\t}", "public void setMlSdef18(String mlSdef18) {\n this.mlSdef18 = mlSdef18;\n }", "public void setTags(java.util.Collection<Tag> tags) {\n if (tags == null) {\n this.tags = null;\n return;\n }\n\n this.tags = new java.util.ArrayList<Tag>(tags);\n }", "public void setTags(java.util.Collection<Tag> tags) {\n if (tags == null) {\n this.tags = null;\n return;\n }\n\n this.tags = new java.util.ArrayList<Tag>(tags);\n }", "public void setTags(String tags) {\n this.tags = tags == null ? null : tags.trim();\n }", "private void loadOldTags() throws IOException {\n File fileAnnotation = new File(filePathAnnDestination);\n if (!fileAnnotation.exists()) {\n fileAnnotation.createNewFile();\n }\n FileReader fr = new FileReader(fileAnnotation);\n\n\n\n\n BufferedReader br = new BufferedReader(fr);\n String line;\n\n while ((line = br.readLine()) != null) {\n String[] annotations = line.split(\"[ \\t]\");\n String word = line.substring(line.lastIndexOf('\\t') + 1);\n String[] words = word.split(\" \");\n\n int start = Integer.parseInt(annotations[2]);\n if (words.length != 0) {\n for (int i = 0; i < words.length; i++) {\n int end = start + words[i].length();\n taggedItems.put(start + \"-\" + end, annotations[1]);\n System.out.println(\"Loading old tags: \" + start + \"-\" + end + \"\\t\" + annotations[1]);\n start = end + 1;\n }\n }\n taggedItems.put(annotations[2] + \"-\" + annotations[3], annotations[1]);\n\n noOfTagsAlready = Integer.parseInt(annotations[0].substring(1));\n if (noOfTagsAlreadyMax < noOfTagsAlready)\n noOfTagsAlreadyMax = noOfTagsAlready;\n }\n br.close();\n fr.close();\n System.out.println(\"Loaded tags\");\n }", "private void saveTags() {\n SavedFolders.editFolder(this.folder);\n }", "protected void tag (int ltagStart) throws HTMLParseException {\r\n Tag tag = new Tag ();\r\n Token token = new Token (tag, false);\r\n switch (nextToken) {\r\n case STRING:\r\n tag.setType (stringValue);\r\n match (STRING);\r\n arglist (tag);\r\n if (tagmode) {\r\n block.setRest (lastTagStart);\r\n } else {\r\n token.setStartIndex (ltagStart);\r\n //block.addToken (token);\r\n // 2009.05.28 by in-koo cho\r\n addTokenCheck(token);\r\n }\r\n break;\r\n case MT:\r\n tagmode = false;\r\n match (MT);\r\n break;\r\n case END:\r\n block.setRest (lastTagStart);\r\n tagmode = false;\r\n return;\r\n default:\r\n arglist (tag);\r\n }\r\n }", "void xsetLegs(org.apache.xmlbeans.XmlInt legs);", "public void setSyntax(IliSyntax iliSyntax) {\n\tthis.iliSyntax = iliSyntax;\n\n\t// map UmlUsage (according to INTERLIS Reference)\n\tif ((iliSyntax instanceof ch.ehi.interlis.units.UnitDef) ||\n\t\t\t(iliSyntax instanceof ch.ehi.interlis.functions.FunctionDef) ||\n\t\t\t(iliSyntax instanceof ch.ehi.interlis.domainsandconstants.linetypes.LineFormTypeDef) ||\n\t\t\t(iliSyntax instanceof ch.ehi.interlis.graphicdescriptions.GraphicParameterDef) ||\n\t\t\t(iliSyntax instanceof ch.ehi.interlis.views.ViewDef) ||\n\t\t\t(iliSyntax instanceof ch.ehi.interlis.graphicdescriptions.GraphicDef)) {\n\t\tsetUsage((ch.ehi.uml1_4.foundation.core.ModelElement)iliSyntax);\n\t}\n\n\t// show current Interlis-Syntax code\n\tgetPnlDataSelector().setVisible(false);\n\tgetPnlEditor().setEditable(true);\n\tif ((iliSyntax == null) || (iliSyntax.getSyntax() == null)) {\n\t\tgetPnlEditor().setText(new String());\n\t} else {\n\t\tgetPnlEditor().setText(ElementUtils.mapNlsString(iliSyntax.getSyntax()));\n\t}\n}", "public void setMlSdef14(String mlSdef14) {\n this.mlSdef14 = mlSdef14;\n }", "public Tags (String tags) {\n set (tags);\n }", "void xsetTag(org.apache.xmlbeans.XmlString tag);", "public void generateTags(Vector tagList)\n {\n defs.generateTags(tagList);\n }", "public void setMlSisvalid(String mlSisvalid) {\n this.mlSisvalid = mlSisvalid;\n }", "public void setMlSdef5(String mlSdef5) {\n this.mlSdef5 = mlSdef5;\n }", "public void set(String inTags) {\n tags.delete (0, tags.length());\n merge (inTags);\n }", "@Override\n\tpublic void setTagged(boolean tagged) {\n\t\tthis.tagged = tagged;\n\t\t\n\t}", "public void setInlineTags(Tag[] _inlineTags)\n\t{ inlineTags = _inlineTags; }", "protected void setSOS(ArrayList<Message> sos_msgs){\n this.sos_msgs = sos_msgs;\n }", "public void setTag(String tagName, Object value);", "public void setMlSdef19(String mlSdef19) {\n this.mlSdef19 = mlSdef19;\n }", "public void setMlSdef20(String mlSdef20) {\n this.mlSdef20 = mlSdef20;\n }", "IParser setDontEncodeElements(Collection<String> theDontEncodeElements);", "public void setContent(Document doc) {\n\t\tString text = doc.getContent().toString();\n\t\txmldoc = new NlptoolsshareType();\n\t\tDocumentType docxml = new DocumentType();\n\t\tdocxml.setText(text);\n\t\txmldoc.setDocument(docxml);\n\t}", "public void setTag(List<Tag> tag)\n\t{\n\t\t this.addKeyValue(\"Tag\", tag);\n\n\t}", "public void setMlSisdel(String mlSisdel) {\n this.mlSisdel = mlSisdel;\n }", "public void setLangDefStream(InputStream in) {\n final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n final DocumentBuilder builder;\n final Document doc;\n try {\n builder = factory.newDocumentBuilder();\n if (langDefDtd != null) {\n \tbuilder.setEntityResolver(new EntityResolver () {\n \t\tpublic InputSource resolveEntity( String publicId, String systemId) throws SAXException, IOException {\n \t\t\treturn new InputSource(langDefDtd);\n \t\t}\n \t});\n }\n doc = builder.parse(in);\n // TODO modify the L10N text and style here\n ardublockLocalize(doc);\n ardublockStyling(doc);\n \n langDefRoot = doc.getDocumentElement();\n langDefDirty = true;\n } catch (ParserConfigurationException e) {\n throw new RuntimeException(e);\n } catch (SAXException e) {\n throw new RuntimeException(e);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "void setTag(java.lang.String tag);", "IParser setEncodeElements(Set<String> theEncodeElements);", "public void setSVG(SVG mysvg)\r\n {\r\n if (mysvg == null)\r\n throw new IllegalArgumentException(\"Null value passed to setSVG()\");\r\n\r\n setSoftwareLayerType();\r\n setImageDrawable(new PictureDrawable(mysvg.renderToPicture()));\r\n mSvg = mysvg;\r\n mRenderer = getNewRenderer(mSvg);\r\n }", "@ApiModelProperty(value = \"A comma-separated values list of tags to add to the package.\")\n public String getTags() {\n return tags;\n }", "void setStarList(stars.StarListDocument.StarList starList);", "public void setXsl(String xsl) {\n this.xsl = xsl;\n }", "public boolean open() {\n\t\tif (!open) {\n\t\t\ttry {\n\t\t\t\tif (format.equals(\"sgml\")) {\n\t\t\t\t\tFile file = new File(fullFileName());\t//return the full file name,including directory and filename\n\t\t\t\t\tString line;\n\t\t\t\t\tBufferedReader reader = new BufferedReader (\n\t\t\t\t\t\t// (new FileReader(file));\n\t\t\t\t\t\tnew InputStreamReader (new FileInputStream(file), JetTest.encoding));\n\t\t\t\t\tStringBuffer fileText = new StringBuffer();\t\t//store all text in filename\n\t\t\t\t\twhile((line = reader.readLine()) != null)\n\t\t\t\t\t\tfileText.append(line + \"\\n\");\n\t\t\t\t\tString text = fileText.toString(); //Store the converted text\n\t\t\t\t\tSGMLProcessor.allTags = allTags;\t\n\t\t\t\t\tSGMLProcessor.emptyTags = emptyTags;\n\t\t\t\t\tDocument doc = SGMLProcessor.sgmlToDoc (this, text, SGMLtags);\t//Because format.equals(\"sgml\")\n\t\t\t\t\topen = true;\n\t\t\t\t\treturn true;\n\t\t\t\t} else if (format.equals(\"pos\")) {\n\t\t\t\t\tposRead();\n\t\t\t\t\topen = true;\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println (\"Error opening document \" + fileName);\n\t\t\t\t\tSystem.out.println (\"Unknown document format.\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\t\tSystem.out.println (\"Error opening document \" + fileName);\n\t\t\t\t\tSystem.out.println (e);\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\t// return true if already open\n\t\t\treturn true;\n\t\t}\n\t}", "void setOssModified(boolean ossModified);", "void setNilTag();", "private static void InitTagger() {\n\t\ttagger = new MaxentTagger(\"models/english-left3words-distsim.tagger\");\n\t}", "public void setTag(Object tag)\n {\n fTag = tag;\n }", "public void setMlSdef6(String mlSdef6) {\n this.mlSdef6 = mlSdef6;\n }", "public void setTags(java.util.Map<String, String> tags) {\n this.tags = tags;\n }", "public void setTags(java.util.Map<String, String> tags) {\n this.tags = tags;\n }", "public void setTags(java.util.Map<String, String> tags) {\n this.tags = tags;\n }", "public void setTags(java.util.Map<String, String> tags) {\n this.tags = tags;\n }", "public void setMlSdef1(String mlSdef1) {\n this.mlSdef1 = mlSdef1;\n }", "public void style() {\n\n\t\tfinal ArrayList<String> cssClasses = new ArrayList<>();\n\t\tif (!this.styles.isEmpty()) {\n\t\t\tthis.styles.forEach(s -> {\n\t\t\t\tcssClasses.add(s.getCss());\n\t\t\t});\n\t\t}\n\n\t\t// replace the cell styles with the new set\n\t\tthis.add(AttributeModifier.replace(\"class\", StringUtils.join(cssClasses, \" \")));\n\t}", "public void setTags(java.util.Collection<Tag> tags) {\n if (tags == null) {\n this.tags = null;\n return;\n }\n\n this.tags = new com.amazonaws.internal.SdkInternalList<Tag>(tags);\n }", "public void setTags(java.util.Collection<Tag> tags) {\n if (tags == null) {\n this.tags = null;\n return;\n }\n\n this.tags = new com.amazonaws.internal.SdkInternalList<Tag>(tags);\n }", "public void setTags(java.util.Collection<Tag> tags) {\n if (tags == null) {\n this.tags = null;\n return;\n }\n\n this.tags = new com.amazonaws.internal.SdkInternalList<Tag>(tags);\n }", "public void setTags(java.util.Collection<Tag> tags) {\n if (tags == null) {\n this.tags = null;\n return;\n }\n\n this.tags = new com.amazonaws.internal.SdkInternalList<Tag>(tags);\n }", "public void setTags(java.util.Collection<Tag> tags) {\n if (tags == null) {\n this.tags = null;\n return;\n }\n\n this.tags = new com.amazonaws.internal.SdkInternalList<Tag>(tags);\n }", "private void set(String sEmailTag, String sFirstNameTag, String sIdTag, String sLastNameTag)\r\n\t{\r\n\t\tthis.sEmailTag = sEmailTag;\r\n\t\tthis.sFirstNameTag = sFirstNameTag;\r\n\t\tthis.sIdTag = sIdTag;\r\n\t\tthis.sLastNameTag = sLastNameTag;\r\n\t\t\r\n\t}", "void setNameTagVisibility(NameTagVisibility nameTagVisibility);", "public void setXml(java.lang.String newXml);", "@Override\n public void setXMLSchemas(Object[] schemas) throws XMLPlatformException {\n if ((null == schemas) || (schemas.length == 0)) {\n return;\n }\n if (null == documentBuilderFactory) {\n loadDocumentBuilderFactory();\n }\n try {\n documentBuilderFactory.setAttribute(SCHEMA_LANGUAGE, XML_SCHEMA);\n documentBuilderFactory.setAttribute(JAXP_SCHEMA_SOURCE, schemas);\n } catch (IllegalArgumentException e) {\n // The attribute isn't supported so do nothing\n } catch (Exception e) {\n XMLPlatformException.xmlPlatformErrorResolvingXMLSchemas(schemas, e);\n }\n }", "public String getTags() {\n\t\treturn tags;\n\t}", "public String getTags() {\n\t\treturn tags;\n\t}", "private void setTagEditable(boolean bool){\n \t\teditTag.setVisible(!bool);\r\n \t\teditTag.setVisible(bool); //actually we want editTag visible false\r\n \t\t\r\n \t\tviewTag.setVisible(bool);\r\n \t\tviewTag.setVisible(!bool); //actually we want viewTag visible true\r\n \t}", "public AndroidModel tags(List<String> tags) {\n this.tags = tags;\n return this;\n }", "void setTags(@MaxSize(4096) String serializedTags);", "public void loadFromXML(Document doc)\r\n\t{\r\n\t\tNode studyNode = doc.getElementsByTagName(GlimmpseConstants.TAG_STUDY).item(0);\r\n\t\tif (studyNode != null)\r\n\t\t{\r\n\t\t\tNodeList children = studyNode.getChildNodes();\r\n\t\t\tfor(int i = 0; i < children.getLength(); i++)\r\n\t\t\t{\r\n\t\t\t\tNode child = children.item(i);\r\n\t\t\t\tString childName = child.getNodeName();\t\r\n\t\t\t\tif (GlimmpseConstants.TAG_SOLVING_FOR.equalsIgnoreCase(childName))\r\n\t\t\t\t\tsolvingForPanel.loadFromNode(child);\r\n\t\t\t\telse if (GlimmpseConstants.TAG_ALPHA_LIST.equalsIgnoreCase(childName))\r\n\t\t\t\t\talphaPanel.loadFromNode(child);\r\n\t\t\t\telse if (GlimmpseConstants.TAG_TEST_LIST.equalsIgnoreCase(childName))\r\n\t\t\t\t\toptionsTestsPanel.loadFromNode(child);\r\n\t\t\t\telse if (GlimmpseConstants.TAG_QUANTILE_LIST.equalsIgnoreCase(childName))\r\n\t\t\t\t\toptionsPowerMethodsPanel.loadFromNode(child);\r\n\t\t\t\telse if (GlimmpseConstants.TAG_POWER_LIST.equalsIgnoreCase(childName))\r\n\t\t\t\t\tpowerPanel.loadFromNode(child);\r\n\t\t\t\telse if (GlimmpseConstants.TAG_POWER_METHOD_LIST.equalsIgnoreCase(childName))\r\n\t\t\t\t\toptionsPowerMethodsPanel.loadFromNode(child);\r\n\t\t\t\telse if (GlimmpseConstants.TAG_SAMPLE_SIZE_LIST.equalsIgnoreCase(childName))\r\n\t\t\t\t\tperGroupSampleSizePanel.loadFromNode(child);\r\n\t\t\t\telse if (GlimmpseConstants.TAG_CATEGORICAL_PREDICTORS.equalsIgnoreCase(childName))\r\n\t\t\t\t\tcatPredictorsPanel.loadFromNode(child);\r\n\t\t\t\telse if (GlimmpseConstants.TAG_RELATIVE_GROUP_SIZE_LIST.equalsIgnoreCase(childName))\r\n\t\t\t\t\trelativeGroupSizePanel.loadFromNode(child);\r\n\t\t\t\telse if (GlimmpseConstants.TAG_OUTCOMES_LIST.equalsIgnoreCase(childName))\r\n\t\t\t\t\toutcomesPanel.loadFromNode(child);\r\n\t\t\t\telse if (GlimmpseConstants.TAG_HYPOTHESIS.equalsIgnoreCase(childName))\r\n\t\t\t\t\thypothesisIndependentPanel.loadFromNode(child);\r\n\t\t\t\telse if (GlimmpseConstants.TAG_REPEATED_MEASURES.equalsIgnoreCase(childName))\r\n\t\t\t\t\trepeatedMeasuresPanel.loadFromNode(child);\r\n\t\t\t\telse if (GlimmpseConstants.TAG_BETA_SCALE_LIST.equalsIgnoreCase(childName))\r\n\t\t\t\t\tmeanDifferencesScalePanel.loadFromNode(child);\r\n\t\t\t\telse if (GlimmpseConstants.TAG_SIGMA_SCALE_LIST.equalsIgnoreCase(childName))\r\n\t\t\t\t\tvariabilityScalePanel.loadFromNode(child);\r\n\t\t\t\telse if (GlimmpseConstants.TAG_FIXED_RANDOM_MATRIX.equalsIgnoreCase(childName))\r\n\t\t\t\t{\r\n\t\t\t\t\tNamedNodeMap attrs = child.getAttributes();\r\n\t\t\t\t\tNode nameNode = attrs.getNamedItem(GlimmpseConstants.ATTR_NAME);\r\n\t\t\t\t\tif (nameNode != null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString name = nameNode.getNodeValue();\r\n\t\t\t\t\t\tif (GlimmpseConstants.MATRIX_BETA.equalsIgnoreCase(name))\r\n\t\t\t\t\t\t\tmeanDifferencesPanel.loadFromNode(child);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if (GlimmpseConstants.TAG_VARIABILITY_Y.equalsIgnoreCase(childName))\r\n\t\t\t\t\tvariabilityIndependentPanel.loadFromNode(child);\r\n\t\t\t\telse if (GlimmpseConstants.TAG_VARIABILITY_YG.equalsIgnoreCase(childName))\r\n\t\t\t\t\tvariabilityCovariateOutcomePanel.loadFromNode(child);\r\n\t\t\t\telse if (GlimmpseConstants.TAG_VARIABILITY_G.equalsIgnoreCase(childName))\r\n\t\t\t\t\tvariabilityCovariatePanel.loadFromNode(child);\r\n\t\t\t\t\r\n\r\n\t\t\t\t/*\r\n\t\t\t\tTODO: finish upload for these panels\r\n\t\t\t\t{hypothesisRepeatedPanel, hypothesisDoublyRepeatedPanel},\r\n\t\t\t\t{meanDifferencesIndependentPanel,\tmeanDifferencesRepeatedPanel, },\r\n\t\t\t\t{, variabilityRepeatedPanel,},\r\n\t\t\t\t\r\n\t\t\t\t*/\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t\tcityNameList = new ArrayList<String>();\n\t\tcityCodeList = new ArrayList<String>();\n\t}", "public void changeHasTagBoost()\r\n\t{\r\n\t\thasTagBoost = !hasTagBoost;\r\n\t}", "public void setMlSdef11(String mlSdef11) {\n this.mlSdef11 = mlSdef11;\n }", "public void addTags(String spid, List<Tag> tagList) throws EVDBRuntimeException, EVDBAPIException {\n\t\t\n\t\tsuper.modifyTags(PERFORMERS_TAGS_NEW, spid, tagList);\n\t}", "public List<String> tag(List<String> text) {\n\n\t\t// Create a data container for a sentence\n\n\t\tString[] s = new String[text.size() + 1];\n\t\ts[0] = \"root\";\n\t\tfor (int j = 0; j < text.size(); j++)\n\t\t\ts[j + 1] = text.get(j);\n\t\ti.init(s);\n\t\t// System.out.println(EuroLangTwokenizer.tokenize(text));\n\n\t\t// lemmatizing\n\n\t\t// System.out.println(\"\\nReading the model of the lemmatizer\");\n\t\t// Tool lemmatizer = new\n\t\t// Lemmatizer(\"resources.spanish/CoNLL2009-ST-Spanish-ALL.anna-3.3.lemmatizer.model\");\n\t\t// // create a lemmatizer\n\n\t\t// System.out.println(\"Applying the lemmatizer\");\n\t\t// lemmatizer.apply(i);\n\n\t\t// System.out.print(i.toString());\n\t\t// System.out.print(\"Lemmata: \"); for (String l : i.plemmas)\n\t\t// System.out.print(l+\" \"); System.out.println();\n\n\t\t// morphologic tagging\n\n\t\t// System.out.println(\"\\nReading the model of the morphologic tagger\");\n\t\t// is2.mtag.Tagger morphTagger = new\n\t\t// is2.mtag.Tagger(\"resources.spanish/CoNLL2009-ST-Spanish-ALL.anna-3.3.morphtagger.model\");\n\n\t\t// System.out.println(\"\\nApplying the morpholoigc tagger\");\n\t\t// morphTagger.apply(i);\n\n\t\t// System.out.print(i.toString());\n\t\t// System.out.print(\"Morph: \"); for (String f : i.pfeats)\n\t\t// System.out.print(f+\" \"); System.out.println();\n\n\t\t// part-of-speech tagging\n\n\t\t// System.out.println(\"\\nReading the model of the part-of-speech tagger\");\n\n//\t\tSystem.out.println(\"Applying the part-of-speech tagger\");\n\t\ttagger.apply(i);\n\t\tList<String> tags = new ArrayList<String>(i.ppos.length - 1);\n\t\tfor (int j = 1; j < i.ppos.length; j++)\n\t\t\ttags.add(i.ppos[j]);\n\t\treturn tags;\n\t\t// System.out.println(\"Part-of-Speech tags: \");\n\t\t// for (String p : i.ppos)\n\t\t// System.out.print(p + \" \");\n\t\t// System.out.println();\n\n\t\t// parsing\n\n\t\t// System.out.println(\"\\nReading the model of the dependency parser\");\n\t\t// Tool parser = new Parser(\"models/prs-spa.model\");\n\n\t\t// System.out.println(\"\\nApplying the parser\");\n\t\t// parser.apply(i);\n\n\t\t// System.out.println(i.toString());\n\n\t\t// write the result to a file\n\n\t\t// CONLLWriter09 writer = new\n\t\t// is2.io.CONLLWriter09(\"example-out.txt\");\n\n\t\t// writer.write(i, CONLLWriter09.NO_ROOT);\n\t\t// writer.finishWriting();\n\n\t}", "void startAll(GroupSG group) throws SAXException;", "@Override\n\tpublic void docToLists() {\n\t\tnodesToList(document, null, nodes);\n\t}", "public void setMlSdef17(String mlSdef17) {\n this.mlSdef17 = mlSdef17;\n }", "public void setJGSL(String jgsl) {\n //To change body of implemented methods use File | Settings | File Templates.\n }", "public void startDocument() throws SAXException {\n\tcurGroupId = \"\";\n\tcurGeneSet.clear();\n\tmHgEntryIdHandler.reset();\n\tsuper.startDocument();\n }", "protected void createSemanticAnnotations() {\n\t\tString source = \"http://www.polarsys.org/capella/semantic\";\t\n\t\taddAnnotation\n\t\t (this, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedRequirementPkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedAbstractCapabilityPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedStateMachines(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_UsedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ImplementedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_AllocatedComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_AllocatingComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ProvidedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_RequiredInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"feature\", \"ownedFeatures\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedParts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"feature\", \"ownedFeatures\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedPhysicalPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"feature\", \"ownedFeatures\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedPhysicalPath(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedPhysicalLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedPhysicalLinkCategories(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (partEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_DeployedParts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_DeployingParts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_OwnedAbstractType(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getSystemComponent_DataComponent(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfacePkgEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfacePkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_Mechanism(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ImplementorComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_UserComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ExchangeItems(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_OwnedExchangeItemAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RequiringComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RequiringComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ProvidingComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ProvidingComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizingLogicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizedContextInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizingPhysicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizedLogicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (exchangeItemAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_SendProtocol(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_ReceiveProtocol(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_AllocatedItem(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_DeployedElement(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_Location(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractPhysicalArtifact_AllocatorConfigurationItems(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractPhysicalLinkEnd_InvolvedLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_LinkEnds(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_OwnedPhysicalLinkEnds(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_Categories(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_SourcePhysicalPort(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_TargetPhysicalPort(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_RealizedPhysicalLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_RealizingPhysicalLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalLinkCategoryEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkCategory_Links(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalLinkEndEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Port(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Part(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPathEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_OwnedPhysicalPathInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_FirstPhysicalPathInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_RealizedPhysicalPaths(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_RealizingPhysicalPaths(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPathInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_NextInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_PreviousInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_InvolvedElement(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPathReferenceEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathReference_ReferencedPhysicalPath(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPortEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_AllocatedComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_RealizedPhysicalPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_RealizingPhysicalPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\n\t}", "void setFeatureArray(org.landxml.schema.landXML11.FeatureDocument.Feature[] featureArray);", "void setFeatureArray(org.landxml.schema.landXML11.FeatureDocument.Feature[] featureArray);", "public void setMlSdef15(String mlSdef15) {\n this.mlSdef15 = mlSdef15;\n }", "@Override\n\t@XmlElement\n\tpublic void setSextCode(String sextCode) {\n\t\t\n\t}", "public void setPropagateTags(String propagateTags) {\n this.propagateTags = propagateTags;\n }", "public void setItalics() {\n bold.setSelected(false);\n underline.setSelected(false);\n Ok.setSelected(false);\n italics.setSelected(true); /*FAULT:: italics.setSelected(false); */\n }" ]
[ "0.5401823", "0.5298121", "0.5227367", "0.51060253", "0.5023826", "0.4991034", "0.49334896", "0.48132387", "0.4777149", "0.47735715", "0.4755849", "0.47386405", "0.4736771", "0.4727366", "0.4717211", "0.4715852", "0.47149137", "0.4702337", "0.46973306", "0.46546564", "0.46438813", "0.46362653", "0.46353808", "0.46303982", "0.462668", "0.462668", "0.4624659", "0.4621171", "0.46129942", "0.46122465", "0.45965517", "0.45765162", "0.4567045", "0.4562509", "0.4535712", "0.451796", "0.44956732", "0.44804144", "0.44802296", "0.44794792", "0.44736668", "0.44725287", "0.44440627", "0.44346663", "0.44227627", "0.4419966", "0.44182143", "0.4412815", "0.44082892", "0.43952382", "0.43917876", "0.43781215", "0.43746093", "0.4360761", "0.434605", "0.43448627", "0.43440792", "0.43434346", "0.4341023", "0.43388498", "0.43224716", "0.43185553", "0.43142474", "0.43142474", "0.43142474", "0.43142474", "0.43081078", "0.43050373", "0.43036392", "0.43036392", "0.43036392", "0.43036392", "0.43036392", "0.43008763", "0.42905566", "0.42845052", "0.42541066", "0.4252315", "0.4252315", "0.42522052", "0.42513624", "0.4249303", "0.42487487", "0.4247061", "0.42458993", "0.42437324", "0.42436898", "0.42420578", "0.4236759", "0.42342898", "0.4227221", "0.42265853", "0.42227358", "0.42199433", "0.4214418", "0.4214418", "0.4210588", "0.4201352", "0.41952187", "0.41894487" ]
0.69353205
0
if allTags == true, specifies that all SGML tags are to be converted to annotations when this document is opened. Applicable only to documents of format 'sgml'.
public void setAllTags (boolean allTags) { this.allTags = allTags; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setAllTags(ArrayList<String> allTags) {\r\n this.allTags = allTags;\r\n }", "public void setSGMLtags (String[] tags) {\n\t\tSGMLtags = tags;\n\t}", "public void setMacthAllSkillTag(boolean macthAllSkillTag) {\n\t\tthis.macthAllSkillTag = macthAllSkillTag;\n\t}", "public void save () {\n\t\tif (!open) {\n\t\t\tSystem.out.println (\"ExternalDocument.save: attempt to save unopened document \" + fileName);\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tif (format.equals(\"sgml\")) {\n\t\t\t\tString tagToWrite;\n\t\t\t\tif (allTags)\n\t\t\t\t\ttagToWrite = null;\n\t\t\t\telse if (SGMLtags.length == 0)\n\t\t\t\t\ttagToWrite = \"***\"; // unused annotation type\n\t\t\t\telse if (SGMLtags.length == 1)\n\t\t\t\t\ttagToWrite = SGMLtags[0];\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println (\"ExternalDocument.save: cannot write more than 1 annotation type\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tString string = writeSGML(tagToWrite).toString();\n\t\t\t\tFile file = new File(fullFileName());\n\t\t\t\tBufferedWriter writer = new BufferedWriter (\n\t\t\t\t\t\tnew OutputStreamWriter (new FileOutputStream(file), JetTest.encoding));\n\t\t\t\twriteWithSystemNewlines (writer, string);\n\t\t\t\twriter.close();\n\t\t\t} else {\n\t\t\t\t\tSystem.out.println (\"Error saving document \" + fileName);\n\t\t\t\t\tSystem.out.println (\"Unknown document format.\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println (\"Error opening document \" + fileName);\n\t\t\t\tSystem.out.println (e);\n\t\t}\n\t}", "public boolean isMacthAllSkillTag() {\n\t\treturn macthAllSkillTag;\n\t}", "public void setAll(boolean all) {\n uppercase = all;\n lowercase = all;\n numbers = all;\n symbols = all;\n }", "public void setReplaceAll(boolean pReplaceAll) {\n replaceAll = pReplaceAll;\n }", "public void setSldAll(org.openxmlformats.schemas.presentationml.x2006.main.CTEmpty sldAll)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.presentationml.x2006.main.CTEmpty target = null;\n target = (org.openxmlformats.schemas.presentationml.x2006.main.CTEmpty)get_store().find_element_user(SLDALL$6, 0);\n if (target == null)\n {\n target = (org.openxmlformats.schemas.presentationml.x2006.main.CTEmpty)get_store().add_element_user(SLDALL$6);\n }\n target.set(sldAll);\n }\n }", "private void loadOldTags() throws IOException {\n File fileAnnotation = new File(filePathAnnDestination);\n if (!fileAnnotation.exists()) {\n fileAnnotation.createNewFile();\n }\n FileReader fr = new FileReader(fileAnnotation);\n\n\n\n\n BufferedReader br = new BufferedReader(fr);\n String line;\n\n while ((line = br.readLine()) != null) {\n String[] annotations = line.split(\"[ \\t]\");\n String word = line.substring(line.lastIndexOf('\\t') + 1);\n String[] words = word.split(\" \");\n\n int start = Integer.parseInt(annotations[2]);\n if (words.length != 0) {\n for (int i = 0; i < words.length; i++) {\n int end = start + words[i].length();\n taggedItems.put(start + \"-\" + end, annotations[1]);\n System.out.println(\"Loading old tags: \" + start + \"-\" + end + \"\\t\" + annotations[1]);\n start = end + 1;\n }\n }\n taggedItems.put(annotations[2] + \"-\" + annotations[3], annotations[1]);\n\n noOfTagsAlready = Integer.parseInt(annotations[0].substring(1));\n if (noOfTagsAlreadyMax < noOfTagsAlready)\n noOfTagsAlreadyMax = noOfTagsAlready;\n }\n br.close();\n fr.close();\n System.out.println(\"Loaded tags\");\n }", "public String showTagsOfWord(String searchTerm, HashSet<String> allTags) {\n StringBuilder stringBuilder = new StringBuilder(\"Your word \\\"\" + searchTerm + \"\\\" has \" + allTags.size()\n + (allTags.size() == 1 ? \" tag:\\n\" : \" tags:\\n\"));\n for (String tag : allTags) {\n stringBuilder.append(tag + \"\\n\");\n }\n return stringBuilder.toString();\n }", "public boolean open() {\n\t\tif (!open) {\n\t\t\ttry {\n\t\t\t\tif (format.equals(\"sgml\")) {\n\t\t\t\t\tFile file = new File(fullFileName());\t//return the full file name,including directory and filename\n\t\t\t\t\tString line;\n\t\t\t\t\tBufferedReader reader = new BufferedReader (\n\t\t\t\t\t\t// (new FileReader(file));\n\t\t\t\t\t\tnew InputStreamReader (new FileInputStream(file), JetTest.encoding));\n\t\t\t\t\tStringBuffer fileText = new StringBuffer();\t\t//store all text in filename\n\t\t\t\t\twhile((line = reader.readLine()) != null)\n\t\t\t\t\t\tfileText.append(line + \"\\n\");\n\t\t\t\t\tString text = fileText.toString(); //Store the converted text\n\t\t\t\t\tSGMLProcessor.allTags = allTags;\t\n\t\t\t\t\tSGMLProcessor.emptyTags = emptyTags;\n\t\t\t\t\tDocument doc = SGMLProcessor.sgmlToDoc (this, text, SGMLtags);\t//Because format.equals(\"sgml\")\n\t\t\t\t\topen = true;\n\t\t\t\t\treturn true;\n\t\t\t\t} else if (format.equals(\"pos\")) {\n\t\t\t\t\tposRead();\n\t\t\t\t\topen = true;\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println (\"Error opening document \" + fileName);\n\t\t\t\t\tSystem.out.println (\"Unknown document format.\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\t\tSystem.out.println (\"Error opening document \" + fileName);\n\t\t\t\t\tSystem.out.println (e);\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\t// return true if already open\n\t\t\treturn true;\n\t\t}\n\t}", "void startAll(GroupSG group) throws SAXException;", "void endAll(GroupSG group) throws SAXException;", "public void setArrAll(boolean isArrAll) {\n\t\tthis.isArrAll = isArrAll;\n\t}", "@Override\n\tpublic void setTagged(boolean tagged) {\n\t\tthis.tagged = tagged;\n\t\t\n\t}", "void dump(boolean all) {\n // For XML update\n Node tree = stateDoc.getDocumentElement();\n NodeList children = tree.getChildNodes();\n\n long first = 0;\n long end = 0;\n if (act != null) {\n // first & last date to keep\n\t first = act.getDate() - back * main.DAY;\n\t end = act.getDate() + front * main.DAY;\n }\n\n for (int i = 0; i < children.getLength(); i++) {\n NamedNodeMap attr = children.item(i).getAttributes();\n if (attr != null) {\n String name = attr.getNamedItem(\"name\").getNodeValue();\n if (first > Data.string2date(name) ||\n end < Data.string2date(name) || all) {\n tree.removeChild(children.item(i));\n availWeath.remove(name);\n }\n }\n }\n\n // Redraw\n tDisplay = Integer.MIN_VALUE;\n inform(act);\n }", "ArrayList<String> getAllTags() {\r\n return allTags;\r\n }", "@Override\n public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {\n // <document>\n if (localName.equals(\"document\")) {\n curArticle = new ArticleSmallOpinion();\n curTagiot = new ArrayList<Tagit>();\n\n // add values\n if (atts.getValue(\"doc_id\") != null) curArticle.setDoc_id(atts.getValue(\"doc_id\"));\n if (atts.getValue(\"title\") != null) curArticle.setTitle(atts.getValue(\"title\"));\n if (atts.getValue(\"sub_title\") != null) curArticle.setSubTitle(atts.getValue(\"sub_title\"));\n if (atts.getValue(\"f7\") != null) curArticle.setF7(atts.getValue(\"f7\"));\n String author = atts.getValue(\"author_icon\");\n author = extractImageUrl(author);\n if (atts.getValue(\"author_icon\") != null) curArticle.setAuthorImgURL(author);\n if (atts.getValue(\"Created_On\") != null) curArticle.setCreatedOn(atts.getValue(\"Created_On\"));\n\n }\n // <f2>\n else if (localName.equals(\"f2\")) {\n if (atts.getValue(\"src\") != null) curArticle.setF2(atts.getValue(\"src\"));\n\n // currently not holding image photographer via \"title=\"\n }\n // <f3>\n if (localName.equals(\"f3\")) {\n if (atts.getValue(\"src\") != null) curArticle.setF3(atts.getValue(\"src\"));\n // currently not holding image photographer via \"title=\"\n }\n // <f4>\n else if (localName.equals(\"f4\")) {\n if (atts.getValue(\"src\") != null) curArticle.setF4(atts.getValue(\"src\"));\n // currently not holding image photographer via \"title=\"\n }\n // <tagit>\n else if (localName.equals(\"tagit\")) {\n Tagit tagit = new Tagit(atts.getValue(\"id\"), atts.getValue(\"simplified\"), \"\");\n curTagiot.add(tagit);\n }\n\n }", "public void setIdTagsOff () {\n\t\tidTags = false;\n\t}", "public XMLSaxHandler(JCas aJCas, String mXmlTagContainingText, HashMap XmlTagsToTurnIntoAnnotationHashMap) {\n\t\tthis.setaJCas(aJCas);\n\t\tthis.mXmlTagContainingText = mXmlTagContainingText;\n\t\tthis.XmlTagsToTurnIntoAnnotationHashMap = XmlTagsToTurnIntoAnnotationHashMap;\n\n\t\t// Si l'on n'a pas spécifié de tag particulier dont il faut traiter le contenu textuel \n\t\t// alors on traite tous les tags\n\t\t// par défaut insideTextTag devient true\n\t\t//insideTextTag = (mXmlTagContainingText == null);\n\t\t// TODO there is a bug when mXmlTagContainingText is set (like \"p\") and when there is empty elements previously\n\t\t// to avoid such a problem, we prefer to desactivate it \n\t\t// see the text of solen gsearch_paper_1.xml to threw the same error\n\t\tinsideTextTag = true; \n\n\t}", "public void setAllPaths(boolean allPaths) {\n\t\tthis.allPaths = allPaths;\n\t}", "@Override\n public boolean isTagged() {\n for (List<String> t : tags.values()) {\n if(!t.isEmpty()) return true;\n }\n return false;\n }", "public final void mT__157() throws RecognitionException {\n try {\n int _type = T__157;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalMyDsl.g:155:8: ( 'All' )\n // InternalMyDsl.g:155:10: 'All'\n {\n match(\"All\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public boolean isSaveAllEnabled() {\n \t\tif (text == null || text.isDisposed())\n \t\t\treturn false;\n \t\treturn true;\n \t}", "public void tagDocument (Document doc) {\n\t\tmene.newDocument();\n\t\tVector textSegments = doc.annotationsOfType (\"TEXT\");\n\t\tIterator it = textSegments.iterator ();\n\t\twhile (it.hasNext ()) {\n\t\t\tAnnotation ann = (Annotation)it.next ();\n\t\t\tSpan textSpan = ann.span ();\n\t\t\tSentenceSplitter.split (doc, textSpan);\n\t\t}\n\t\tVector sentences = doc.annotationsOfType (\"sentence\");\n\t\tIterator is = sentences.iterator ();\n\t\twhile (is.hasNext ()) {\n\t\t\tAnnotation sentence = (Annotation)is.next ();\n\t\t\tSpan sentenceSpan = sentence.span();\n\t\t\tTokenizer.tokenize (doc, sentenceSpan);\n\t\t\tLexicon.annotateWithDefinitions(doc, sentenceSpan.start(), sentenceSpan.end());\n\t\t\ttag (doc, sentenceSpan);\n\t\t}\n\t}", "public void setSelectAll(boolean selectAll) {\n\t\tif (selectAll && isRDF()) this.selectAll = false;\r\n\t\telse this.selectAll = selectAll;\r\n\t}", "public void setFirstSentenceTags(Tag[] _firstSentenceTags)\n\t{ firstSentenceTags = _firstSentenceTags; }", "public String getIsSelectedAll() {\r\n return this.stemSearch.getIsSelectedAll().toString();\r\n }", "public boolean getReplaceAll() {\n return replaceAll;\n }", "public LagartoDOMBuilder enableXmlMode() {\n\t\tconfig.ignoreWhitespacesBetweenTags = true; // ignore whitespaces that are non content\n\t\tconfig.parserConfig.setCaseSensitive(true); // XML is case sensitive\n\t\tconfig.parserConfig.setEnableRawTextModes(false); // all tags are parsed in the same way\n\t\tconfig.enabledVoidTags = false; // there are no void tags\n\t\tconfig.selfCloseVoidTags = false; // don't self close empty tags (can be changed!)\n\t\tconfig.impliedEndTags = false; // no implied tag ends\n\t\tconfig.parserConfig.setEnableConditionalComments(false); // disable IE conditional comments\n\t\tconfig.parserConfig.setParseXmlTags(true); // enable XML mode in parsing\n\t\treturn this;\n\t}", "private void saveTags() {\n SavedFolders.editFolder(this.folder);\n }", "void addToAllTags(Tag T){\r\n this.allTags.add(T.getTagName());\r\n }", "public void setAllDay(Boolean allDay) {\n this.allDay = allDay;\n }", "private void cleanupRawTags(ArrayList p_tags)\n {\n // Find the paired tags that belong together.\n // !!! DO NOT RELY ON PAIRING STATUS. Some prop changes start\n // after <seg> but close after </seg> and even after </tu>!!!\n assignPairingStatus(p_tags);\n\n // Basic cleanup: remove surrounding <p> and inner <o:p>\n removeParagraphTags(p_tags);\n\n // Remove revision markers when they were ON accidentally\n // before translating documents or during an alignment task\n // (WinAlign).\n removePropRevisionMarkers(p_tags);\n\n // Cleanup INS/DEL revisions similarly.\n removeDelRevisions(p_tags);\n applyInsRevisions(p_tags);\n\n // WinAligned files can contain endnotes (and footnotes, but I\n // think in Word-HTML they're both endnotes).\n removeEndNotes(p_tags);\n\n // Remove empty spans that are created from superfluous\n // original formatting in Word (<span color=blue></span>)\n removeEmptyFormatting(p_tags);\n\n // Leave the rest to the Word-HTML Extractor.\n }", "public void setTrustAllSSLCertificates(boolean trustAllSSLCertificates) {\n this.trustAllSSLCertificates = trustAllSSLCertificates;\n }", "public void reset() {\n\t\tfor (int i = 0; i < markedElements.size(); i++) {\n\t\t\tif (markedElements.get(i) instanceof Word) {\n\t\t\t\tWord word = (Word) markedElements.get(i);\n\t\t\t\teditor.setCaretPosition(word.getEndPosition() + 1);\n\t\t\t\tint start = word.getStartPosition();\n\t\t\t\tint end = word.getEndPosition();\n\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN, true);\n\t\t\t} else if (markedElements.get(i) instanceof FunctionWord) {\n\t\t\t\tFunctionWord fword = (FunctionWord) markedElements.get(i);\n\t\t\t//\tif(fword.getWord().getEndPosition()!= fword.getEndPosition()) {\n\t\t\t\t\t// fword ist teil eines gr��eren Wortes-> Endposition als caretposition verwenden\n\t\t\t//\t\teditor.setCaretPosition(fword.getEndPosition() + 1);\n\t\t\t//\t}\n\t\t\t//\telse {\n\t\t\t\t\teditor.setCaretPosition(fword.getEndPosition() + 1);\n\t\t\t//\t}\n\t\t\t\tint start = fword.getStartPosition();\n\t\t\t\tint end = fword.getEndPosition();\n\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN, true);\n\t\t\t} else if (markedElements.get(i) instanceof ConstitutiveWord) {\n\t\t\t\tConstitutiveWord cword = (ConstitutiveWord) markedElements\n\t\t\t\t\t\t.get(i);\n\t\t\t\teditor.setCaretPosition(cword.getEndPosition() + 1);\n\t\t\t\tint start = cword.getStartPosition();\n\t\t\t\tint end = cword.getEndPosition();\n\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN, true);\n\t\t\t} else if (markedElements.get(i) instanceof IllocutionUnit) {\n\t\t\t\tIllocutionUnit iu = (IllocutionUnit) markedElements.get(i);\n\t\t\t\tfor (int j = 0; j < iu.getTokens().size(); j++) {\n\t\t\t\t\tToken token = (Token) iu.getTokens().get(j);\n\t\t\t\t\tint start = token.getStartPosition();\n\t\t\t\t\tint end = token.getEndPosition();\n\t\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN,\n\t\t\t\t\t\t\ttrue);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tmarkedElements.clear();\n\t\tdesignText(Model.getIllocutionUnitRoots());\n\t}", "public void setRequireAll(final boolean flag) {\n checkSetterPreconditions();\n requireAll = flag;\n }", "public void setTrimAllWhite(boolean trimAllWhite) {\r\n defaultFormat.trimAllWhite = trimAllWhite;\r\n }", "public boolean hasTags() {\n return isTagged();\n }", "public void deleteAllTags(boolean toResetName){\r\n\t\ttags.clear();\r\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t\tclearChanged();\r\n\t\tdeleteObservers();\t\r\n\t\t\r\n\t\tif (toResetName){\r\n\t\t\tsetName();\r\n\t\t}\r\n\t}", "public void saveAll() {\n try {\n writeObject(IMAGE_DATA_PATH, imageFiles);\n writeObject(EXISTING_TAGS_PATH, existingTags);\n } catch (IOException e) {\n // e.printStackTrace();\n }\n }", "IParser setDontEncodeElements(Collection<String> theDontEncodeElements);", "public void setEmptyTags (String[] tags) {\n\t\temptyTags = tags;\n\t}", "protected boolean isAllJava() {\r\n System.out.println(\"RefactoringAction.isAllJava()\");\r\n if (selectedFileSet == null) {\r\n return true;\r\n } else {\r\n return selectedFileSet.isAllJava();\r\n }\r\n }", "void toXml(OutputStream out, boolean format) throws IOException;", "@Override\n\tpublic boolean isTagged() {\n\t\treturn tagged;\n\t}", "public void setAllSolutions(List<List> allSolutions) {\r\n this.allSolutions = allSolutions;\r\n }", "public void close(){\r\n Transformer t = null;\r\n\t\ttry {\r\n\t\t\tt = TransformerFactory.newInstance().newTransformer();\r\n\t\t\tt.setOutputProperty(OutputKeys.METHOD, \"xml\");\r\n\t\t\tt.setOutputProperty(OutputKeys.INDENT, \"yes\"); \r\n\t\t\tt.transform(new DOMSource(document), new StreamResult(new FileOutputStream(XMLFileName))); \t\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }", "public void setInheritAll(boolean value) {\n inheritAll = value;\n }", "protected void deleteAllTag() {\n\t\tReaderDataBase.deleteAll(this);\n\t}", "public\t\tvoid\t\tsetIterateThroughAllLayers(boolean flag)\n\t\t{\n\t\titerateThroughAllLayers = flag;\n\t\tinitialize();\n\t\t}", "public static void save(String fn, AllSTLsToBuild allSTL)\n\t{\n\t\tif(!fn.endsWith(\".rfo\"))\n\t\t\tfn += \".rfo\";\n\t\tRFO rfo = new RFO(fn, allSTL);\n\t\trfo.copySTLs();\n\t\trfo.createLegend();\n\t\trfo.compress();\n\t\tFile t = new File(rfo.tempDir);\n\t\trecursiveDelete(t);\n\t}", "public void buildPackageTags(XMLNode node, Content packageContentTree) {\n if (configuration.nocomment) {\n return;\n }\n packageWriter.addPackageTags(packageContentTree);\n }", "public void setTags(ArrayList<String> tags){\n for(String s : tags){\n this.tags.add(s);\n }\n }", "public void parseCGXMLCG( Graph graph ) {\n if ( graph == null ) {\n _topLevelGraph = new Graph(); // never used\n } else {\n _topLevelGraph = graph;\n }\n Element docelem = doc.getDocumentElement();\n if ( docelem == null ) {\n return;\n }\n\n if ( !docelem.getTagName().equals( \"conceptualgraph\" ) ) {\n Global.warning( \"Outermost XML tag \\\"\" + docelem.getTagName() + \"\\\" should be \\\"conceptualgraph\\\".\" );\n }\n\n if ( !this.isPreserveGraph() ) {\n NamedNodeMap docmap = docelem.getAttributes();\n _topLevelGraph.createdTimeStamp = getNamedAttributeFromMap( docmap, \"created\" );\n _topLevelGraph.modifiedTimeStamp = getNamedAttributeFromMap( docmap, \"modified\" );;\n if ( _topLevelGraph.modifiedTimeStamp == null ) {\n _topLevelGraph.modifiedTimeStamp = _topLevelGraph.createdTimeStamp;\n }\n if ( _topLevelGraph.createdTimeStamp == null ) {\n _topLevelGraph.createdTimeStamp = _topLevelGraph.modifiedTimeStamp;\n }\n\n String s = getNamedAttributeFromMap( docmap, \"wrapLabels\" );\n if ( s != null ) {\n _topLevelGraph.wrapLabels = Boolean.parseBoolean( s );\n }\n s = getNamedAttributeFromMap( docmap, \"wrapColumns\" );\n if ( s != null ) {\n _topLevelGraph.wrapColumns = Integer.parseInt( s );\n }\n }\n\n NodeList nodes = docelem.getChildNodes();\n for ( int childnum = 0; childnum < nodes.getLength(); childnum++ ) {\n if ( nodes.item( childnum ).getNodeType() == Node.ELEMENT_NODE ) {\n // is either a top level graph element or a graph being pasted/duplicated\n Element elem = (Element)nodes.item( childnum );\n if ( isPreserveGraph() ) {\n GraphObject go = instantiateGraphObject( elem.getTagName() );\n if ( go != null ) {\n setID( elem, go ); // make sure we set the id before adding to the graph\n _topLevelGraph.insertObject( go ); // add this object to the graph\n if ( isMakeList() ) {\n _parsedObjects.add( go ); // add to the list of objects to be returned\n }\n parseGraphObjectElement( elem, go ); // populate the object\n }\n } else {\n parseCGXMLGraphTagElement( elem, _topLevelGraph );\n }\n }\n }\n }", "public void g() throws Rte6mainIOException\n\t{\n\t\tfinal String GS_FILE_NAME = \"/media/Data/asher/data/dev/alpha_system/rte6/RTE6_DEVSET/RTE6_Main_DEVSET_GS.xml\";\n\t\tAnswersFileReader afr = new DefaultAnswersFileReader();\n\t\tafr.setGoldStandard(false);\n\t\tafr.setXml(GS_FILE_NAME);\n\t\tafr.read();\n\t\tMap<String,Map<String,Set<SentenceIdentifier>>> answers = afr.getAnswers();\n\t\t\n\t\t\n\t\tAnswersFileWriter afw = new DefaultAnswersFileWriter();\n\t\tafw.setWriteTheEvaluationAttribute(true);\n\t\tafw.setAnswers(answers);\n\t\tafw.setXml(GS_FILE_NAME+\".my.xml\");\n\t\tafw.write();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static Idea fromXML(Element idea, Collection<Note>allExistingNotes, String pathToSaveDirectory) throws IOException {\n\t\tString prompt = ((Element) idea.getElementsByTagName(\"Prompt\").item(0)).getTextContent().trim() ;\n\t\tString isPromptKeyWord = ((Element) idea.getElementsByTagName(\"IsPromptKeyWord\").item(0)).getTextContent().trim() ;\n\t\tString keyWords = ((Element) idea.getElementsByTagName(\"KeyWords\").item(0)).getTextContent().trim() ;\n\t\tString id = ((Element) idea.getElementsByTagName(\"ID\").item(0)).getTextContent().trim() ;\n\t\tIdea createdIdea = new Idea(prompt, (isPromptKeyWord.contains(\"true\") ? true : false), id );\n\t\tcreatedIdea.addKeyWordsFromCSV(keyWords);\n\t\t\n\t\tNodeList nodes = idea.getElementsByTagName(\"Note\");\n\t\tfor(int i=0; i<nodes.getLength(); i++) {\n\t\t\tif(nodes.item(i) instanceof Element &&\n\t\t\t\t\t!((Element) nodes.item(i).getParentNode()).getTagName().equals(\"FinalNote\") ) {\n\t\t\t\t\t//ignores note under Final Model.Note tag to avoid repeat notes\n\t\t\t\tboolean type = ((Element) nodes.item(i).getParentNode()).getTagName().equals(\"PromptNotes\") ;\n\t\t\t\t\n\t\t\t\tif( ((Element) nodes.item(i)).getElementsByTagName(\"Text\").getLength() > 0) {\n\t\t\t\t\tElement elem = (Element) ((Element) nodes.item(i)).getElementsByTagName(\"Text\").item(0);\n\t\t\t\t\tcreatedIdea.addNote(TextExcerpt.fromXML(elem,allExistingNotes,pathToSaveDirectory),type );\n\t\t\t\t}else if( ((Element) nodes.item(i)).getElementsByTagName(\"Image\").getLength() > 0 ) {\n\t\t\t\t\tElement elem = (Element) ((Element) nodes.item(i)).getElementsByTagName(\"Image\").item(0);\n\t\t\t\t\tcreatedIdea.addNote(Image.fromXML(elem,allExistingNotes,pathToSaveDirectory),type );\n\t\t\t\t}else if( ((Element) nodes.item(i)).getElementsByTagName(\"Book\").getLength() > 0 ) {\n\t\t\t\t\tElement elem = (Element) ((Element) nodes.item(i)).getElementsByTagName(\"Book\").item(0);\n\t\t\t\t\tcreatedIdea.addNote(Book.fromXML(elem,allExistingNotes,pathToSaveDirectory),type );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tElement finalNote = (Element) idea.getElementsByTagName(\"FinalNote\").item(0);\n\t\tString path = (finalNote.getElementsByTagName(\"Path\").getLength()>0 ? finalNote.getElementsByTagName(\"Path\").item(0).getTextContent() : null);\n\t\tString name = (finalNote.getElementsByTagName(\"Name\").getLength()>0 ? finalNote.getElementsByTagName(\"Name\").item(0).getTextContent() : null);\n\t\t\n\t\tNote fN = ( name==null ? null : createdIdea.getNote(name, path) );\n\t\tcreatedIdea.setFinalNote(fN);\n\t\t\n\t\treturn createdIdea;\n\t}", "public static void addAllPossesives(AnnotationSet nps, Document doc, Map<Annotation, ArrayList<Annotation>> posessives)\r\n{\r\n for (Annotation np : nps) {\r\n addPossesives(np, doc, posessives);\r\n }\r\n}", "@FXML\n private void seeAllTagsEvent() throws IOException {\n loadNextScene(rootPane, \"/views/AllTagPane.fxml\");\n }", "public void setAllFiles(HashMap<String, String> allFiles) {\n _allFiles = allFiles;\n }", "private static void annotationOut(SchemaComponent sc) {\n if (sc.getAnnotation().getAppinfos().size() > 0) {\n System.out\n .print(\" Annotation (appinfos) available with the content: \");\n for (Appinfo appinfo : sc.getAnnotation().getAppinfos()) {\n out(appinfo.getContent());\n }\n } else {\n System.out\n .print(\" Annotation (documentation) available with the content: \");\n for (Documentation doc : sc.getAnnotation().getDocumentations()) {\n out(doc.getContent());\n }\n }\n }", "boolean hasTags();", "public String showAllTags(String[] tagList) {\n StringBuilder stringBuilder = new StringBuilder(\"Here are all of your tags:\\n\");\n for (String tag : tagList) {\n stringBuilder.append(tag + \"\\n\");\n }\n return stringBuilder.toString();\n }", "protected boolean isEmptyXmlTagExpanded() {\n return false;\n }", "public boolean isSetTags() {\n return this.Tags != null;\n }", "public void enableNGramTagsStatistics() {\n\t\t_nGramTagsStatsMap = new CIntMap();\n\t}", "private void setTagEditable(boolean bool){\n \t\teditTag.setVisible(!bool);\r\n \t\teditTag.setVisible(bool); //actually we want editTag visible false\r\n \t\t\r\n \t\tviewTag.setVisible(bool);\r\n \t\tviewTag.setVisible(!bool); //actually we want viewTag visible true\r\n \t}", "@Override\n\tpublic void all() {\n\t\t\n\t}", "public void mo7203a(boolean allCaps) {\n this.f2970a.setAllCaps(allCaps);\n }", "public void setToTag(String tag) throws ParseException,NullPointerException;", "public final void rule__Intervall__TagAssignment_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16962:1: ( ( RULE_TAG ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16963:1: ( RULE_TAG )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16963:1: ( RULE_TAG )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16964:1: RULE_TAG\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getIntervallAccess().getTagTAGTerminalRuleCall_1_0()); \r\n }\r\n match(input,RULE_TAG,FOLLOW_RULE_TAG_in_rule__Intervall__TagAssignment_134225); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getIntervallAccess().getTagTAGTerminalRuleCall_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic int acceptAllTranslations(boolean bIgenoreSegmentsWithExistingTranslations)\n\t{\n\t\tthis.statusDisplayWindow.setText(\"\");\n\t\tfor (int k = 0; k < this.xliffEditorWindow.getIOverallSegmentNumber(); k++)\n\t\t{\n\t\t\tthis.xliffEditorWindow.gotoSegment(k, true);\n\n\t\t\tshowAltTrans(k, 0, 0);\n\t\t\tTransUnitInformationData transData = this.xliffEditorWindow.getSegmentTransUnitInformation(k);\n\t\t\tif (transData.isBApproved())\n\t\t\t\tcontinue;\n\t\t\tif (!transData.getTargetText().equals(\"\") && bIgenoreSegmentsWithExistingTranslations)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tElement transunit = getXliffEditorWindow().getTransUnits().get(k);\n\t\t\tList<Element> altranslist = transunit.getChildren(\"alt-trans\", xliffEditorWindow.getXliffDocument().getNamespace());\n\t\t\tif (altranslist.size() > 0)\n\t\t\t{\n\t\t\t\tfor (int i = 0; i < altranslist.size(); i++)\n\t\t\t\t{\n\t\t\t\t\tElement altrans = altranslist.get(i);\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tList<Element> targetlist = altrans.getChildren(\"target\", xliffEditorWindow.getXliffDocument().getNamespace());\n\t\t\t\t\t\tif (targetlist.size() > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tElement target = targetlist.get(0);\n\t\t\t\t\t\t\tString translation = xmlDoc.elementToString(target);\n\t\t\t\t\t\t\ttranslation = translation.replaceAll(\"\\\\<target.*?>(.*?)\\\\</target>\", \"$1\");\n\t\t\t\t\t\t\tif (translation.equals(\"\"))\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\tint iRes = this.xliffEditorWindow.setTranslation(k, translation, true);\n\t\t\t\t\t\t\tif (iRes == SWT.CANCEL)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tsegmentNumber.setText(message.getString(\"_Segmentnumber\") + \" \" + k + \"/\"\n\t\t\t\t\t\t\t\t\t\t+ this.getXliffEditorWindow().getIOverallSegmentNumber() + \" (\"\n\t\t\t\t\t\t\t\t\t\t+ this.getXliffEditorWindow().countApprovedSegments() + \"/\"\n\t\t\t\t\t\t\t\t\t\t+ this.getXliffEditorWindow().countTranslatedSegments() + \")\");\n\t\t\t\t\t\t\t\treturn iRes;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (iRes == SWT.YES)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.statusDisplayWindow.setText(statusDisplayWindow.getText() + message.getString(\"AcceptedMatchingTarget\") + \" \"\n\t\t\t\t\t\t\t\t\t\t+ k + \"\\n\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e)\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsegmentNumber.setText(message.getString(\"_Segmentnumber\") + \" \" + (this.xliffEditorWindow.getIOverallSegmentNumber() - 1) + \"/\"\n\t\t\t\t+ this.getXliffEditorWindow().getIOverallSegmentNumber() + \" (\" + this.getXliffEditorWindow().countApprovedSegments() + \"/\"\n\t\t\t\t+ this.getXliffEditorWindow().countTranslatedSegments() + \")\");\n\n\t\treturn SWT.YES;\n\t}", "protected void createParseAllVisitorInterface(File dir) {\n\t // Prepare the arguments for the output procedure\n\t PrintWriter visitor=null;\n\t String fileName = context.getNaming().getParseAllVisitorInterface(modelName)+\".java\";\n\t try {\n\t visitor = new PrintWriter(new FileWriter(new File(dir, fileName)), true);\n\t } catch (Exception e) {\n\t log.reportError(\"Cannot open file '\"+fileName+\"'.\", e);\n\t }\n\t // Call the output procedure\n\t\t(new InvariantsParseAllInterfTemplate(model, context, invariants, visitor)).generate();\n\t\tvisitor.close();\n\t}", "void setTagCollection(Collection<Tag> tagCollection);", "public void setAllFixed(boolean fixed);", "public void setAllLoaded(boolean value) {\n this.allLoaded = value;\n }", "public void setAllPluginNames(List<String> allPluginNames) {\n\t\tthis.allPluginNames = allPluginNames;\n\t}", "boolean isSetTag();", "public void displayGlobalTags(Collection<Tag> globalTags) {\n this.showGlobalTagViewPanel();\n tagFlowPane.getChildren().clear();\n globalTags.forEach(this::appendTag);\n }", "@JsonProperty(\"is_drop_all_fields\")\n@ApiModelProperty(example = \"true\", value = \"A boolean that determines whether to drop all fields in this document. If set, input and output fields should not be set\")\n public Boolean isIsDropAllFields() {\n return isDropAllFields;\n }", "public interface SSMLBytesStream {\n\t/**\n\t * Get the (default) encoding.\n\t * This is the default encoding for writeTo() methods (except the 3-parameters).\n\t * @return An explicit encoding for writeTo() methods\n\t * or <code>null</code> (=> use the machine default and no encoding in the xml declaration)\n\t */\n\tCharset getEncoding();\n\n\t/**\n\t * Write the SSML byte[]\n\t * with the &lt;?xml ... ?&gt; declaration\n\t * using the default encoding (if any).\n\t * @throws IOException\n\t * @return\tnumber of written bytes\n\t */\n\tint writeTo(OutputStream out) throws IOException;\n\n\t/**\n\t * A SSMLBytesStream with the possibility to manage the xml declaration and encoding. \n\t *\n\t */\n\tpublic interface SSMLBytesStreamPlus extends SSMLBytesStream {\n\n\t\t/**\n\t\t * Write the SSML byte[]\n\t\t * using a specific encoding.\n\t\t * @param withXmlDecl\tprepend the &lt;?xml ... ?&gt; declaration (with encoding).\n\t\t * @param enc\t(optional) explicit SSML encoding.\n\t\t * \tIf <code>null</code> the default machine encoding will be used.\n\t\t * @throws IOException\n\t\t * @return\tnumber of written bytes\n\t\t */\n\t\tint writeTo(OutputStream out, boolean withXmlDecl, Charset enc) throws IOException;\n\n\t\t/**\n\t\t * Write the SSML byte[]\n\t\t * using the default encoding (if any).\n\t\t * @param withXmlDecl\tprepend the &lt;?xml ... ?&gt; declaration (with encoding).\n\t\t * @throws IOException\n\t\t * @return\tnumber of written bytes\n\t\t */\n\t\tint writeTo(OutputStream out, boolean withXmlDecl) throws IOException;\n\t}\n\n}", "public void enable1GramTagsStatistics(final String[] tags) {\n\t\tif( tags == null) {\n\t\t\tthrow new IllegalArgumentException(\"Cannot enable statistics on undefined tags\");\n\t\t}\n\t\t_1GramTagsStatsMap = new CTagsStats(tags);\n\t}", "@Override\n public void doTag() throws JspException, IOException {\n setAttributes();\n\n String layout = getBodyContent();\n jspContext.getOut().write(layout);\n }", "public final void rule__Intervall__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:4198:1: ( ( ( rule__Intervall__TagAssignment_1 ) ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:4199:1: ( ( rule__Intervall__TagAssignment_1 ) )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:4199:1: ( ( rule__Intervall__TagAssignment_1 ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:4200:1: ( rule__Intervall__TagAssignment_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getIntervallAccess().getTagAssignment_1()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:4201:1: ( rule__Intervall__TagAssignment_1 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:4201:2: rule__Intervall__TagAssignment_1\r\n {\r\n pushFollow(FOLLOW_rule__Intervall__TagAssignment_1_in_rule__Intervall__Group__1__Impl9127);\r\n rule__Intervall__TagAssignment_1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getIntervallAccess().getTagAssignment_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "private void removeEmptyFormatting(ArrayList p_tags)\n {\n boolean b_changed = true;\n\n emptytag: while (b_changed)\n {\n for (int i = 0, max = p_tags.size() - 1; i < max; i++)\n {\n Object o1 = p_tags.get(i);\n Object o2 = p_tags.get(i + 1);\n\n if (o1 instanceof HtmlObjects.Tag\n && o2 instanceof HtmlObjects.EndTag)\n {\n HtmlObjects.Tag tag = (HtmlObjects.Tag) o1;\n HtmlObjects.EndTag etag = (HtmlObjects.EndTag) o2;\n\n if (tag.tag.equalsIgnoreCase(etag.tag)\n && tag.partnerId == etag.partnerId)\n {\n p_tags.remove(i + 1);\n p_tags.remove(i);\n\n continue emptytag;\n }\n }\n }\n\n b_changed = false;\n }\n }", "public final void mT__121() throws RecognitionException {\n try {\n int _type = T__121;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalEsm.g:115:8: ( 'all' )\n // InternalEsm.g:115:10: 'all'\n {\n match(\"all\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "private void markAllAirfields() {\n nations.forEach(this::markAirfields);\n }", "void setOssModified(boolean ossModified);", "private void processStandoffMarkup(Document docExtra) {\n\t\tDOMSnapshot snapExtra = new DOMSnapshot(docExtra, docRoot, new XMLDialect());\n\t\tfor (ITSState itssExtra : snapExtra.iterNodes()) {\n\t\t\tRuleResolver resolver = resolvers.get(itssExtra.node.getNodeName()); \n\t\t\tif (resolver != null) {\n\t\t\t\tGlobalRule rule = resolver.extractRule(snapExtra.attrReader, snapExtra.parameters, itssExtra.node);\n\t\t\t\tapplyRule(resolver, rule);\n\t\t\t}\n\t\t\t\n\t\t\tif (itssExtra.node.getNodeName().equals(\"its:param\")) {\n\t\t\t\tString name = itssExtra.node.getAttributes().getNamedItem(\"name\").getNodeValue();\n\t\t\t\tString value = itssExtra.node.getTextContent();\n\t\t\t\tparameters.add(name, value);\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public boolean setIndividualParamValueFromXML(Element el) {\n\t\treturn false;\n\t}", "void updateTags();", "private String getTemplate(boolean all){ \r\n\t\t\t StringBuilder sb = new StringBuilder();\t\t\t \r\n\t\t\t if(!all){\r\n\t\t\t \tsb.append(\"<tpl if=\\\"age &gt; 30\\\">\");\r\n\t\t\t }else{\r\n\t\t\t \tsb.append(\"<tpl>\");\r\n\t\t\t }\r\n\t\t\t sb.append(\"<p>Age: {age}</p>\");\r\n\t\t\t\tsb.append(\"<p>Sex: {gender}</p>\");\r\n\t\t\t\tsb.append(\"<p>Name: {name}</p>\"); \t\t\t \t\r\n\t\t\t\tsb.append(\"<p>Email: {email}</p>\");\r\n\t\t\t\tsb.append(\"<p>Reviews : </p>\");\r\n\t\t\t\tsb.append(\"<ul>\");\r\n\t\t\t\tsb.append(\"<tpl for=\\\"reviews\\\">\");\t\r\n\t\t\t\tsb.append(\"<li>{title}</li>\");\r\n\t\t\t\tsb.append(\"</tpl>\");\r\n\t\t\t\tsb.append(\"</ul>\");\r\n\t\t\t\tsb.append(\"<hr />\");\r\n\t\t\t\tsb.append(\"</tpl>\");\r\n\t\t\t return sb.toString();\r\n\t\t\t}", "public void setPropagateTags(String propagateTags) {\n this.propagateTags = propagateTags;\n }", "public boolean isSetSldAll()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(SLDALL$6) != 0;\n }\n }", "public boolean setRegionalGIS(AbstractGIS gis)\n {\n if (gis == null) {\n return false;\n }\n\n return setRegionalGIS( gis.get_name() );\n }", "public List<Article> processAllArticles(List<ArticleGeneral> allArticles) {\n\t\t\tDocument document;\n\t\t\tList<Article> articles = new ArrayList<Article>();\n\t\t\tfor (ArticleGeneral articleGeneral : allArticles) {\n\t\t\t\tdocument = connectToPage(articleGeneral.getLink());\n\t\t\t\tString nameItem = getNameOfArticle(document);\n\t\t\t\tString color = getColorOfArticle(document);\n\t\t\t\tString price = getPriceOfArticle(document);\n\t\t\t\tList<String> sizes = getSizesOfArticle(document);\n\t\t\t\tboolean isSoldOut = true;\n\t\t\t\tif (!sizes.isEmpty()) {\n\t\t\t\t\tisSoldOut = false;\n\t\t\t\t}\n\t\t\t\tString link = document.baseUri();\n\t\t\t\tArticle article = new Article(nameItem, color, price, sizes, isSoldOut, link);\n\t\t\t\tarticles.add(article);\n\t\t\t\tSystem.out.println(document.select(\"h1\"));\n\t\t\t}\n\t\t\treturn articles;\n\t}", "public synchronized boolean setGenericWarningFlag(boolean newValue) {\n boolean oldValue = fWarningAll;\n fWarningAll = newValue;\n return oldValue;\n }", "public void setTags(String tags) {\n this.tags = tags;\n }", "@Override\n\tpublic List<Tag> getAllTags() throws Exception {\n\t\treturn null;\n\t}", "private void xmlSave() {\r\n FileDialog fd = new FileDialog(new Frame(), \r\n \"Save as a jMusic XML file...\", \r\n FileDialog.SAVE);\r\n fd.show();\r\n if (fd.getFile() != null) {\r\n jm.util.Write.xml(score, fd.getDirectory() + fd.getFile());\r\n }\r\n }" ]
[ "0.61451703", "0.59372306", "0.58254564", "0.56404674", "0.5042346", "0.49269974", "0.49106574", "0.46524805", "0.46506503", "0.46133614", "0.45997506", "0.45970595", "0.45188835", "0.4489586", "0.4478743", "0.44711867", "0.44575933", "0.44558945", "0.44415298", "0.44082725", "0.4365877", "0.43127978", "0.43095917", "0.42861274", "0.42555192", "0.42281452", "0.42255813", "0.4224155", "0.42221254", "0.42067483", "0.4206021", "0.41997698", "0.41689694", "0.41543075", "0.4147352", "0.41295928", "0.41211376", "0.41003034", "0.4062536", "0.4062037", "0.40548274", "0.40489006", "0.40417233", "0.4037545", "0.4035203", "0.4033339", "0.40146855", "0.40127373", "0.400063", "0.39944196", "0.39910457", "0.3982744", "0.3980778", "0.39636073", "0.39590424", "0.39437914", "0.39346924", "0.39342037", "0.39338982", "0.39316678", "0.39225847", "0.39207506", "0.38988972", "0.3893656", "0.38889578", "0.38854158", "0.38814583", "0.38764104", "0.3870177", "0.38695404", "0.38647333", "0.38636422", "0.3842019", "0.38419148", "0.38379386", "0.3836064", "0.38357836", "0.383326", "0.38295883", "0.38287696", "0.38264373", "0.3822318", "0.38177085", "0.38172325", "0.3816504", "0.38101283", "0.3804524", "0.38026673", "0.38007164", "0.3800383", "0.3795521", "0.3777237", "0.3777192", "0.37759742", "0.37749884", "0.37735295", "0.37720895", "0.3768684", "0.37611437", "0.3759814" ]
0.6785455
0
specify a list of empty tags tags which do not have any corresponding close tags and so should be converted to empty Annotations.
public void setEmptyTags (String[] tags) { emptyTags = tags; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removeEmptyFormatting(ArrayList p_tags)\n {\n boolean b_changed = true;\n\n emptytag: while (b_changed)\n {\n for (int i = 0, max = p_tags.size() - 1; i < max; i++)\n {\n Object o1 = p_tags.get(i);\n Object o2 = p_tags.get(i + 1);\n\n if (o1 instanceof HtmlObjects.Tag\n && o2 instanceof HtmlObjects.EndTag)\n {\n HtmlObjects.Tag tag = (HtmlObjects.Tag) o1;\n HtmlObjects.EndTag etag = (HtmlObjects.EndTag) o2;\n\n if (tag.tag.equalsIgnoreCase(etag.tag)\n && tag.partnerId == etag.partnerId)\n {\n p_tags.remove(i + 1);\n p_tags.remove(i);\n\n continue emptytag;\n }\n }\n }\n\n b_changed = false;\n }\n }", "@Override\n public boolean isTagged() {\n for (List<String> t : tags.values()) {\n if(!t.isEmpty()) return true;\n }\n return false;\n }", "IParser setDontEncodeElements(Collection<String> theDontEncodeElements);", "private void cleanupRawTags(ArrayList p_tags)\n {\n // Find the paired tags that belong together.\n // !!! DO NOT RELY ON PAIRING STATUS. Some prop changes start\n // after <seg> but close after </seg> and even after </tu>!!!\n assignPairingStatus(p_tags);\n\n // Basic cleanup: remove surrounding <p> and inner <o:p>\n removeParagraphTags(p_tags);\n\n // Remove revision markers when they were ON accidentally\n // before translating documents or during an alignment task\n // (WinAlign).\n removePropRevisionMarkers(p_tags);\n\n // Cleanup INS/DEL revisions similarly.\n removeDelRevisions(p_tags);\n applyInsRevisions(p_tags);\n\n // WinAligned files can contain endnotes (and footnotes, but I\n // think in Word-HTML they're both endnotes).\n removeEndNotes(p_tags);\n\n // Remove empty spans that are created from superfluous\n // original formatting in Word (<span color=blue></span>)\n removeEmptyFormatting(p_tags);\n\n // Leave the rest to the Word-HTML Extractor.\n }", "@Override\r\n\tpublic Annotation annotate() {\n\t\treturn null;\r\n\t}", "public com.babbler.ws.io.avro.model.BabbleValue.Builder clearTags() {\n tags = null;\n fieldSetFlags()[4] = false;\n return this;\n }", "public Tags() {\n set (\"\");\n }", "void deleteUnusedTags();", "protected void createIgnoreAnnotations() {\n\t\tString source = \"http://www.polarsys.org/capella/2007/ImpactAnalysis/Ignore\";\t\n\t\taddAnnotation\n\t\t (architectureAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceImplementationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceUseEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (providedInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (requiredInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (actorCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (systemComponentCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\n\t}", "@Override\n\tpublic Annotation[] getAnnotations() {\n\t\treturn null;\n\t}", "private void clearHasTag() {\n \n hasTag_ = 0;\n }", "public Builder clearCustomTags() {\n if (customTagsBuilder_ == null) {\n customTags_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n customTagsBuilder_.clear();\n }\n return this;\n }", "@Override\n protected TokenSet getIndentedElements() {\n return TokenSet.EMPTY;\n }", "@Test\n\tpublic void testNoopProject() {\n\t\tTag a = new Tag(A);\n\t\ttagService.create(a);\n\t\tTag b = tagService.create(new Tag(B));\n\t\tTag c = tagService.create(new Tag(C));\n\t\tIterable<Tag> values = tagService.find().matching(\n\t\t\t\tnew QueryBuilder<TagInformer>() {\n\n\t\t\t\t\tpublic QueryExpression createMatchingExpression(\n\t\t\t\t\t\t\tTagInformer object) {\n\t\t\t\t\t\treturn object.getText().differentFrom(null);\n\t\t\t\t\t}\n\t\t\t\t}).projectOn(new NoopProjectionBuilder<Tag, TagInformer>()).getAll();\n\t\tassertThat(values, IsCollectionContaining.hasItems(a, b, c));\n\t}", "public void clear(boolean nulltags) {\n \t\tArrays.fill(tags, null);\n \t\tnumTags = 0;\n \t}", "public Builder clearTag() {\n if (tagBuilder_ == null) {\n tag_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000080);\n onChanged();\n } else {\n tagBuilder_.clear();\n }\n return this;\n }", "public void setIdTagsOff () {\n\t\tidTags = false;\n\t}", "public static boolean XmlEmptyTag(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"XmlEmptyTag\")) return false;\n if (!nextTokenIs(b, XMLSTARTTAGSTART)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, XMLSTARTTAGSTART);\n r = r && XmlTagName(b, l + 1);\n r = r && XmlEmptyTag_2(b, l + 1);\n r = r && XmlEmptyTag_3(b, l + 1);\n r = r && XmlEmptyTag_4(b, l + 1);\n r = r && consumeToken(b, XMLEMPTYELEMENTEND);\n exit_section_(b, m, XML_EMPTY_TAG, r);\n return r;\n }", "@org.junit.Test\n public static final void testOptionalEndTags() {\n junit.framework.TestCase.assertEquals(\"<ol><li>A</li><li>B</li><li>C </li></ol>\", eu.stamp_project.reneri.instrumentation.StateObserver.observe(\"org.owasp.html.HtmlSanitizerTest|testOptionalEndTags()|0\", org.owasp.html.HtmlSanitizerTest.sanitize(\"<ol> <li>A</li> <li>B<li>C </ol>\")));\n }", "@Nullable\n public abstract List<String> tags();", "public static Tag emptyTag() {\n\t\treturn new Tag(NAME, \"\");\n\t}", "@Override\n\tpublic void setEmpty() {\n\t\t\n\t}", "public String [] getTags() {\n\t\treturn null;\n\t}", "public void clear() {\n // Don't reuse buffers, reclaim memory so we don't run out\n start = new IntArrayList();\n end = new IntArrayList();\n\n for (AnnotationWriter p : annotations.values()) {\n p.clear();\n }\n }", "@Test\r\n\tpublic void testConvertForTokenizationWithEmptyArrayList()\r\n\t{\r\n\t\tArrayList<String> testArrayList = new ArrayList<String>();\r\n\t\t\r\n\t\tString testSentence = UtilService.convertForTokenization(testArrayList);\r\n\t\t\r\n\t\tassertNotNull(testSentence);\r\n\t\tassertEquals(0, testSentence.length());\r\n\t}", "protected boolean isEmptyXmlTagExpanded() {\n return false;\n }", "public String showNullTags(String word, ArrayList<String> nullTags) {\n StringBuilder stringBuilder = new StringBuilder();\n if (nullTags.size() > 0) {\n stringBuilder.append((nullTags.size() == 1 ? \"This tag \" : \"These tags \")\n + \"doesn't exist in the word \\\"\" + word + \"\\\"\" + \"\\n\");\n for (String tag : nullTags) {\n stringBuilder.append(tag + \"\\n\");\n }\n }\n return stringBuilder.toString();\n }", "public void clearTagArray(){\n\t\t\n\t\ttagArray.clear();\n\t\t\n\t}", "List<T> findWhitespaceSeparatedTagsAndCreateIfNotExists(String tags);", "public Tags() {\n\t\t\n\t}", "private static void pushAnnotations(\n Deque<GraphAnnotationState> stack,\n Collection<? extends Annotatable> haveAnnotations) {\n stack.push(new GraphAnnotationState(haveAnnotations.size()));\n for (Annotatable h : haveAnnotations) {\n stack.peek().add(new AnnotationState(h, h.getAnnotation()));\n h.setAnnotation(null);\n }\n }", "@Override\n\tpublic List<Tag> getAllTags() throws Exception {\n\t\treturn null;\n\t}", "public void onAnnotationsPreRemove(Map<Annot, Integer> annots) {\n/* 370 */ if (annots == null || annots.size() == 0 || !this.mPdfViewCtrl.isUndoRedoEnabled()) {\n/* */ return;\n/* */ }\n/* */ }", "public void reset() {\n\t\tfor (int i = 0; i < markedElements.size(); i++) {\n\t\t\tif (markedElements.get(i) instanceof Word) {\n\t\t\t\tWord word = (Word) markedElements.get(i);\n\t\t\t\teditor.setCaretPosition(word.getEndPosition() + 1);\n\t\t\t\tint start = word.getStartPosition();\n\t\t\t\tint end = word.getEndPosition();\n\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN, true);\n\t\t\t} else if (markedElements.get(i) instanceof FunctionWord) {\n\t\t\t\tFunctionWord fword = (FunctionWord) markedElements.get(i);\n\t\t\t//\tif(fword.getWord().getEndPosition()!= fword.getEndPosition()) {\n\t\t\t\t\t// fword ist teil eines gr��eren Wortes-> Endposition als caretposition verwenden\n\t\t\t//\t\teditor.setCaretPosition(fword.getEndPosition() + 1);\n\t\t\t//\t}\n\t\t\t//\telse {\n\t\t\t\t\teditor.setCaretPosition(fword.getEndPosition() + 1);\n\t\t\t//\t}\n\t\t\t\tint start = fword.getStartPosition();\n\t\t\t\tint end = fword.getEndPosition();\n\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN, true);\n\t\t\t} else if (markedElements.get(i) instanceof ConstitutiveWord) {\n\t\t\t\tConstitutiveWord cword = (ConstitutiveWord) markedElements\n\t\t\t\t\t\t.get(i);\n\t\t\t\teditor.setCaretPosition(cword.getEndPosition() + 1);\n\t\t\t\tint start = cword.getStartPosition();\n\t\t\t\tint end = cword.getEndPosition();\n\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN, true);\n\t\t\t} else if (markedElements.get(i) instanceof IllocutionUnit) {\n\t\t\t\tIllocutionUnit iu = (IllocutionUnit) markedElements.get(i);\n\t\t\t\tfor (int j = 0; j < iu.getTokens().size(); j++) {\n\t\t\t\t\tToken token = (Token) iu.getTokens().get(j);\n\t\t\t\t\tint start = token.getStartPosition();\n\t\t\t\t\tint end = token.getEndPosition();\n\t\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN,\n\t\t\t\t\t\t\ttrue);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tmarkedElements.clear();\n\t\tdesignText(Model.getIllocutionUnitRoots());\n\t}", "@PrePersist\r\n @PreUpdate\r\n public void removeEmptyComments()\r\n {\r\n List<Comment> empty = new ArrayList<Comment>();\r\n for (Comment current : this.getComments())\r\n {\r\n current.removeEmptyComments();\r\n if (current.getText() == null || current.getText().isEmpty())\r\n {\r\n empty.add(current);\r\n }\r\n }\r\n\r\n this.getComments().removeAll(empty);\r\n }", "public List<BzrTagBranch> listTags() {\n return Collections.emptyList();\n }", "public ITag[] getTags() {\n \t\t\t\t\t\t\t\t\treturn null;\n \t\t\t\t\t\t\t\t}", "private void removeParagraphTags(ArrayList p_tags)\n {\n // outer <p>\n p_tags.remove(0);\n p_tags.remove(p_tags.size() - 1);\n\n // <o:p>\n boolean b_found = false;\n for (int i = 0; i < p_tags.size() - 1; i++) // loop ok\n {\n Object o = p_tags.get(i);\n\n if (o instanceof HtmlObjects.Tag)\n {\n HtmlObjects.Tag tag = (HtmlObjects.Tag) o;\n\n if (tag.tag.equalsIgnoreCase(\"o:p\"))\n {\n p_tags.subList(i, i + 2).clear();\n b_found = true;\n break;\n }\n }\n }\n\n // if <o:p> was output, there also was a <span> around the\n // entire paragraph content.\n if (b_found)\n {\n p_tags.remove(0);\n p_tags.remove(p_tags.size() - 1);\n }\n }", "public Canary clearTagsEntries() {\n this.tags = null;\n return this;\n }", "@Ignore\n @Test(expected = NullPointerException.class)\n public void failOnNullTag() throws Exception {\n }", "@Test\n public void tagFilesShouldReturnNonEmptyTagFiles() throws Exception {\n //given\n givenInfoMessageCode();\n\n //when\n List<IFileSpec> tagFiles = tagDelegator.tagFiles(fileSpecs, LABEL_NAME, opts);\n //then\n assertThat(tagFiles.size(), is(1));\n assertThat(tagFiles.get(0).getDepotPathString(), is(TEST_FILE_DEPOT_PATH));\n }", "private void setAllTags(ArrayList<String> allTags) {\r\n this.allTags = allTags;\r\n }", "String convertTagsToWhitespaceSeparated(List<T> tags);", "private void removeClosingTag(ArrayList p_tags, HtmlObjects.Tag p_tag)\n {\n for (int i = 0, max = p_tags.size(); i < max; i++)\n {\n Object o = p_tags.get(i);\n\n if (o instanceof HtmlObjects.EndTag)\n {\n HtmlObjects.EndTag etag = (HtmlObjects.EndTag) o;\n\n if (p_tag.tag.equalsIgnoreCase(etag.tag)\n && p_tag.partnerId == etag.partnerId)\n {\n p_tags.remove(i);\n return;\n }\n }\n }\n }", "private void removeInsTag(ArrayList p_tags, HtmlObjects.Tag p_tag)\n {\n int i_start = 0;\n int i_end = 0;\n\n loop: for (int i = 0, max = p_tags.size(); i < max; i++)\n {\n Object o = p_tags.get(i);\n\n if (o == p_tag)\n {\n i_start = i;\n\n for (int j = i + 1; j < max; j++)\n {\n Object o1 = p_tags.get(j);\n\n if (o1 instanceof HtmlObjects.EndTag)\n {\n HtmlObjects.EndTag etag = (HtmlObjects.EndTag) o1;\n\n if (p_tag.tag.equalsIgnoreCase(etag.tag)\n && p_tag.partnerId == etag.partnerId)\n {\n i_end = j;\n break loop;\n }\n }\n }\n }\n }\n\n if (i_start >= 0 && i_end > i_start)\n {\n p_tags.subList(i_end - 1, i_end + 1).clear();\n p_tags.subList(i_start, i_start + 2).clear();\n }\n }", "@Override\n public boolean isEmpty() { return true; }", "@Test\n public void shouldReturnNonEmptyTagFiles() throws Exception {\n //given\n givenInfoMessageCode();\n //when\n List<IFileSpec> tagFiles = tagDelegator.tagFiles(\n fileSpecs,\n LABEL_NAME,\n listOnly1,\n delete1);\n //then\n assertThat(tagFiles.size(), is(1));\n assertThat(tagFiles.get(0).getDepotPathString(), is(TEST_FILE_DEPOT_PATH));\n }", "public void setTags(List<Tag> tags) {\n this.tags.clear();\n if (tags != null) {\n this.tags.addAll(tags);\n }\n }", "public Receipttags() {\n\t\tthis(\"receipttags\", null);\n\t}", "private void removeEmptyTokens(ArrayList<String> tokens) {\n Iterator<String> it = tokens.iterator();\n while (it.hasNext()) {\n if (it.next().equals(\"\")) {\n it.remove();\n }\n }\n }", "public Builder clearPositiveInputTagsCount() {\n if (positiveInputTagsCountBuilder_ == null) {\n positiveInputTagsCount_ = null;\n onChanged();\n } else {\n positiveInputTagsCount_ = null;\n positiveInputTagsCountBuilder_ = null;\n }\n\n return this;\n }", "@Override\n public void visit(Tree.AnnotationList al) {\n }", "private void removeTagAndContent(ArrayList p_tags, HtmlObjects.Tag p_tag)\n {\n int i_start = 0;\n int i_end = 0;\n\n loop: for (int i = 0, max = p_tags.size(); i < max; i++)\n {\n Object o = p_tags.get(i);\n\n if (o == p_tag)\n {\n i_start = i;\n\n for (int j = i + 1; j < max; j++)\n {\n Object o1 = p_tags.get(j);\n\n if (o1 instanceof HtmlObjects.EndTag)\n {\n HtmlObjects.EndTag etag = (HtmlObjects.EndTag) o1;\n\n if (p_tag.tag.equalsIgnoreCase(etag.tag)\n && p_tag.partnerId == etag.partnerId)\n {\n i_end = j;\n break loop;\n }\n }\n }\n }\n }\n\n if (i_start >= 0 && i_end > i_start)\n {\n p_tags.subList(i_start, i_end + 1).clear();\n }\n }", "public void setPoolableElements(Collection<P> poolables);", "public Element[] getAnnotations() {\r\n return union.value();\r\n }", "public boolean isBlank() {\n return (tags.length() == 0);\n }", "public ElementList[] getAnnotations() {\r\n return union.value();\r\n }", "public void setAllTags (boolean allTags) {\n\t\tthis.allTags = allTags;\n\t}", "private void populateEmptyFields(DublinCoreMetadataCollection dublinCoreMetadata, Set<String> emptyFields) {\n for (String field : emptyFields) {\n try {\n dublinCoreMetadata.addField(dublinCoreProperties.get(field), \"\", getListProvidersService());\n } catch (Exception e) {\n logger.error(\"Skipping metadata field '{}' because of error: {}\", field, ExceptionUtils.getStackTrace(e));\n }\n }\n }", "void setNilTag();", "public final void clearEdgeAnnotations() {\n for (GraphEdge<N, E> e : getEdges()) {\n e.setAnnotation(null);\n }\n }", "@org.junit.Test(timeout = 10000)\n public void nullAnnotationList_add44758_failAssert0() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n // MethodCallAdder\n com.squareup.javapoet.TypeName.DOUBLE.annotated(((java.util.List<com.squareup.javapoet.AnnotationSpec>) (null)));\n com.squareup.javapoet.TypeName.DOUBLE.annotated(((java.util.List<com.squareup.javapoet.AnnotationSpec>) (null)));\n org.junit.Assert.fail(\"nullAnnotationList_add44758 should have thrown NullPointerException\");\n } catch (java.lang.NullPointerException eee) {\n }\n }", "public void removeAllAnnotationTypes() {\n \t\tfConfiguredAnnotationTypes.clear();\n \t\tfAllowedAnnotationTypes.clear();\n \t\tfConfiguredHighlightAnnotationTypes.clear();\n \t\tfAllowedHighlightAnnotationTypes.clear();\n \t\tif (fTextInputListener != null) {\n \t\t\tfSourceViewer.removeTextInputListener(fTextInputListener);\n \t\t\tfTextInputListener= null;\n \t\t}\n \t}", "void removeAnnotations() {\n if (currentIndicators.isEmpty()) {\n return;\n }\n // remove annotations from the model\n synchronized (annotationModelLockObject) {\n if (annotationModel instanceof IAnnotationModelExtension) {\n ((IAnnotationModelExtension) annotationModel).replaceAnnotations(\n currentIndicators.toArray(new Annotation[currentIndicators.size()]),\n null);\n } else {\n for (Annotation annotation : currentIndicators) {\n annotationModel.removeAnnotation(annotation);\n }\n }\n currentIndicators = Lists.newArrayList();\n }\n }", "public void setTags(List<Tag> tags) {\n this.tags = tags;\n }", "public void setTags(ArrayList<String> tags){\n for(String s : tags){\n this.tags.add(s);\n }\n }", "private void removeEmptyElements(final Collection<String> collection) {\n collection.removeAll(Arrays.asList(null, \"\"));\n collection.removeAll(Arrays.asList(null, \" \"));\n }", "TypeConstraintMappingContext<C> ignoreAllAnnotations();", "Set<String> annotations();", "public void setTags(String tags) {\n this.tags = tags == null ? null : tags.trim();\n }", "@Override\n protected void setChildrenEmptyFlags() {\n this.setIsRutaCollectionEmpty();\n }", "public String suppress(Tags suppressTags) {\n StringBuilder result = new StringBuilder();\n int i = 0;\n String tag = getTag(i);\n while (tag != null && tag.length() > 0) {\n if (suppressTags.tagFound(tag)) {\n // Suppress it\n } else {\n if (result.length() > 0) {\n result.append(PREFERRED_TAG_SEPARATOR);\n result.append(' ');\n }\n result.append(tag);\n }\n i++;\n tag = getTag(i);\n }\n return result.toString();\n }", "@Override\r\n\tpublic String serialize(List<Annotation> annotations)\r\n\t\t\tthrows UnsupportedOperationException {\n\t\treturn null;\r\n\t}", "public Proposal clearTagsEntries() {\n this.tags = null;\n return this;\n }", "public static List<String> filter_empty(String[] arr){\n\t\tboolean contient_added = false;\n\t\tList<String> out = new ArrayList<String>();\n\t\tfor(String s : arr) {\n\t\t\tif(s.trim().length() > 0){\n\t\t\t\tif(s.equals(\"CONTIENT\")){\n\t\t\t\t\tif(contient_added){\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tcontient_added = true;\n\t\t\t\t}\n\t\t\t\tout.add(s);\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}", "public ElementMap[] getAnnotations() {\r\n return union.value();\r\n }", "default List<AnnotationContext<?>> allAnnotations() {\n\n return annotations().stream()\n .flatMap(annotation -> annotation.valueType().<Stream<AnnotationContext<?>>>map(valueType -> {\n if (valueType.isArray()) {\n final TypeContext componentType = valueType.arrayComponentType();\n final AnnotationContext<Repeatable> rep = componentType.annotation(Repeatable.class);\n if (rep != null && rep.value().equals(annotation.annotationType())) {\n final Annotation[] repeated = annotation.value();\n return Arrays.stream(repeated).map(AnnotationContext::new);\n }\n }\n return Stream.of(annotation);\n }).orElseGet(() -> Stream.of(annotation)))\n .collect(Collectors.toList());\n }", "@Override\n\tpublic void visit(NullValue arg0) {\n\t\t\n\t}", "@Override\npublic boolean isEmpty() {\n\treturn false;\n}", "@Override\n\tpublic void visit(NullValue arg0) {\n\n\t}", "void discard(T1XTemplateTag tag) {\n final int listLength = methodStatusList.size();\n MethodStatus ms = methodStatusList.get(listLength - 1);\n // ok to destroy ms.asSet\n ms.atSet.retainAll(generating);\n // throw it away if we generated advice type that was not wanted.\n if (ms.atSet.isEmpty()) {\n ms.output = false;\n // Checkstyle: resume Indentation check\n int index = listLength - 2;\n while (index >= 0) {\n ms = methodStatusList.get(index);\n if (ms.tag == null) {\n ms.output = false;\n } else if (ms.tag != tag) {\n return;\n }\n index--;\n }\n }\n }", "public Builder clearTagValue() {\n bitField0_ = (bitField0_ & ~0x00000001);\n tagValue_ = getDefaultInstance().getTagValue();\n onChanged();\n return this;\n }", "public Builder clearTag() {\n \n tag_ = getDefaultInstance().getTag();\n onChanged();\n return this;\n }", "private void removePropRevisionMarkers(ArrayList p_tags)\n {\n boolean b_changed = true;\n\n propchange: while (b_changed)\n {\n for (int i = 0, max = p_tags.size(); i < max; i++)\n {\n Object o = p_tags.get(i);\n\n if (o instanceof HtmlObjects.Tag)\n {\n HtmlObjects.Tag tag = (HtmlObjects.Tag) o;\n String original = tag.original;\n\n if (tag.tag.equalsIgnoreCase(\"span\")\n && original.indexOf(\"class=msoChangeProp\") >= 0)\n {\n p_tags.remove(i);\n\n // Note that the closing tag for changeprop\n // may come *after* </seg> and </tu>.\n removeClosingTag(p_tags, tag);\n\n continue propchange;\n }\n }\n }\n\n b_changed = false;\n }\n }", "InstrumentedType withAnnotations(List<? extends AnnotationDescription> annotationDescriptions);", "void setTagCollection(Collection<Tag> tagCollection);", "@Override\r\n\tpublic String serialize(AnnotationTree tree) {\n\t\treturn null;\r\n\t}", "@Override\n public boolean isEmpty() {\n return false;\n }", "protected void clearDeviceTags(JSONArray args, final CallbackContext callbackContext) {\n\t\tLog.d(TAG, \"CLEARTAGS\");\n\t\tNotificare.shared().clearDeviceTags(new NotificareCallback<Boolean>() {\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(Boolean result) {\n\t\t\t\tif (callbackContext == null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcallbackContext.success();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onError(NotificareError error) {\n\t\t\t\tif (callbackContext == null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcallbackContext.error(error.getLocalizedMessage());\n\t\t\t}\n\t\t});\n\t}", "private void loadOldTags() throws IOException {\n File fileAnnotation = new File(filePathAnnDestination);\n if (!fileAnnotation.exists()) {\n fileAnnotation.createNewFile();\n }\n FileReader fr = new FileReader(fileAnnotation);\n\n\n\n\n BufferedReader br = new BufferedReader(fr);\n String line;\n\n while ((line = br.readLine()) != null) {\n String[] annotations = line.split(\"[ \\t]\");\n String word = line.substring(line.lastIndexOf('\\t') + 1);\n String[] words = word.split(\" \");\n\n int start = Integer.parseInt(annotations[2]);\n if (words.length != 0) {\n for (int i = 0; i < words.length; i++) {\n int end = start + words[i].length();\n taggedItems.put(start + \"-\" + end, annotations[1]);\n System.out.println(\"Loading old tags: \" + start + \"-\" + end + \"\\t\" + annotations[1]);\n start = end + 1;\n }\n }\n taggedItems.put(annotations[2] + \"-\" + annotations[3], annotations[1]);\n\n noOfTagsAlready = Integer.parseInt(annotations[0].substring(1));\n if (noOfTagsAlreadyMax < noOfTagsAlready)\n noOfTagsAlreadyMax = noOfTagsAlready;\n }\n br.close();\n fr.close();\n System.out.println(\"Loaded tags\");\n }", "public Builder clearHasTag() {\n copyOnWrite();\n instance.clearHasTag();\n return this;\n }", "@Override\n\t\t\tpublic boolean isEmpty() {\n\t\t\t\treturn false;\n\t\t\t}", "public void setNotEmpty(){\n this.empty = false;\n }", "public void clearAllMessageAnnotations()\n {\n _messageAnnotationsMap = null;\n _messageAnnotations = null;\n _message.setMessageAnnotations(null);\n }", "@Override\n public boolean isEmpty()\n {\n return false;\n }", "@Override\n\t\tpublic boolean isEmpty() {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\tpublic boolean isEmpty() {\n\t\t\treturn false;\n\t\t}", "public Builder clearPositiveFrameTagsCount() {\n if (positiveFrameTagsCountBuilder_ == null) {\n positiveFrameTagsCount_ = null;\n onChanged();\n } else {\n positiveFrameTagsCount_ = null;\n positiveFrameTagsCountBuilder_ = null;\n }\n\n return this;\n }", "boolean isNilTag();", "public void flatten () {\n String tags2 = tags.toString();\n tags.delete (0, tags.length());\n int e2 = 0;\n int s2 = indexOfNextWordStart (tags2, e2, slashToSeparate);\n while (s2 < tags2.length()) {\n e2 = indexOfNextSeparator (tags2, s2, true, true, slashToSeparate);\n merge (tags2.substring (s2, e2));\n s2 = indexOfNextWordStart (tags2, e2, slashToSeparate);\n }\n }" ]
[ "0.6660466", "0.5991867", "0.5626654", "0.5618321", "0.5503944", "0.54606265", "0.5453599", "0.5440991", "0.5414494", "0.5379137", "0.53492016", "0.53478104", "0.5292904", "0.52901965", "0.5255586", "0.52511597", "0.5219973", "0.5193764", "0.51707673", "0.5164279", "0.5162144", "0.51335895", "0.5133367", "0.51116985", "0.5093693", "0.50929976", "0.5075371", "0.50258267", "0.50251436", "0.5003648", "0.49852028", "0.49590614", "0.4958739", "0.4929508", "0.49218172", "0.49048084", "0.49038675", "0.48900467", "0.48852035", "0.4883615", "0.48814264", "0.48714343", "0.486728", "0.48628777", "0.48627192", "0.4861501", "0.4855567", "0.48369783", "0.48345214", "0.48314825", "0.4809374", "0.4806759", "0.4794169", "0.4776565", "0.4774066", "0.47669932", "0.4762744", "0.47625226", "0.47525615", "0.47465855", "0.474535", "0.47443667", "0.47431615", "0.47414604", "0.47412574", "0.473775", "0.47372463", "0.47363156", "0.47138286", "0.4706166", "0.469612", "0.46954435", "0.4691816", "0.46817794", "0.4676272", "0.46718204", "0.46689138", "0.46641082", "0.46634024", "0.4662754", "0.46597028", "0.46557602", "0.46541664", "0.46469676", "0.46447176", "0.46385515", "0.46353686", "0.4633903", "0.46330988", "0.463248", "0.46130905", "0.45880464", "0.45876402", "0.4587334", "0.4584732", "0.45838636", "0.45838636", "0.4582619", "0.45530784", "0.45468098" ]
0.65393484
1
opens the externalDocument: reads the contents of the file, filling the text and annotations of the document. Returns true if the Document was successfully opened, or was already open; returns false if there was an error in opening the file.
public boolean open() { if (!open) { try { if (format.equals("sgml")) { File file = new File(fullFileName()); //return the full file name,including directory and filename String line; BufferedReader reader = new BufferedReader ( // (new FileReader(file)); new InputStreamReader (new FileInputStream(file), JetTest.encoding)); StringBuffer fileText = new StringBuffer(); //store all text in filename while((line = reader.readLine()) != null) fileText.append(line + "\n"); String text = fileText.toString(); //Store the converted text SGMLProcessor.allTags = allTags; SGMLProcessor.emptyTags = emptyTags; Document doc = SGMLProcessor.sgmlToDoc (this, text, SGMLtags); //Because format.equals("sgml") open = true; return true; } else if (format.equals("pos")) { posRead(); open = true; return true; } else { System.out.println ("Error opening document " + fileName); System.out.println ("Unknown document format."); return false; } } catch (IOException e) { System.out.println ("Error opening document " + fileName); System.out.println (e); return false; } } else { // return true if already open return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doOpen() {\n\n if (!canChangeDocuments()) {\n return;\n }\n\n TextDocument document = fApplication.openDocument(this);\n\n if (document != null) {\n setDocument(document);\n }\n }", "public boolean openDocument(File file) {\n String path;\n try {\n path = file.getCanonicalPath();\n for (SceneDocument doc : Application.getInstance().getDocuments()) {\n try {\n if (doc.getDocumentFile() == null) continue;\n if (doc.getDocumentFile().getCanonicalPath().equals(path)) {\n // The document is already open. Bring it to the front.\n doc.toFront();\n doc.requestFocus();\n MenuBar.addRecentFile(file);\n return true;\n }\n } catch (IOException e) {\n logger.log(Level.WARNING, \"The document \" + doc.getDocumentFile() + \" refers to path with errors\", e);\n }\n }\n } catch (IOException e) {\n logger.log(Level.WARNING, \"The document \" + file + \" refers to path with errors\", e);\n }\n\n try {\n SceneDocument doc = new SceneDocument(manager, file);\n addDocument(doc);\n MenuBar.addRecentFile(file);\n return true;\n } catch (RuntimeException e) {\n logger.log(Level.SEVERE, \"Error while loading \" + file, e);\n ExceptionDialog d = new ExceptionDialog(null, e);\n d.setVisible(true);\n return false;\n }\n }", "public boolean checkDocument(String fileName) throws IOException;", "void open() {\n \tJFileChooser fileopen = new JFileChooser();\n int ret = fileopen.showDialog(null, \"Open file\");\n\n if (ret == JFileChooser.APPROVE_OPTION) {\n document.setFile(fileopen.getSelectedFile());\n textArea.setText(document.getContent());\n }\n }", "public void openDocument(L documentLocation) throws IOException;", "public abstract TextDocument getTextDocumentFromFile(String path) throws FileNotFoundException, IOException;", "public boolean open() {\n try {\n fileStream = new FileReader( this.fileName );\n scanner = new Scanner( fileStream );\n this.found = true;\n } catch ( FileNotFoundException error ) {\n this.found = false;\n System.out.println(error.toString());\n }\n\n return this.found;\n }", "public void fileOpened(OpenDefinitionsDocument doc) { }", "public void fileOpened(OpenDefinitionsDocument doc) { }", "public void open (File file, boolean suppressStyling)\n\t{\n\t\tthis.file = file;\n\t\tif (editor.open (file, suppressStyling))\n\t\t\tgetRootPane().putClientProperty (\"Window.documentFile\", file);\n\t\telse this.file = null;\n\t\teditor.grabFocus();\n\t\tmodel = null;\n\t\tupdate();\n\t}", "boolean hasTextDocument();", "public boolean openFile(final File file)\n {\n BufferedReader bufferedReader = null;\n\n try\n {\n bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));\n final StringBuilder stringBuilder = new StringBuilder();\n String line = bufferedReader.readLine();\n\n while(line != null)\n {\n stringBuilder.append(line);\n line = bufferedReader.readLine();\n\n if(line != null)\n {\n stringBuilder.append('\\n');\n }\n }\n\n this.componentEditor.setText(stringBuilder.toString());\n this.currentFile = file;\n this.preferences.setValue(CompilerEditorPanel.PREFERENCE_LAST_FILE, this.currentFile);\n this.preferences.setValue(CompilerEditorPanel.PREFERENCE_LAST_DIRECTORY, this.currentFile.getParentFile());\n this.fileChooser.setStartDirectory(this.currentFile.getParentFile());\n this.title.setText(UtilText.concatenate(\"--\", this.currentFile.getAbsolutePath(), \"--\"));\n return true;\n }\n catch(final Exception exception)\n {\n Debug.printException(exception, \"Failed to load : \" + file.getAbsolutePath());\n this.printMessage(UtilText.concatenate(\"Failed to load file at :\\n\", file.getAbsolutePath(), \"\\nBecause :\\n\", UtilEditor.extractMessage(exception)));\n return false;\n }\n finally\n {\n if(bufferedReader != null)\n {\n try\n {\n bufferedReader.close();\n }\n catch(final Exception ignored)\n {\n }\n }\n }\n }", "public void openFile(File file) {\n// new FileSystem().readFile(addressBook, file);\n// addressBook.fireTableDataChanged();\n }", "@Override\n\tpublic void openDocument(String path, String name) {\n\t\t\n\t}", "private void tryToOpen() {\n if (current != null) {\n if (!this.tryToClose()) return;\n }\n\n //open an existing file...\n JFileChooser chooser = new JFileChooser(new File(\".\"));\n chooser.setDialogTitle(\"Select model file\");\n chooser.setFileFilter(new FileNameExtensionFilter(\n \"Only xml files\",\"xml\"\n ));\n\n int result = chooser.showOpenDialog(this);\n if (result == JFileChooser.APPROVE_OPTION) {\n File file = chooser.getSelectedFile();\n try {\n current = new Document(file);\n this.update();\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"ERROR: the file '\" + file.getName() + \"' could not be opened!\", \"An Error Occured\", JOptionPane.ERROR_MESSAGE);\n// e.printStackTrace();\n }\n }\n }", "public void save () {\n\t\tif (!open) {\n\t\t\tSystem.out.println (\"ExternalDocument.save: attempt to save unopened document \" + fileName);\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tif (format.equals(\"sgml\")) {\n\t\t\t\tString tagToWrite;\n\t\t\t\tif (allTags)\n\t\t\t\t\ttagToWrite = null;\n\t\t\t\telse if (SGMLtags.length == 0)\n\t\t\t\t\ttagToWrite = \"***\"; // unused annotation type\n\t\t\t\telse if (SGMLtags.length == 1)\n\t\t\t\t\ttagToWrite = SGMLtags[0];\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println (\"ExternalDocument.save: cannot write more than 1 annotation type\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tString string = writeSGML(tagToWrite).toString();\n\t\t\t\tFile file = new File(fullFileName());\n\t\t\t\tBufferedWriter writer = new BufferedWriter (\n\t\t\t\t\t\tnew OutputStreamWriter (new FileOutputStream(file), JetTest.encoding));\n\t\t\t\twriteWithSystemNewlines (writer, string);\n\t\t\t\twriter.close();\n\t\t\t} else {\n\t\t\t\t\tSystem.out.println (\"Error saving document \" + fileName);\n\t\t\t\t\tSystem.out.println (\"Unknown document format.\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println (\"Error opening document \" + fileName);\n\t\t\t\tSystem.out.println (e);\n\t\t}\n\t}", "@Override\n void execute() {\n doc.open();\n }", "public boolean openFile(String pathName) \r\n\t{\r\n\t\tboolean result;\r\n\t\t// This allows the opening of files located from this actual package.\r\n\t\tURL localPath = this.getClass().getResource(pathName);\r\n\t\tinputFile = new File(localPath.getFile());\r\n\r\n\t\t// Open input file. The input file is a field oriented and\r\n\t\t// space-separated.\r\n\t\t// The fields and expected formats are listed above in the header\r\n\r\n\t\t// Check to ensure that the inputFile exists\r\n\t\tif (!inputFile.exists()) \r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\\"\" +localPath + \"\\\" should be in the same directory as: \"\r\n\t\t\t\t\t\t\t\t+ this.getClass().getPackage().getName());\r\n\t\t\t\r\n\t\t\tresult = false;\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\t// Create a buffered reader the file\r\n\t\t\t\tinFile = new BufferedReader(new InputStreamReader(\r\n\t\t\t\t\t\tnew FileInputStream((inputFile))));\r\n\r\n\t\t\t\tresult = true;\r\n\t\t\t} // try\r\n\t\t\tcatch (Exception Error) \r\n\t\t\t{\r\n\t\t\t\tresult = false;\r\n\t\t\t} // catch\r\n\t\t} // if\r\n\r\n\t\treturn (result);\r\n\t}", "public void open(){\n\t\ttry {\n\t\t\tdocFactory = DocumentBuilderFactory.newInstance();\n\t\t\tdocBuilder = docFactory.newDocumentBuilder();\n\t\t\tdoc = docBuilder.parse(ManipXML.class.getResourceAsStream(path));\n\t\t\t\n\t\t} catch (ParserConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SAXException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static native boolean loadDocument(String doc);", "private void openFile(File file){\r\n\t\ttry {\r\n\t\t\tlocal.openFile(file);\r\n\t\t\topenFile = file;\r\n\t\t\tframe.setTitle(file.getName());\r\n\t\t\tedit = false;\r\n\t\t\tBibtexPrefs.addOpenedFile(file);\r\n\t\t\tpopulateRecentMenu();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\terrorDialog(e.toString());\r\n\t\t} catch (IllegalArgumentException e){\r\n\t\t\terrorDialog(\"The bibtex file \" +file.getPath()+ \" appears to be invalid.\\n\"\r\n\t\t\t\t\t+ \"Parsing error occured because you have the following in your file:\\n\"\r\n\t\t\t\t\t+e.getMessage());\r\n\t\t}\r\n\t}", "IDocument getDocument(File file);", "public boolean open(String filename)\n {\n \n boolean retVal = open_0(nativeObj, filename);\n \n return retVal;\n }", "public static void open() {\n JFileChooser fileChooser;\n String fileContent;\n String path = FileLoader.loadFile(\"path.txt\");\n if (path != null) {\n fileChooser = new JFileChooser(path);\n } else {\n fileChooser = new JFileChooser((FileSystemView.getFileSystemView().getHomeDirectory()));\n }\n\n fileChooser.setDialogTitle(\"Select text file\");\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"Text files\",\"mytxt\");\n fileChooser.addChoosableFileFilter(filter);\n fileChooser.setAcceptAllFileFilterUsed(true);\n\n if (fileChooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {\n path = fileChooser.getSelectedFile().getParent();\n FileLoader.saveFile(\"path.txt\", path, false);\n fileContent = FileLoader.loadFile(fileChooser.getSelectedFile().getAbsolutePath());\n TextEditor.setFileName(fileChooser.getSelectedFile().getAbsolutePath());\n TextEditor.getTextArea().setText(fileContent);\n }\n }", "public void fileOpen () {\n\t\ttry {\n\t\t\tinput = new Scanner(new File(file));\n\t\t\tSystem.out.println(\"file created\");\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"file could not be created\");\n\t\t}\n\t}", "public boolean addDocument(File srcFile) {\n File destFile = new File(Main.mainObj.projectObj.projectPath + \"/\" + srcFile.getName());\r\n try {\r\n FileUtils.copyFile(srcFile, destFile);\r\n Main.mainObj.projectObj.textFiles.add(new Document(this.projectPath, srcFile.getName()));\r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"File Not found exception when initializing project\\n\" + ex);\r\n } catch (IOException exept) {\r\n System.out.println(\"IO Exception when initializing a previousl created project\\n\" + exept);\r\n }\r\n return true;\r\n\r\n }", "@Test\n public void InternalNLP_annotate_doesAnnotate() {\n ExtractedText extractedText = null;\n\n String fileUri = \"dummyUri\";\n String fileRef = \"src/test/res/Pasta.txt\";\n File file = new File(fileRef);\n try {\n InputStream inputStream = new FileInputStream(file);\n extractedText = mInternalTextProcessor.processFile(inputStream, fileUri, fileRef\n , \"txt\", false);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (FileTypeNotSupportedException e) {\n e.printStackTrace();\n } catch (DocumentNotSupportedException e) {\n e.printStackTrace();\n }\n\n // Annotate\n mInternalNLP.annotate(extractedText);\n\n if(!extractedText.getTitle().isEmpty()) {\n Assert.assertNotNull(extractedText.getTitleAnnotation());\n }\n\n for (Section section: extractedText.getSections()) {\n if(!section.getBody().isEmpty()) {\n Assert.assertNotNull(section.getBodyAnnotation());\n }\n if(!section.getTitle().isEmpty()) {\n Assert.assertNotNull(section.getTitleAnnotation());\n }\n }\n }", "public boolean openFile() throws IOException {\n\t\tString line = \" \";\n\t\tboolean check = false;\n\t\t\n\t\tBufferedReader textReader = new BufferedReader(new FileReader(path));\n\t\touterloop: \t\t// allows break statement to exit all loops once file path is added to the files ArrayList\n\t\twhile ((line = textReader.readLine()) != null ) {\t\t// loops line by line until there are no more lines\n\t\t\tString[] words = line.split(\" \");\t\t\t\t\t// breaks line into String array\n\t\t\t\n\t\t\tfor (String word : words) {\t\t\t\t\t\t\t// loops through words in each line\n\t\t\t\tfor (String key : keyWords) {\t\t\t\t\t// loops through keyWords input by user\n\t\t\t\t\tif (word.equals(key)) {\t\t\t\t\t\t// checks for a match between words in file and user key words input\n\t\t\t\t\t\tArrayList<String> list = new ArrayList<String>(Arrays.asList(keyWords));\t// the next three lines remove keyWord from array since the word has been found\n\t\t\t\t\t\tlist.removeAll(Arrays.asList(key));\n\t\t\t\t\t\tkeyWords = list.toArray(new String[0]);\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (keyWords.length == 0) {\n\t\t\t\t\t\t\tcheck = true;\n\t\t\t\t\t\t\tbreak outerloop;\t\t\t\t\t// breaks out of entire loop sequence. no need to keep looping once path has been added\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\ttextReader.close( );\n\t\treturn check;\t\t\n\t}", "public void openFile(String file) {\n try {\n FileReader fr = new FileReader(file);\n in = new BufferedReader(fr);\n } catch (IOException e) {\n System.out.println(\"Filen kan ikke åbnes\");\n }\n }", "public void openFile(String file)\n\t{\n\t\tthis.file=file;\n\t\tSystem.out.println(\"file has been opened\");\n\t}", "public boolean openAndCompile(final File file)\n {\n if(!this.openFile(file))\n {\n return false;\n }\n\n return this.compile();\n }", "public void setDocument(File file, Charset charset) throws FileNotFoundException {\n setDocument(new FileInputStream(file), charset);\n }", "public void openFile()\r\n {\r\n try // open file\r\n {\r\n input = new RandomAccessFile( \"clients.dat\", \"r\" );\r\n } // end try\r\n catch ( IOException ioException )\r\n {\r\n System.err.println( \"File does not exist.\" );\r\n } // end catch\r\n }", "private static Document read (File file) throws MalformedURLException, DocumentException {\r\n\t\tSAXReader reader = new SAXReader();\r\n\t\tDocument document = reader.read(file);\r\n\t\treturn document;\r\n\t}", "public void loadDocument() {\n\t\ttry {\n\t\t\tString defaultDirectory = Utils.lastVisitedDirectory;\n\t\t\tif (Utils.lastVisitedDocumentDirectory != null)\n\t\t\t\tdefaultDirectory = Utils.lastVisitedDocumentDirectory;\n\n\t\t\tJFileChooser fileChooser = new JFileChooser(defaultDirectory);\n\t\t\tint returnVal = fileChooser.showOpenDialog(new JFrame());\n\n\t\t\tif (returnVal != JFileChooser.APPROVE_OPTION) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tURL fileURL = fileChooser.getSelectedFile().toURL();\n\n\t\t\t((XsdTreeStructImpl) xsdTree).loadDocument(fileURL);\n\t\t\txsdTree.getMessageManager().sendMessage(\"XML document \" + fileURL + \" loaded.\", MessageManagerInt.simpleMessage);\n\t\t} catch (IOException urie) {\n\n\t\t} catch (SAXException saxe) {\n\n\t\t}\n\t\texampleLine = null;\n\t\t// updatePreview();\n\t}", "void readAPFdocument (Document apfDoc, String fileText) {\n\t\tNodeList sourceFileElements = apfDoc.getElementsByTagName(\"source_file\");\n\t\tElement sourceFileElement = (Element) sourceFileElements.item(0);\n\t\tsourceFile = sourceFileElement.getAttribute(\"URI\");\n\t\tsourceType = sourceFileElement.getAttribute(\"SOURCE\");\n\n\t\tNodeList documentElements = apfDoc.getElementsByTagName(\"document\");\n\t\tElement documentElement = (Element) documentElements.item(0);\n\t\tdocID = documentElement.getAttribute(\"DOCID\");\n\n\t\tif (Ace.perfectMentions & !Ace.perfectEntities) {\n\t\t\treadPerfectMentions (apfDoc, fileText);\n\t\t\treturn;\n\t\t}\n\n\t\tNodeList entityElements = apfDoc.getElementsByTagName(\"entity\");\n\t\tfor (int i=0; i<entityElements.getLength(); i++) {\n\t\t\tElement entityElement = (Element) entityElements.item(i);\n\t\t\tAceEntity entity = new AceEntity (entityElement, fileText);\n\t\t\taddEntity(entity);\n\t\t}\n\t\tNodeList valueElements = apfDoc.getElementsByTagName(\"value\");\n\t\tfor (int i=0; i<valueElements.getLength(); i++) {\n\t\t\tElement valueElement = (Element) valueElements.item(i);\n\t\t\tAceValue value = new AceValue (valueElement, fileText);\n\t\t\taddValue(value);\n\t\t}\n\t\tNodeList timexElements = apfDoc.getElementsByTagName(\"timex2\");\n\t\tfor (int i=0; i<timexElements.getLength(); i++) {\n\t\t\tElement timexElement = (Element) timexElements.item(i);\n\t\t\tAceTimex timex = new AceTimex (timexElement, fileText);\n\t\t\taddTimeExpression(timex);\n\t\t}\n\t\tNodeList relationElements = apfDoc.getElementsByTagName(\"relation\");\n\t\tfor (int i=0; i<relationElements.getLength(); i++) {\n\t\t\tElement relationElement = (Element) relationElements.item(i);\n\t\t\tAceRelation relation = new AceRelation (relationElement, this, fileText);\n\t\t\taddRelation(relation);\n\t\t}\n\t\tNodeList eventElements = apfDoc.getElementsByTagName(\"event\");\n\t\tfor (int i=0; i<eventElements.getLength(); i++) {\n\t\t\tElement eventElement = (Element) eventElements.item(i);\n\t\t\tAceEvent event = new AceEvent (eventElement, this, fileText);\n\t\t\taddEvent(event);\n\t\t}\n\t}", "void openFile() {\n\t\tJFileChooser fileChooser = new JFileChooser(desktopPath);\n\t\tint returnVal = fileChooser.showOpenDialog(null);\n if(returnVal == JFileChooser.APPROVE_OPTION) {\n \tString filePath = fileChooser.getSelectedFile().getPath();\n File file = new File(filePath);\n textEditor.setText(\"\");\n try {\n \tScanner in = new Scanner(file);\n \twhile(in.hasNextLine()) {\n \t\ttextEditor.append(in.nextLine()+'\\n');\n \t}\n \tin.close();\n \ttextAreaChanged = false;\n \tsavedFilePath = filePath;\n } catch (Exception ex) {\n \terrorTextArea.setForeground(Color.RED);\n\t\t\t\terrorTextArea.setText(\"Error loding file\");\n\t\t\t}\n }\n\t}", "public void openFileInEditor(String filename) throws PartInitException{\n\t\tString path = DataManager.getCurrentPath() + slash + filename;\n\t\tajdtHandler.openFileInEditorView(path);\n\t}", "public boolean openFile(String name){\n boolean tmp=false;\n\n try{\n _file = new File(name);\n tmp=_file.exists();\n if (tmp) {\n rows =new Vector<String>();\n loadTSPTWFile();\n if(DEBUG){\n System.out.println(\"Load new file:\"+name);\n }\n loadTSPTWFile();\n }\n }catch( IOException ioe){\n tmp=false;\n }\n\n return tmp;\n }", "public boolean updateDocument(Document document, InputStream isDocument) {\n return false;\n }", "@FXML\n\tpublic void openFile() {\n\t\tFileChooser openFileChooser = new FileChooser();\n\t\topenFileChooser.setInitialDirectory(userWorkspace);\n\t\topenFileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter(\"Text doc(*.txt)\", \"*.txt\"));\n\t\tfile = openFileChooser.showOpenDialog(ap.getScene().getWindow());\n\n\t\tuserText.clear();\n\n\t\tif (file != null) {\n\t\t\tif (file.getName().endsWith(\".txt\")) {\n\t\t\t\tfilePath = file.getAbsolutePath();\n\t\t\t\tStage primStage = (Stage) ap.getScene().getWindow();\n\t\t\t\tprimStage.setTitle(filePath);\n\t\t\t\tTab tab = tabPane.getSelectionModel().getSelectedItem();\n\t\t\t\ttab.setId(filePath);\n\t\t\t\ttab.setText(file.getName());\n\n\t\t\t\twriteToUserText();\n\t\t\t}\n\t\t}\n\t}", "public boolean loadData() {\n try {\n SAXReader reader = new SAXReader();\n Document xmlDoc = reader.read(xmlFile);\n\n Element rootNode = xmlDoc.getRootElement();\n\n rootTreeIterate(rootNode);\n\n } catch (DocumentException ex) {\n logger.error(\"Document loading error:\", ex);\n return false;\n }\n\n return true;\n }", "private boolean open() {\r\n\t\tfor ( int i = 0; i < _headerObject._filenames.length; ++i) {\r\n\t\t\tFileObject fileObject = ( FileObject)_headerObject._fileObjectMap.get( _headerObject._filenames[ i]);\r\n\t\t\tif ( null == fileObject)\r\n\t\t\t\treturn false;\r\n\r\n\t\t\tif ( !fileObject.open())\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@OnThread(Tag.Swing)\n public static void openFile(File file)\n {\n try {\n if (Desktop.isDesktopSupported()) {\n Desktop desktop = Desktop.getDesktop();\n desktop.open(file);\n }\n else {\n throw new RuntimeException(\n \"Cannot open editor for the file, because the Desktop class is not supported on this platform.\");\n }\n }\n catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "public void openFile() {\n\t\tfc.setCurrentDirectory(new File(System.getProperty(\"user.dir\")));\n\t\tint returnVal = fc.showOpenDialog(null);\n\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile file = fc.getSelectedFile();\n\t filename.setText(file.getName());\n\t try {\n\t\t\t\tmodel.FileContent(file);\t//read the content of the input file\n\t\t\t\tplotContent.repaint();\t//repaint the JComponent\n\t\t\t\t\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public boolean openFile(SwingShabadEditor shabadEditor) throws IOException {\r\n \t\tint returnVal = fc.showOpenDialog(null);\r\n \t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\r\n \t\t\tFile file = fc.getSelectedFile();\r\n \r\n \t\t\tif (file.exists()) {\r\n \t\t\t\tshabadEditor.setText(FileUtils.readFileToString(file));\r\n \r\n \t\t\t\tcurFile = file;\r\n \t\t\t\treturn true;\r\n \t\t\t} else {\r\n \t\t\t\tDialogUtility.showFileDoesntExistDialog();\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\treturn false;\r\n \t}", "private void tbsOpenFile(){\n String path = Environment.getExternalStorageDirectory().getPath() + \"/\" + \"android面试题及答案.docx\";\n File file=new File(path);\n if (file.exists()){\n\n\n Bundle bundle=new Bundle();\n bundle.putString(\"filePath\", file.getPath());\n bundle.putString(\"tempPath\", Environment.getExternalStorageDirectory().getPath());\n boolean result = mTbsReaderView.preOpen(\"doc\", false);//Word类型的是“doc” 、 PDF的类型是“pdf”\n\n mTbsReaderView.openFile(bundle);\n\n }else {\n Toast.makeText(this,\"文件不存在\",Toast.LENGTH_SHORT).show();\n }\n\n }", "public static void openTextFile() {\n\t\ttry {\n\t\t\tin1 = new Scanner(new File(file1));\n\t\t\tin2 = new Scanner(new File(file2));\n\t\t} catch(FileNotFoundException ex) {\n\t\t\tSystem.err.println(\"Error opening file\" + ex);\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public void open() {\n\t\tJFileChooser fc = new JFileChooser(\"./\");\n\t\tBufferedReader br = null;\n\t\tFileReader fr = null;\n\t\tfc.showOpenDialog(null);\n\t\ttry {\n\t\t\tfr = new FileReader(fc.getSelectedFile().getAbsolutePath());\n\t\t\tbr = new BufferedReader(fr);\n\t\t\t//make sure textArea is empty\n\t\t\ttextArea.setText(\"\");\n\t\t\t//loop to read all lines in file\n\t\t\twhile(br.readLine() != null) {\n\t\t\t\ttextArea.append(br.readLine() + \"\\n\");\n\t\t\t}\n\t\t}\n\t\tcatch (IOException ie) {\n\t\t\tie.printStackTrace();\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\t\tfr.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (IOException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\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 void openText() {\n\t\tString xml = xformsWidget.getXform();\n\t\tif (xml == null || xml.trim().length() == 0) {\n\t\t\tWindow.alert(LocaleText.get(\"emptyFormError\"));\n\t\t\tshowOpen();\n\t\t\treturn;\n\t\t}\n\t\txformsWidget.hideWindow();\n\t\ttry\n\t\t{\n\t\t\tcontroller.loadNewForm(xml);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tWindow.alert(LocaleText.get(\"error\") + \":\\n\\r\" + e.getMessage());\n\t\t}\n\t}", "public void openFile() {\n\t\tJFileChooser choose = new JFileChooser();\n\t\t if(choose.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {\n\t\t\t\ttry {\n\t\t\t\t\tFile selectedFile = choose.getSelectedFile();\n\t\t\t\t\tdir=choose.getCurrentDirectory().toString();\n\t\t\t\t\tScanner readFile = new Scanner(selectedFile);\n\t\t\t\t\tif(!frame.textArea.getText().isEmpty()) {\n\t\t\t\t\t\tframe.textArea.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t\twhile(readFile.hasNext()) {\n\t\t\t\t\t\tString currentLine = readFile.nextLine();\n\t\t\t\t\t\tframe.textArea.append(currentLine+\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\tframe.setTitle(selectedFile.getName()+\"-Text Editor\");\n\t\t\t\t\tframe.originalText=frame.textArea.getText();\n\t\t\t\t\treadFile.close();\n\t\t\t\t} catch (FileNotFoundException ex) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"File Not Found\");\n\t\t\t\t}\n\n\t\t }\n\t}", "private static boolean validate(JAXBContext jaxbCongtext, File file, URL xsdUrl) {\n SchemaFactory schemaFactory = null;\n Schema schema = null;\n Source xmlFile = new StreamSource(file);\n try {\n schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);\n schema = schemaFactory.newSchema(xsdUrl);\n Validator validator = schema.newValidator();\n DocumentBuilderFactory db = newSecuDocBuilderFactory();\n db.setNamespaceAware(true);\n\n DocumentBuilder builder = db.newDocumentBuilder();\n Document doc = builder.parse(file);\n\n DOMSource source = new DOMSource(doc);\n DOMResult result = new DOMResult();\n\n validator.validate(source, result);\n LOGGER.debug(xmlFile.getSystemId() + \" is valid\");\n } catch(Exception ex) {\n LOGGER.error(xmlFile.getSystemId() + \" is NOT valid\", ex);\n return false;\n }\n return true;\n }", "public void openForInput (DataDictionary dict) \n throws IOException {\n \n // If this is markdown, then convert it to HTML before going any farther\n if (context.isMarkdown()) {\n if (inFile == null && inURL != null) {\n mdReader = new MetaMarkdownReader(inURL, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (inFile != null) {\n mdReader = new MetaMarkdownReader(inFile, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (textLineReader != null) {\n mdReader = new MetaMarkdownReader(textLineReader, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n if (mdReader != null) {\n mdReader.setMetadataAsMarkdown(metadataAsMarkdown);\n mdReader.openForInput();\n inFile = null;\n inURL = null;\n textLineReader = new StringLineReader(mdReader.getHTML());\n mdReader.close();\n mdReader = null;\n }\n }\n \n if (inFile == null && inURL != null) {\n HttpURLConnection.setFollowRedirects(true);\n inConnect = inURL.openConnection();\n if (inConnect.getClass().getName().endsWith(\"HttpURLConnection\")) {\n HttpURLConnection httpConnect = (HttpURLConnection)inConnect;\n httpConnect.setInstanceFollowRedirects(true);\n httpConnect.setConnectTimeout(0);\n }\n inConnect.connect();\n inStream = inConnect.getInputStream();\n streamReader = new InputStreamReader(inStream, \"UTF-8\");\n reader = new BufferedReader(streamReader);\n Logger.getShared().recordEvent(\n LogEvent.NORMAL,\n \"HTMLFile Open for input URL \" + inURL.toString()\n + \" with encoding \" + streamReader.getEncoding(),\n false);\n } \n else\n if (inFile != null) {\n streamReader = new FileReader(inFile);\n reader = new BufferedReader(streamReader);\n }\n else\n if (textLineReader != null) {\n textLineReader.open();\n reader = null;\n }\n \n this.dict = dict;\n dataRec = new DataRecord();\n recDef = new RecordDefinition(this.dict);\n openWithRule();\n recordNumber = 0;\n atEnd = false;\n }", "private void createDOCDocument(String from, File file) throws Exception {\n\t\tPOIFSFileSystem fs = new POIFSFileSystem(Thread.currentThread().getClass().getResourceAsStream(\"/poi/template.doc\"));\n\t\tHWPFDocument doc = new HWPFDocument(fs);\n\t\n\t\tRange range = doc.getRange();\n\t\tParagraph par1 = range.getParagraph(0);\n\t\n\t\tCharacterRun run1 = par1.insertBefore(from, new CharacterProperties());\n\t\trun1.setFontSize(11);\n\t\tdoc.write(new FileOutputStream(file));\n\t}", "public static Document loadDocument( String path, boolean validationActive ) {\n\t\ttry {\n\t\t\tXMLReaders validation = validationActive? XMLReaders.DTDVALIDATING: XMLReaders.NONVALIDATING;\n\t\t\tSAXBuilder builder = new SAXBuilder( validation );\n\t\t\tDocument doc = builder.build( new File( path ) );\n\t\t\treturn doc;\n\t\t} catch (JDOMException e) {\n\t\t\tthrow new RuntimeException(\"Error al intentar cargar un xml desde el path: \" + path, e);\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(\"Error al intentar cargar un xml desde el path: \" + path, e);\n\t\t}\n\n\t}", "public static void openFile(File map) throws IOException {\n\t\ttry {\n\t\t\tinput = new ObjectInputStream(new FileInputStream(map));\n\t\t\t\n\t\t} catch(IOException e) {\n\t\t\tSystem.err.println(\"Error: Unable to open map file.\");\n\t\t\tthrow e;\n\t\t}\n\t}", "private void readDocument(Attributes attrs) {\n this.state = DOC_TEXT_STATE;\n }", "public void openFile(){\n\t\ttry{\n\t\t\t//input = new Scanner (new File(\"input.txt\")); // creates file \"input.txt\" or will rewrite existing file\n\t\t\tFile inFile = new File(\"input.txt\");\n\t\t\tinput = new Scanner(inFile);\n\t\t\t//for (int i = 0; i < 25; i ++){\n\t\t\t\t//s = input.nextLine();\n\t\t\t\t//System.out.println(s);\n\t\t\t//}\n\t\t}catch (SecurityException securityException){ // catch errors\n\t\t\tSystem.err.println (\"You do not have the write access to this file.\");\n\t\t\tSystem.exit(1);\n\t\t}catch (FileNotFoundException fnf){// catch errors\n\t\t\tSystem.err.println (\"Trouble opening file\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "private void openWorkbook(File file) throws FileNotFoundException,\n IOException {\n try (FileInputStream fis = new FileInputStream(file)) {\n this.workbook = WorkbookFactory.create(fis);\n this.evaluator = this.workbook.getCreationHelper().createFormulaEvaluator();\n this.formatter = new DataFormatter(true);\n }\n }", "private AttributionDocument loadAttributionDocument(File file) throws IOException, JAXBException {\n if (file != null) {\n if (!file.canRead()) {\n String s = String.format(\"Can't read input file %s.\", file.getCanonicalPath());\n throw new IOException(s);\n }\n try {\n FileInputStream fis = new FileInputStream(file);\n AttributionDocument attributionDocument = loadAttributionDocumentFromStream(fis);\n fis.close();\n return attributionDocument;\n } catch (JAXBException e) {\n String s = String.format(\"Can't load input file %s.\", file);\n throw new JAXBException(s, e);\n }\n }\n return null;\n }", "boolean hasDocument();", "boolean hasDocument();", "boolean hasDocument();", "public boolean load() {\n String text = FileTools.loadTextFromFile(this.textFilePath);\n\n if (text == null) {\n JOptionPane.showMessageDialog(null, \"Failed to load \" + this.textFilePath, \"Error\", JOptionPane.ERROR_MESSAGE);\n\n if (this.originalText == null) {\n text = \"[Error: failed To load file : \" + this.textFilePath + \"]\";\n this.a_text.setText(text);\n }\n\n this.a_text.setEnabled(false);\n return false;\n } else {\n if (this.originalText != null && !this.originalText.equals(this.a_text.getText())) {\n int value = JOptionPane.showConfirmDialog(null, \"The current text will be erased.\\nDo you want to continue ?\", \"Load\", JOptionPane.YES_NO_OPTION);\n\n if (value != JOptionPane.YES_OPTION)\n return false;\n }\n\n this.originalText = text;\n this.a_text.setText(text);\n this.a_text.setEnabled(true);\n return true;\n }\n }", "public Document readDocument();", "public boolean writeWordFile() throws Exception {\n\n InputStream is = null;\n FileOutputStream fos = null;\n\n // 1 Cannot find source file, return false\n File inputFile = new File(this.inputPath);\n if (!inputFile.exists()) {\n return false;\n }\n\n File outputFile = new File(this.outputPath);\n // 2 If the target path does not exist, create a new path\n if (!outputFile.getParentFile().exists()) {\n outputFile.getParentFile().mkdirs();\n }\n\n try {\n\n // 3 Write html file content to doc file\n is = new FileInputStream(inputFile);\n POIFSFileSystem poifs = new POIFSFileSystem();\n DirectoryEntry directory = poifs.getRoot();\n directory.createDocument(\n \"WordDocument\", is);\n\n fos = new FileOutputStream(this.outputPath);\n poifs.writeFilesystem(fos);\n\n System.out.println(\"Conversion of word files is complete!\");\n\n return true;\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (fos != null) {\n fos.close();\n }\n if (is != null) {\n is.close();\n }\n }\n\n return false;\n }", "public void read() {\n\t\tSystem.out.println(\"word document\");\r\n\t}", "boolean hasDocument(String path);", "public void newFileCreated(OpenDefinitionsDocument doc) { }", "public void newFileCreated(OpenDefinitionsDocument doc) { }", "private boolean readFile() {\n JFileChooser jfc=new JFileChooser();\n jfc.setCurrentDirectory(new File(\"Users/\"+System.getProperty(\"user.name\")+\"/Desktop\"));\n jfc.setDialogTitle(WED_ZERO.lang.getInstruct().get(1)[34]);\n jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\n jfc.setAcceptAllFileFilterUsed(false);\n jfc.setFileFilter(new FileType());\n jfc.setVisible(true);\n if (jfc.showOpenDialog(panel)==JFileChooser.APPROVE_OPTION) {\n Reader read=new Reader(FileManaging.processLoc(jfc.getCurrentDirectory(), jfc.getSelectedFile()));\n try {\n this.processNewData(read.getMap(), read.getPacketName());\n return true;\n } catch (IOException ex) {\n ERROR.ERROR_362(Launch.frame);\n return false;\n }\n }\n return true;\n }", "public void readDocument() throws FileNotFoundException{\r\n\t\t// Initialize 2 empty read document collections, one without duplicate words.\r\n\t\treadDocument = new LinkedBag<String>();\r\n\t\treadDocumentNoDuplicates = new LinkedSet<String>();\r\n\t\t\r\n\t\t// Prompt user for name of read document file.\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter the file you would like checked with extension: \");\r\n\t\tString readDocFileName = input.nextLine();\r\n\t\t\r\n\t\t// If exists, open file specified by user. Then add words to both collections.\r\n\t\ttry {\r\n\t\t\tFile file = new File(readDocFileName);\r\n\t\t\tScanner scanner = new Scanner(file);\r\n\t\t\twhile (scanner.hasNextLine()) {\r\n\t\t\t\tString word = scanner.next();\r\n\t\t\t\treadDocument.add(word.replaceFirst(\"^[^a-zA-Z]+\",\"\").replaceAll(\"[^a-zA-Z]+$\", \"\"));\r\n\t\t\t\treadDocumentNoDuplicates.add(word.replaceFirst(\"^[^a-zA-Z]+\",\"\").replaceAll(\"[^a-zA-Z]+$\", \"\"));\r\n\t\t\t}\r\n\t\t\tscanner.close();\r\n\t\t\tSystem.out.println(\"Document read\");\r\n\r\n\t\t\t// Get initial list of incorrect words.\r\n\t\t\tincorrectWords = readDocumentNoDuplicates.difference(dictionary);\r\n\t\t\t\r\n\t\t\t// Display message showing how many words were in the read document.\r\n\t\t\tSystem.out.println(\"This document contains \" + readDocument.size() + \" words.\");\r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\treadDocument = null;\r\n\t\t\treadDocumentNoDuplicates = null;\r\n\t\t\tSystem.out.println(\"Error: File '\" + readDocFileName + \"' not found. Please try again.\");\r\n\t\t}\r\n\t}", "public boolean open() {\n\t\treturn open(false);\n\t}", "public InputStream open(File file) {\n return new FileInputStream(file);\n }", "public void checkInDocument()\n\t{\n\t\tASPManager mgr = getASPManager();\n\n\t\tif (itemlay.isMultirowLayout() && itemset.selectRows()==0)\n\t\t{\n\t\t\tmgr.showAlert(mgr.translate(\"DOCMAWDOCREFERENCENOROWS: No Rows Selected.\"));\n\t\t\treturn;\n\t\t}\n\t\t//Bug Id 67336, start\n\t\tif (CheckFileOperationEnable()) \n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t//Bug Id 67336, end\n\n\t\ttransferToEdmMacro(\"ORIGINAL\",\"CHECKIN\");\n\t}", "public void openFile(@NotNull final CheckedConsumer<FileManager, IOException> loadAction) {\n try {\n final var pair = editorManager.createEditor();\n final Editor editor = pair.getFirst();\n final var fm = pair.getSecond();\n loadAction.accept(fm);\n editorManager.openEditor(editor, fm);\n mimaUI.fileChanged();\n App.logger.log(\"loaded: \" + FileName.shorten(fm.getLastFile()));\n } catch (@NotNull final IOException | IllegalStateException e) {\n App.logger.error(\"Could not load file: \" + e.getMessage());\n }\n }", "public boolean open() {\n\n return true;\n }", "void openInput(String file)\r\n\t{\n\t\ttry{\r\n\t\t\tfstream = new FileInputStream(file);\r\n\t\t\tin = new DataInputStream(fstream);\r\n\t\t\tis = new BufferedReader(new InputStreamReader(in));\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.err.println(e);\r\n\t\t}\r\n\r\n\t}", "public static void openDocument(Context context, String strFilePath, String strFileType) {\n try {\n File file = new File(strFilePath);\n Intent intent = new Intent(Intent.ACTION_VIEW);\n /* if (strFileType.equals(\"pdf\")) {\n intent.setDataAndType(Uri.fromFile(file), \"application/pdf\");\n } else if (strFileType.equals(\"doc\") || strFileType.equals(\"docx\")) {\n MimeTypeMap myMime = MimeTypeMap.getSingleton();\n String mimeType = myMime.getMimeTypeFromExtension(strFilePath);\n intent.setDataAndType(Uri.fromFile(file), mimeType);\n } else {\n intent.setDataAndType(Uri.fromFile(file), \"application/*\");\n }*/\n intent.setDataAndType(Uri.fromFile(file), \"application/*\");\n intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);\n context.startActivity(intent);\n } catch (ActivityNotFoundException activityNotFoundException) {\n activityNotFoundException.printStackTrace();\n throw activityNotFoundException;\n } catch (Exception otherException) {\n otherException.printStackTrace();\n throw otherException;\n }\n }", "public static Document loadDocument( InputStream input, boolean validationActive ) {\n\t\ttry {\n\t\t\tXMLReaders validation = validationActive? XMLReaders.DTDVALIDATING: XMLReaders.NONVALIDATING;\n\t\t\tSAXBuilder builder = new SAXBuilder( validation );\n\t\t\tDocument doc = builder.build( input );\n\t\t\treturn doc;\n\t\t} catch (JDOMException e) {\n\t\t\tthrow new RuntimeException(\"Error al intentar cargar un xml\");\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(\"Error al intentar cargar un xml\");\n\t\t}\n\t}", "private int addDoc(IndexWriter w, String url, File file) throws IOException, IllegalArgumentException {\n\t\t\n\t\t//TODO: needs to be able to parse HTML pages here\n\t\t//File parsing\n\t\torg.jsoup.nodes.Document html = Jsoup.parse(String.join(\"\",Files.readAllLines(file.toPath())));\n\t\t\n\t\t//If we cant parse the html\n\t\tif(html == null)\n\t\t\treturn -1;\n\t\t\n\t\t\n\t\tif(PRINT_CONTENT_STRING)\n\t\t\tSystem.out.println(\"***This is the body***\\n\" + String.join(\"\",Files.readAllLines(file.toPath())));\n\t\t\n\t\tif(PRINT_CONTENT_BODY)\n\t\t\tSystem.out.println(\"***This is the body***\\n\" + html.body());\n\t\t\n\t\tString content = null;\n\t\tElement body = html.body();\n\t\t\n\t\t//Get the rest of the text in the body\n\t\tif(body != null)\n\t\t\tcontent = body.text();\n\t\t\n\t\tif(PRINT_CONTENT_TEXT)\n\t\t\tSystem.out.println(\"***This is the BODY text***\\n\" + content);\n\n\t\tString title = null;\n\t\tElement head = html.head();\n\t\tif(head != null)\n\t\t\ttitle = head.text();\n\t\t\n\t\tif(PRINT_CONTENT_TEXT)\n\t\t\tSystem.out.println(\"***This is the TITLE***\\n\" + title);\n\t\t\t\t\n\t\t//Document Creation\n\t\tDocument doc = new Document();\n\t\tField field = null;\n\t\tFieldType type = new FieldType();\n\t\ttype.setIndexOptions(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS);\n\t\ttype.setStored(true); \n\t\ttype.setStoreTermVectors(true);\n\t\ttype.setTokenized(true);\n\t\t\n\t\t//If there is text in the head, it is probably a title\n\t\tif(title != null && !title.isEmpty()){\n\t\t\tfield = new Field(\"title\", title, type);\n\t\t\tfield.setBoost(15); //Set weight for the field when query matches to string in field here\n\t\t\tdoc.add(field);\n\t\t}\n\t\t\n\t\tif(PRINT_INDEX_TO_PARSING)\n\t\t\tSystem.out.println(\"This is title: \" + title);\n\n\t\t//Grab the important text tags\n\t\tElements importantTags = body.select(\"b, strong, em\");\n\n\t\tif(importantTags != null && !importantTags.isEmpty())\n\t\t{\n\t\t\tfield = new Field(\"important\", importantTags.html(), type);\n\t\t\t\n\t\t\t//Setting the bold tag boost\n\t\t\tfield.setBoost(1); \n\t\t\tdoc.add(field);\n\t\t\t\n\t\t\t//We remove any content in these tags so there is no duplicate counting\n\t\t\timportantTags.remove();\n\t\t}\n\t\tif(PRINT_INDEX_TO_PARSING)\n\t\t\tSystem.out.println(\"This is Bolding: \" + importantTags.text());\n\n\t\t\n\t\t//Grab all heading tags\n\t\tElements headingTags = body.select(\"h1, h2, h3, h4, h5, h6\");\n\n\t\tfor(int headingNum = 0; headingNum < 6; headingNum++)\n\t\t{\n\t\t\t//Attempt to index all the heading tags\n\t\t\tElements hTags = headingTags.select(\"h\" + (headingNum + 1));\n\t\t\tif(hTags != null && !hTags.isEmpty())\n\t\t\t{\n\t\t\t\tfield = new Field(\"heading\" + headingNum, hTags.html(), type);\n\t\t\t\t\n\t\t\t\t//Setting the heading tag boost\n\t\t\t\tfield.setBoost(5); \n\t\t\t\tdoc.add(field);\n\t\t\t\t\n\t\t\t\t//We remove any content in these tags so there is no duplicate counting\n\t\t\t\thTags.remove();\n\t\t\t}\n\t\t\tif(PRINT_INDEX_TO_PARSING)\n\t\t\t\tSystem.out.println(\"This is heading: \" + headingNum + \" - \" + hTags.text());\n\n\t\t}\n\t\t\n\t\t//Need to parse the remaining content after all the important tags have been deleted \n\t\tif(content != null && !content.isEmpty()){\n\t\t\tfield = new Field(\"content\", content, type);\n\t\t\t\n\t\t\t//Setting the default boost\n\t\t\tfield.setBoost(1); \n\t\t\tdoc.add(field);\n\t\t}\n\t\tif(PRINT_INDEX_TO_PARSING)\n\t\t\tSystem.out.println(\"This is content: \" + content);\n\n\t\t//Need to make sure we have content before attempting to add a link to a document\n\t\tif(doc.getFields().size() > 0)\n\t\t{\n\t\t\t//fileID field should not be used for finding terms within document, only for uniquely identifying this doc amongst others in index\n\t\t\ttype = new FieldType();\n\t\t\ttype.setStored(true);\n\t\t\ttype.setTokenized(false);\n\t\t\ttype.setStoreTermVectors(false);\n\t\t\tdoc.add(new Field(\"url\", url, type));\n\t\t\t\n\t\t\tw.addDocument(doc);\n\t\t\t\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\treturn -1;\n\t}", "@Override\n public void openScene(File file) {\n this.scene.open(file);\n\n // notify scene observers\n this.scene.notifyObservers();\n\n }", "public static boolean writeToFile(String filename, String text) {\n \n try (BufferedWriter writer = new BufferedWriter(new FileWriter(new File(INVOICE_DIRECTORY, filename)))) {\n writer.write(text);\n writer.close();\n return true;\n \n } catch (IOException e) {\n System.out.println(\"Unable to write to file \" + filename + \". Error message:\\n\" + e.getMessage());\n return false;\n }\n }", "public void open() {\r\n\t\tFile f = getOpenFile(\"Map Files\", \"tilemap\");\r\n\t\tif (f == null) return;\r\n\t\tfile = f;\r\n\t\tframe.setTitle(\"Tile Mapper - \"+file.getName());\r\n\t\tSystem.out.println(\"Opening \"+file.getAbsolutePath());\r\n\r\n\t\ttry {\r\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\r\n\t\t\tInputStream is = this.getClass().getClassLoader().getResourceAsStream(\"tilemapper/Map.xsd\");\r\n\t\t\tfactory.setSchema(SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(new StreamSource(is)));\r\n\r\n\t\t\tDocument dom = factory.newDocumentBuilder().parse(file);\r\n\r\n\t\t\t// we have a valid document\r\n\t\t\t//printNode(dom, \"\");\r\n\t\t\tNode mapNode = null;\r\n\t\t\tNodeList nodes = dom.getChildNodes();\r\n\t\t\tfor (int i=0; i<nodes.getLength(); i++) {\r\n\t\t\t\tNode node = nodes.item(i);\r\n\t\t\t\tif (node.getNodeName() == \"Map\") mapNode = node;\r\n\t\t\t}\r\n\t\t\tif (mapNode == null) return;\r\n\t\t\tmapPanel.parseDOM((Element)mapNode);\r\n\r\n\t\t} catch (ParserConfigurationException e) {\r\n\t\t\tSystem.out.println(\"The underlying parser does not support the requested features.\");\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (FactoryConfigurationError e) {\r\n\t\t\tSystem.out.println(\"Error occurred obtaining Document Builder Factory.\");\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static Document parse(String filename) throws ParserException {\n\t\tif (filename == null) {\n\t\t\tthrow new ParserException();\n\t\t}\n\t\tFile file = new File(filename);\n\t\tif (!file.exists() || !file.isFile()) {\n\t\t\tthrow new ParserException();\n\t\t}\n\t\tFile subDir = file.getParentFile();\n\t\tif (!subDir.exists() || !subDir.isDirectory()) {\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t// Document should be valid by here\n\t\tDocument doc = new Document();\n\t\tFieldNames field = FieldNames.TITLE;\n\t\tList<String> authors = new LinkedList<String>();\n\t\tString content = new String();\n\t\tboolean startContent = false;\n\n\t\tdoc.setField(FieldNames.FILEID, file.getName());\n\t\tdoc.setField(FieldNames.CATEGORY, subDir.getName());\n\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(file));\n\t\t\tString line = reader.readLine();\n\n\t\t\twhile (line != null) {\n\t\t\t\tif (!line.isEmpty()) {\n\t\t\t\t\tswitch (field) {\n\t\t\t\t\tcase TITLE:\n\t\t\t\t\t\tdoc.setField(field, line);\n\t\t\t\t\t\tfield = FieldNames.AUTHOR;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase AUTHOR:\n\t\t\t\t\tcase AUTHORORG:\n\t\t\t\t\t\tif (line.startsWith(\"<AUTHOR>\") || !authors.isEmpty()) {\n\t\t\t\t\t\t\tString[] seg = null;\n\t\t\t\t\t\t\tString[] author = null;\n\n\t\t\t\t\t\t\tline = line.replace(\"<AUTHOR>\", \"\");\n\t\t\t\t\t\t\tseg = line.split(\",\");\n\t\t\t\t\t\t\tauthor = seg[0].split(\"and\");\n\t\t\t\t\t\t\tauthor[0] = author[0].replaceAll(\"BY|By|by\", \"\");\n\t\t\t\t\t\t\t// Refines author names\n\t\t\t\t\t\t\tfor (int i = 0; i < author.length; ++i) {\n\t\t\t\t\t\t\t\tauthor[i] = author[i].trim();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tauthor[author.length - 1] = author[author.length - 1]\n\t\t\t\t\t\t\t\t\t.replace(\"</AUTHOR>\", \"\").trim();\n\t\t\t\t\t\t\tauthors.addAll(Arrays.asList(author));\n\n\t\t\t\t\t\t\t// Saves author organization\n\t\t\t\t\t\t\tif (seg.length > 1) {\n\t\t\t\t\t\t\t\tdoc.setField(FieldNames.AUTHORORG, seg[1]\n\t\t\t\t\t\t\t\t\t\t.replace(\"</AUTHOR>\", \"\").trim());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (line.endsWith(\"</AUTHOR>\")) {\n\t\t\t\t\t\t\t\t// Saves author\n\t\t\t\t\t\t\t\tdoc.setField(FieldNames.AUTHOR, authors\n\t\t\t\t\t\t\t\t\t\t.toArray(new String[authors.size()]));\n\t\t\t\t\t\t\t\tfield = FieldNames.PLACE;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// This should be a PLACE\n\t\t\t\t\t\t\tfield = FieldNames.PLACE;\n\t\t\t\t\t\t}\n\t\t\t\t\tcase PLACE:\n\t\t\t\t\t\tif (!line.contains(\"-\")) {\n\t\t\t\t\t\t\tfield = FieldNames.CONTENT;\n\t\t\t\t\t\t\tstartContent = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tString[] seg = line.split(\"-\");\n\t\t\t\t\t\t\tString[] meta = seg[0].split(\",\");\n\t\t\t\t\t\t\tif (seg.length != 0 && !seg[0].isEmpty()) {\n\n\t\t\t\t\t\t\t\tif (meta.length > 1) {\n\t\t\t\t\t\t\t\t\tdoc.setField(\n\t\t\t\t\t\t\t\t\t\t\tFieldNames.PLACE,\n\t\t\t\t\t\t\t\t\t\t\tseg[0].substring(0,\n\t\t\t\t\t\t\t\t\t\t\t\t\tseg[0].lastIndexOf(\",\"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t.trim());\n\t\t\t\t\t\t\t\t\tdoc.setField(FieldNames.NEWSDATE,\n\t\t\t\t\t\t\t\t\t\t\tmeta[meta.length - 1].trim());\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmeta[0] = meta[0].trim();\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tnew SimpleDateFormat(\"MMM d\",\n\t\t\t\t\t\t\t\t\t\t\t\tLocale.ENGLISH).parse(meta[0]);\n\t\t\t\t\t\t\t\t\t\t// This is a news date\n\t\t\t\t\t\t\t\t\t\tdoc.setField(FieldNames.NEWSDATE,\n\t\t\t\t\t\t\t\t\t\t\t\tmeta[0]);\n\t\t\t\t\t\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t\t\t\t\t\t// This is a place\n\t\t\t\t\t\t\t\t\t\tdoc.setField(FieldNames.PLACE, meta[0]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfield = FieldNames.CONTENT;\n\t\t\t\t\tcase CONTENT:\n\t\t\t\t\t\tif (!startContent) {\n\t\t\t\t\t\t\t// First line of content\n\t\t\t\t\t\t\tString[] cont = line.split(\"-\");\n\t\t\t\t\t\t\tif (cont.length > 1) {\n\t\t\t\t\t\t\t\tfor (int i = 1; i < cont.length; ++i) {\n\t\t\t\t\t\t\t\t\tcontent += cont[i];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstartContent = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontent += \" \" + line;\n\t\t\t\t\t\t}\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tline = reader.readLine();\n\t\t\t}\n\t\t\tdoc.setField(FieldNames.CONTENT, content);\n\t\t\tdoc.setField(FieldNames.LENGTH, Integer.toString(content.trim().split(\"\\\\s+\").length));\n\t\t\treader.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new ParserException();\n\t\t}\n\n\t\treturn doc;\n\t}", "public void open (File file)\n\t{\n\t\topen (file, false);\n\t}", "public InputStream readDocumentAsStream(String path) ;", "public ExternalDocumentEntry(\n\t\t\torg.openhealthtools.mdht.uml.cda.ExternalDocument externalReference) {\n\t\tsuper(externalReference);\n\t}", "public synchronized boolean isReadingFromFile(){\n\t\treturn isReadingFromFile;\n\t}", "public void attachExternalDocumentInCaseFolder(\n String caseFolderPath,\n String TOS,\n String documentPath,\n String documentTitle) throws Exception {\n UserContext old = UserContext.get();\n CaseMgmtContext oldCmc = null;\n Subject sub = Subject.getSubject(AccessController.getContext());\n String ceURI = null;\n\n try {\n ceURI = filenet.vw.server.Configuration.GetCEURI(null, null);\n Connection connection = Factory.Connection.getConnection(ceURI);\n\n // setting up user context\n UserContext uc = new UserContext();\n uc.pushSubject(sub);\n UserContext.set(uc);\n\n EntireNetwork entireNetwork = Factory.EntireNetwork.fetchInstance(connection, null);\n\n if (entireNetwork == null) {\n Exception e = new Exception(\"Cannot log in to \" + ceURI);\n logException(e);\n }\n\n // retrieve target object store\n Domain domain = entireNetwork.get_LocalDomain();\n ObjectStore targetOS = (ObjectStore) domain.fetchObject(\n ClassNames.OBJECT_STORE,\n TOS,\n null);\n\n\n // setting up CaseMmgtContext for Case API\n SimpleVWSessionCache vwSessCache = new SimpleVWSessionCache();\n CaseMgmtContext cmc = new CaseMgmtContext(vwSessCache, new SimpleP8ConnectionCache());\n oldCmc = CaseMgmtContext.set(cmc);\n\n // retrieve case folder\n Folder caseFolder = (Folder) targetOS.fetchObject(ClassNames.FOLDER,\n caseFolderPath,\n null);\n\n // insert document to 'Unfiled Document' folder in TOS\n File handlerJar = new File(documentPath);\n Document doc = Factory.Document.createInstance(targetOS, \"Document\");\n ContentElementList cel = Factory.ContentElement.createList();\n ContentTransfer t = Factory.ContentTransfer.createInstance();\n t.set_ContentType(\"text/plain\");\n t.set_RetrievalName(\"body.txt\");\n\n FileInputStream fileIS = null;\n fileIS = new FileInputStream(handlerJar.getAbsolutePath());\n t.setCaptureSource(fileIS);\n\n UpdatingBatch batch = UpdatingBatch.createUpdatingBatchInstance(domain, RefreshMode.NO_REFRESH);\n\n cel.add(t);\n doc.set_ContentElements(cel);\n doc.getProperties().putValue(\"DocumentTitle\", documentTitle);\n doc.checkin(AutoClassify.DO_NOT_AUTO_CLASSIFY, CheckinType.MAJOR_VERSION);\n batch.add(doc, null);\n\n\t /* file document to case folder*/\n DynamicReferentialContainmentRelationship drcr\n = (DynamicReferentialContainmentRelationship) caseFolder.file((IndependentlyPersistableObject) doc,\n AutoUniqueName.AUTO_UNIQUE,\n documentTitle,\n DefineSecurityParentage.DO_NOT_DEFINE_SECURITY_PARENTAGE);\n batch.add(drcr, null);\n\n batch.updateBatch();\n } catch (Exception e) {\n logException(e);\n } finally {\n if (oldCmc != null) {\n CaseMgmtContext.set(oldCmc);\n }\n\n if (old != null) {\n UserContext.set(old);\n }\n }\n }", "public void openFile() {\n try {\n x = new Formatter(\"DistanceTraveled.txt\");\n }\n catch (Exception e) {\n System.out.println(\"You have an error.\");\n }\n }", "@Override\n public InputStream readFileExternal(String _fileName) throws IOException \n { // Reads a file saved to external storage. Takes the filename as a parameter and throws an IOException if failed.\n return new FileInputStream(externalStoragePath + _fileName);\n }", "public boolean isFileOpened() {\r\n \t\tif (curFile == null)\r\n \t\t\treturn false;\r\n \t\telse\r\n \t\t\treturn true;\r\n \t}", "public AceDocument (String textFileName, String APFfileName) {\n\t\ttry {\n\t\t// initialize APF reader\n\t\tif (builder == null) {\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\t\tfactory.setValidating(false);\n\t\t\tbuilder = factory.newDocumentBuilder();\n\t\t\t}\n\t\t\tanalyzeDocument (textFileName, APFfileName);\n\t\t} catch (SAXException e) {\n\t\t\tSystem.err.println (\"AceDocument: Exception in initializing APF reader: \" + e);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println (\"AceDocument: Exception in initializing APF reader: \" + e);\n\t\t} catch (ParserConfigurationException e) {\n\t\t\tSystem.err.println (\"AceDocument: Exception in initializing APF reader: \" + e);\n\t\t}\n\t}", "boolean open() {\n if (handle != 0) {\n throw new InternalError(\"Native library \" + name + \" has been loaded\");\n }\n return load0(this, name);\n }", "private void openFile(Path filePath) {\n AbbreviationsFileViewModel abbreviationsFile = new AbbreviationsFileViewModel(filePath);\n if (journalFiles.contains(abbreviationsFile)) {\n dialogService.showErrorDialogAndWait(Localization.lang(\"Duplicated Journal File\"), Localization.lang(\"Journal file %s already added\", filePath.toString()));\n return;\n }\n if (abbreviationsFile.exists()) {\n try {\n abbreviationsFile.readAbbreviations();\n } catch (FileNotFoundException e) {\n logger.debug(e.getLocalizedMessage());\n }\n }\n journalFiles.add(abbreviationsFile);\n }", "public ExternalDocumentEntry() {\n\t\tsuper(CDAFactory.eINSTANCE.createExternalDocument());\n\t\tthis.getMdht().getTemplateIds()\n\t\t\t\t.add(DatatypesFactory.eINSTANCE.createII(\"2.16.840.1.113883.10.20.1.36\"));\n\t\tthis.getMdht().setClassCode(ActClassDocument.DOC);\n\t\tthis.getMdht().setMoodCode(ActMood.EVN);\n\n\t}", "public void openURLByFile(String url)\n {\n getAppleMenu().activate();\n getAppleMenu().select(Menu.FILE);\n getAppleMenu().open(Menu.OPEN_URL);\n logger.debug(\"Open Office document from URL: \" + url);\n getLdtp().enterString(url);\n getLdtp().generateKeyEvent(\"<enter>\");\n }", "public interface DocumentReader\n {\n\t/**\n\t* Read a single Document from the specified file.\n\t* @returns The next Document if there are more, or null if there are not.\n\t*/\n public Document readDocument();\n }" ]
[ "0.595098", "0.58611596", "0.56336147", "0.55959696", "0.55096835", "0.5363963", "0.52872634", "0.520229", "0.520229", "0.50544244", "0.5051833", "0.5009386", "0.49685475", "0.49481317", "0.48678926", "0.48511484", "0.48261604", "0.48063093", "0.47806683", "0.477666", "0.47718906", "0.4770403", "0.47633466", "0.47436857", "0.4740854", "0.47388119", "0.46702436", "0.46635777", "0.46204972", "0.4609209", "0.46073866", "0.4602297", "0.4597141", "0.45841676", "0.4569357", "0.4554345", "0.45530185", "0.4539323", "0.44971547", "0.44968617", "0.44717756", "0.44579998", "0.44312474", "0.44141212", "0.4409215", "0.44087023", "0.4402529", "0.43891007", "0.4384009", "0.4377798", "0.4360245", "0.4354413", "0.43507385", "0.43478438", "0.4342049", "0.43375814", "0.43267253", "0.43233725", "0.43193614", "0.4312486", "0.43094173", "0.43011588", "0.43011588", "0.43011588", "0.43011484", "0.4294458", "0.42898986", "0.4285631", "0.42731428", "0.42484736", "0.42484736", "0.42439428", "0.42418534", "0.42399076", "0.4239355", "0.4221962", "0.42119044", "0.42116076", "0.42096055", "0.4203374", "0.42007187", "0.41990185", "0.419864", "0.41938522", "0.4191968", "0.41886523", "0.41883698", "0.41868168", "0.4186747", "0.41832003", "0.4178676", "0.41785935", "0.41766876", "0.41646975", "0.41578075", "0.41559598", "0.41558573", "0.41552588", "0.41420335", "0.41365302" ]
0.6372073
0
reads a file with partofspeech markup, in the format token/pos token/pos ... and converts it to a document with annotation 'constit' with feature 'cat' whose value is the part of speech.
private void posRead() throws IOException { File file = new File(fullFileName()); String line; BufferedReader reader = new BufferedReader(new FileReader(file)); StringBuffer fileText = new StringBuffer(); while((line = reader.readLine()) != null) { StringTokenizer st = new StringTokenizer(line); while (st.hasMoreTokens()) { String tokenAndPos = st.nextToken(); int slashIndex = tokenAndPos.lastIndexOf('/'); if (slashIndex <= 0) throw new IOException("invalid data"); String token = tokenAndPos.substring(0,slashIndex); String pos = tokenAndPos.substring(1+slashIndex).intern(); int start = this.length(); this.append(token); if (st.hasMoreTokens()) this.append(" "); else this.append(" \n"); int end = this.length(); Span span = new Span(start,end); this.annotate("token", span, new FeatureSet()); this.annotate("constit", span, new FeatureSet("cat", pos)); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void process(JCas aJCas) throws AnalysisEngineProcessException {\n\t\tString text = aJCas.getDocumentText();\n\n\t\t// create an empty Annotation just with the given text\n\t\tAnnotation document = new Annotation(text);\n//\t\tAnnotation document = new Annotation(\"Barack Obama was born in Hawaii. He is the president. Obama was elected in 2008.\");\n\n\t\t// run all Annotators on this text\n\t\tpipeline.annotate(document); \n\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class);\n\t\t HelperDataStructures hds = new HelperDataStructures();\n\n\t\t\n\t\t//SPnew language-specific settings:\n\t\t//SPnew subject tags of the parser\n\t\t HashSet<String> subjTag = new HashSet<String>(); \n\t\t HashSet<String> dirObjTag = new HashSet<String>(); \n\t\t //subordinate conjunction tags\n\t\t HashSet<String> compTag = new HashSet<String>(); \n\t\t //pronoun tags\n\t\t HashSet<String> pronTag = new HashSet<String>(); \n\t\t \n\t\t HashSet<String> passSubjTag = new HashSet<String>();\n\t\t HashSet<String> apposTag = new HashSet<String>(); \n\t\t HashSet<String> verbComplementTag = new HashSet<String>(); \n\t\t HashSet<String> infVerbTag = new HashSet<String>(); \n\t\t HashSet<String> relclauseTag = new HashSet<String>(); \n\t\t HashSet<String> aclauseTag = new HashSet<String>(); \n\t\t \n\t\t HashSet<String> compLemma = new HashSet<String>(); \n\t\t HashSet<String> coordLemma = new HashSet<String>(); \n\t\t HashSet<String> directQuoteIntro = new HashSet<String>(); \n\t\t HashSet<String> indirectQuoteIntroChunkValue = new HashSet<String>();\n\t\t \n//\t\t HashSet<String> finiteVerbTag = new HashSet<String>();\n\t\t \n\n\t\t //OPEN ISSUES PROBLEMS:\n\t\t //the subject - verb relation finding does not account for several specific cases: \n\t\t //opinion verbs with passive subjects as opinion holder are not accounted for,\n\t\t //what is needed is a marker in the lex files like PASSSUBJ\n\t\t //ex: Obama is worried/Merkel is concerned\n\t\t //Many of the poorer countries are concerned that the reduction in structural funds and farm subsidies may be detrimental in their attempts to fulfill the Copenhagen Criteria.\n\t\t //Some of the more well off EU states are also worried about the possible effects a sudden influx of cheap labor may have on their economies. Others are afraid that regional aid may be diverted away from those who currently benefit to the new, poorer countries that join in 2004 and beyond. \n\t\t// Does not account for infinitival constructions, here again a marker is needed to specify\n\t\t //subject versus object equi\n\t\t\t//Christian Noyer was reported to have said that it is ok.\n\t\t\t//Reuters has reported Christian Noyer to have said that it is ok.\n\t\t //Obama is likely to have said.. \n\t\t //Several opinion holder- opinion verb pairs in one sentence are not accounted for, right now the first pair is taken.\n\t\t //what is needed is to run through all dependencies. For inderect quotes the xcomp value of the embedded verb points to the \n\t\t //opinion verb. For direct quotes the offsets closest to thwe quote are relevant.\n\t\t //a specific treatment of inverted subjects is necessary then. Right now the\n\t\t //strategy relies on the fact that after the first subj/dirobj - verb pair the\n\t\t //search is interrupted. Thus, if the direct object precedes the subject, it is taken as subject.\n\t\t // this is the case in incorrectly analysed inverted subjeects as: said Zwickel on Monday\n\t\t //coordination of subject not accounted for:employers and many economists\n\t\t //several subject-opinion verbs:\n\t\t //Zwickel has called the hours discrepancy between east and west a \"fairness gap,\" but employers and many economists point out that many eastern operations have a much lower productivity than their western counterparts.\n\t\t if (language.equals(\"en\")){\n \t subjTag.add(\"nsubj\");\n \t subjTag.add(\"xsubj\");\n \t subjTag.add(\"nmod:agent\");\n \t \n \t dirObjTag.add(\"dobj\"); //for inverted subject: \" \" said IG metall boss Klaus Zwickel on Monday morning.\n \t \t\t\t\t\t\t//works only with break DEPENDENCYSEARCH, otherwise \"Monday\" is nsubj \n \t \t\t\t\t\t\t//for infinitival subject of object equi: Reuters reports Obama to have said\n \tpassSubjTag.add(\"nsubjpass\");\n \tapposTag.add(\"appos\");\n \trelclauseTag.add(\"acl:relcl\");\n \taclauseTag.add(\"acl\");\n \t compTag.add(\"mark\");\n \t pronTag.add(\"prp\");\n \thds.pronTag.add(\"prp\");\n \tcompLemma.add(\"that\");\n \tcoordLemma.add(\"and\");\n \tverbComplementTag.add(\"ccomp\");\n \tverbComplementTag.add(\"parataxis\");\n\n \tinfVerbTag.add(\"xcomp\"); //Reuters reported Merkel to have said\n \tinfVerbTag.add(\"advcl\");\n \tdirectQuoteIntro.add(\":\");\n \tindirectQuoteIntroChunkValue.add(\"SBAR\");\n \thds.objectEqui.add(\"report\");\n \thds.objectEqui.add(\"quote\");\n \thds.potentialIndirectQuoteTrigger.add(\"say\");\n// \thds.objectEqui.add(\"confirm\");\n// \thds.subjectEqui.add(\"promise\");\n// \thds.subjectEqui.add(\"quote\");\n// \thds.subjectEqui.add(\"confirm\");\n }\n\t\t \n\t\t boolean containsSubordinateConjunction = false;\n\t\t\n\t\t \n\t\tfor (CoreMap sentence : sentences) {\n//\t\t\tSystem.out.println(\"PREPROCESSING..\");\n\t\t\t\tSentenceAnnotation sentenceAnn = new SentenceAnnotation(aJCas);\n\t\t\t\t\n\t\t\t\tint beginSentence = sentence.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endSentence = sentence.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(sentence.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tsentenceAnn.setBegin(beginSentence);\n\t\t\t\tsentenceAnn.setEnd(endSentence);\n\t\t\t\tsentenceAnn.addToIndexes();\n\t\t\t\t\n\t\t\t\t//SP Map offsets to NER\n\t\t\t\tList<NamedEntity> ners = JCasUtil.selectCovered(aJCas, //SPnew tut\n\t\t\t\t\t\tNamedEntity.class, sentenceAnn);\n\t\t\t\tfor (NamedEntity ne : ners){\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.jcasType.toString());\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.getCoveredText().toString());\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.jcasType.casTypeCode);\n\t\t\t\t\t//Person is 71, Location is 213, Organization is 68 geht anders besser siehe unten\n\t\t\t\t\tint nerStart = ne\n\t\t\t\t\t\t\t.getBegin();\n\t\t\t\t\tint nerEnd = ne.getEnd();\n//\t\t\t\t\tSystem.out.println(\"NER: \" + ne.getCoveredText() + \" \" + nerStart + \"-\" + nerEnd ); \n\t\t\t\t\tString offsetNer = \"\" + nerStart + \"-\" + nerEnd;\n\t\t\t\t\thds.offsetToNer.put(offsetNer, ne.getCoveredText());\n//\t\t\t\t\tNer.add(offsetNer);\n\t\t\t\t\thds.Ner.add(offsetNer);\n//\t\t\t\t\tSystem.out.println(\"NER: TYPE \" +ne.getValue().toString());\n\t\t\t\t\tif (ne.getValue().equals(\"PERSON\")){\n\t\t\t\t\t\thds.NerPerson.add(offsetNer);\n\t\t\t\t\t}\n\t\t\t\t\telse if (ne.getValue().equals(\"ORGANIZATION\")){\n\t\t\t\t\t\thds.NerOrganization.add(offsetNer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//DBpediaLink info: map offsets to links\n\t\t\t\tList<DBpediaResource> dbpeds = JCasUtil.selectCovered(aJCas, //SPnew tut\n\t\t\t\t\t\tDBpediaResource.class, sentenceAnn);\n\t\t\t\tfor (DBpediaResource dbped : dbpeds){\n//\t\t\t\t\t\n//\t\t\t\t\tint dbStart = dbped\n//\t\t\t\t\t\t\t.getBegin();\n//\t\t\t\t\tint dbEnd = dbped.getEnd();\n\t\t\t\t\t// not found if dbpedia offsets are wrongly outside than sentences\n//\t\t\t\t\tSystem.out.println(\"DBPED SENT: \" + sentenceAnn.getBegin()+ \"-\" + sentenceAnn.getEnd() ); \n//\t\t\t\t\tString offsetDB = \"\" + dbStart + \"-\" + dbEnd;\n//\t\t\t\t\thds.labelToDBpediaLink.put(dbped.getLabel(), dbped.getUri());\n//\t\t\t\t\tSystem.out.println(\"NOW DBPED: \" + dbped.getLabel() + \"URI: \" + dbped.getUri() ); \n\t\t\t\t\thds.dbpediaSurfaceFormToDBpediaLink.put(dbped.getCoveredText(), dbped.getUri());\n//\t\t\t\t\tSystem.out.println(\"NOW DBPED: \" + dbped.getCoveredText() + \"URI: \" + dbped.getUri() ); \n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//SP Map offsets to lemma of opinion verb/noun; parser does not provide lemma\n\t\t\t\t for (CoreLabel token: sentence.get(TokensAnnotation.class)) {\n//\t\t\t\t\t System.out.println(\"LEMMA \" + token.lemma().toString());\n\t\t\t\t\t int beginTok = token.beginPosition();\n\t\t\t\t\t int endTok = token.endPosition();\n\t\t\t\t\t String offsets = \"\" + beginTok + \"-\" + endTok;\n\t\t\t\t\t hds.offsetToLemma.put(offsets, token.lemma().toString());\n\t\t\t\t\t \n\t\t\t\t\t \t if (opinion_verbs.contains(token.lemma().toString())){\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionVerb.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t hds.OpinionExpression.add(offsets);\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionExpression.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t \n//\t\t\t \t System.out.println(\"offsetToLemmaOfOpinionVerb \" + token.lemma().toString());\n\t\t\t\t\t \t }\n\t\t\t\t\t \t if (passive_opinion_verbs.contains(token.lemma().toString())){\n\t\t\t\t\t\t\t hds.offsetToLemmaOfPassiveOpinionVerb.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t hds.OpinionExpression.add(offsets);\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionExpression.put(offsets, token.lemma().toString());\n//\t\t\t \t System.out.println(\"offsetToLemmaOfPassiveOpinionVerb \" + token.lemma().toString());\n\t\t\t\t\t \t }\n\n\t\t\t\t } \n\n\t\t\t//SPnew parser\n\t\t\tTree tree = sentence.get(TreeAnnotation.class);\n\t\t\tTreebankLanguagePack tlp = new PennTreebankLanguagePack();\n\t\t\tGrammaticalStructureFactory gsf = tlp.grammaticalStructureFactory();\n\t\t\tGrammaticalStructure gs = gsf.newGrammaticalStructure(tree);\n\t\t\tCollection<TypedDependency> td = gs.typedDependenciesCollapsed();\n\n\t\t\t \n//\t\t\tSystem.out.println(\"TYPEDdep\" + td);\n\t\t\t\n\t\t\tObject[] list = td.toArray();\n//\t\t\tSystem.out.println(list.length);\n\t\t\tTypedDependency typedDependency;\nDEPENDENCYSEARCH: for (Object object : list) {\n\t\t\ttypedDependency = (TypedDependency) object;\n//\t\t\tSystem.out.println(\"DEP \" + typedDependency.dep().toString()+ \n//\t\t\t\t\t\" GOV \" + typedDependency.gov().toString()+ \n//\t\t\t\" :: \"+ \" RELN \"+typedDependency.reln().toString());\n\t\t\tString pos = null;\n String[] elements;\n String verbCand = null;\n int beginVerbCand = -5;\n\t\t\tint endVerbCand = -5;\n\t\t\tString offsetVerbCand = null;\n\n if (compTag.contains(typedDependency.reln().toString())) {\n \tcontainsSubordinateConjunction = true;\n// \tSystem.out.println(\"subordConj \" + typedDependency.dep().toString().toLowerCase());\n }\n \n else if (subjTag.contains(typedDependency.reln().toString())){\n \thds.predicateToSubjectChainHead.clear();\n \thds.subjectToPredicateChainHead.clear();\n \t\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n//\t\t\t\tSystem.out.println(\"VERBCand \" + verbCand + offsetVerbCand);\n//\t\t\t\tfor (HashMap.Entry<String, String> entry : hds.offsetToLemma.entrySet()) {\n//\t\t\t\t String key = entry.getKey();\n//\t\t\t\t Object value = entry.getValue();\n//\t\t\t\t System.out.println(\"OFFSET \" + key + \" LEMMA \" + value);\n//\t\t\t\t // FOR LOOP\n//\t\t\t\t}\n//\t\t\t\tif (hds.offsetToLemma.containsKey(offsetVerbCand)){\n//\t\t\t\t\tString verbCandLemma = hds.offsetToLemma.get(offsetVerbCand);\n//\t\t\t\t\tif (hds.objectEqui.contains(verbCandLemma) || hds.subjectEqui.contains(verbCandLemma)){\n//\t\t\t\t\t\tSystem.out.println(\"SUBJCHAIN BEGIN verbCand \" + verbCand);\n//\t\t\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t\tSystem.out.println(\"SUBJCHAINHEAD1\");\n\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\tSystem.out.println(\"verbCand \" + verbCand);\n\t\t\t\t//hack for subj after obj said Zwickel (obj) on Monday morning (subj)\n\t\t\t\tif (language.equals(\"en\") \n\t\t\t\t\t\t&& hds.predicateToObject.containsKey(offsetVerbCand)\n\t\t\t\t\t\t){\n// \t\tSystem.out.println(\"CONTINUE DEP\");\n \t\tcontinue DEPENDENCYSEARCH;\n \t}\n\t\t\t\telse {\n\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n\t\t\t\t}\n }\n //Merkel is concerned\n else if (passSubjTag.contains(typedDependency.reln().toString())){\n \t//Merkel was reported\n \t//Merkel was concerned\n \t//Merkel was quoted\n \thds.predicateToSubjectChainHead.clear();\n \thds.subjectToPredicateChainHead.clear();\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n//\t\t\t\tSystem.out.println(\"VERBCand \" + verbCand + offsetVerbCand);\n//\t\t\t\tif (hds.offsetToLemma.containsKey(offsetVerbCand)){\n//\t\t\t\t\tString verbCandLemma = hds.offsetToLemma.get(offsetVerbCand);\n////\t\t\t\t\tSystem.out.println(\"LEMMA verbCand \" + verbCandLemma);\n//\t\t\t\t\tif (hds.objectEqui.contains(verbCandLemma) || hds.subjectEqui.contains(verbCandLemma)){\n//\t\t\t\t\t\tSystem.out.println(\"SUBJCHAIN BEGIN verbCand \" + verbCand);\n//\t\t\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\t\t}\n//\t\t\t\t}\n \t\n \tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n// \tSystem.out.println(\"SUBJCHAINHEAD2\");\n \t//Merkel is concerned\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfPassiveOpinionVerb,\n \t\t\thds);\n }\n //Meanwhile, the ECB's vice-president, Christian Noyer, was reported at the start of the week to have said that the bank's future interest-rate moves\n// would depend on the behavior of wage negotiators as well as the pace of the economic recovery.\n\n else if (apposTag.contains(typedDependency.reln().toString())){\n \t\n \tString subjCand = typedDependency.gov().toString().toLowerCase();\n \tint beginSubjCand = typedDependency.gov().beginPosition();\n \tint endSubjCand = typedDependency.gov().endPosition();\n \tString offsetSubjCand = \"\" + beginSubjCand + \"-\" + endSubjCand;\n \tString appo = typedDependency.dep().toString().toLowerCase();\n\t\t\t\tint beginAppo = typedDependency.dep().beginPosition();\n\t\t\t\tint endAppo = typedDependency.dep().endPosition();\n\t\t\t\tString offsetAppo = \"\" + beginAppo + \"-\" + endAppo;\n\t\t\t\t\n// \tSystem.out.println(\"APPOSITION1 \" + subjCand + \"::\"+ appo + \":\" + offsetSubjCand + \" \" + offsetAppo);\n \thds.subjectToApposition.put(offsetSubjCand, offsetAppo);\n }\n else if (relclauseTag.contains(typedDependency.reln().toString())){\n \tString subjCand = typedDependency.gov().toString().toLowerCase();\n \tint beginSubjCand = typedDependency.gov().beginPosition();\n \tint endSubjCand = typedDependency.gov().endPosition();\n \tString offsetSubjCand = \"\" + beginSubjCand + \"-\" + endSubjCand;\n \tverbCand = typedDependency.dep().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.dep().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.dep().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n\t\t\t\tString subjCandPos = null;\n\t\t\t\tif (hds.predicateToSubject.containsKey(offsetVerbCand)){\n\t\t\t\t\t\n\t\t\t\t\tif (subjCand.matches(\".+?/.+?\")) { \n\t\t\t\t\t\telements = subjCand.split(\"/\");\n\t\t\t\t\t\tsubjCand = elements[0];\n\t\t\t\t\t\tsubjCandPos = elements[1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tString del = hds.predicateToSubject.get(offsetVerbCand);\n\t\t\t\t\thds.predicateToSubject.remove(offsetVerbCand);\n\t\t\t\t\thds.subjectToPredicate.remove(del);\n\t\t\t\t\thds.normalPredicateToSubject.remove(offsetVerbCand);\n\t\t\t\t\thds.subjectToNormalPredicate.remove(del);\n//\t\t\t\t\tSystem.out.println(\"REMOVE RELPRO \" + verbCand + \"/\" + hds.offsetToLemma.get(del));\n\t\t\t\t\thds.predicateToSubject.put(offsetVerbCand, offsetSubjCand);\n\t\t\t\t\thds.subjectToPredicate.put( offsetSubjCand, offsetVerbCand);\n\t\t\t\t\thds.normalPredicateToSubject.put(offsetVerbCand, offsetSubjCand);\n\t\t\t\t\thds.subjectToNormalPredicate.put( offsetSubjCand, offsetVerbCand);\n//\t\t\t\t\tSystem.out.println(\"RELCLAUSE \" + subjCand + \"::\" + \":\" + verbCand);\n\t\t\t\t\thds.offsetToSubjectHead.put(offsetSubjCand,subjCand);\n\t\t\t\t\thds.SubjectHead.add(offsetSubjCand);\n\t\t\t\t\t\n\t\t\t\t\tif (subjCandPos != null && hds.pronTag.contains(subjCandPos)){\n\t\t\t\t\t\thds.PronominalSubject.add(offsetSubjCand);\n\t\t\t\t\t}\n\t\t\t\t}\n \t\n \t\n }\n \n else if (dirObjTag.contains(typedDependency.reln().toString())\n \t\t){\n \tstoreRelations(typedDependency, hds.predicateToObject, hds.ObjectToPredicate, hds);\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n\t\t\t\t\n\t\t\t\tString objCand = typedDependency.dep().toString().toLowerCase();\n \tint beginObjCand = typedDependency.dep().beginPosition();\n \tint endObjCand = typedDependency.dep().endPosition();\n \tString offsetObjCand = \"\" + beginObjCand + \"-\" + endObjCand;\n \tString objCandPos;\n \tif (objCand.matches(\".+?/.+?\")) { \n\t\t\t\t\telements = objCand.split(\"/\");\n\t\t\t\t\tobjCand = elements[0];\n\t\t\t\t\tobjCandPos = elements[1];\n//\t\t\t\t\tSystem.out.println(\"PRON OBJ \" + objCandPos);\n\t\t\t\t\tif (pronTag.contains(objCandPos)){\n\t\t\t\t\thds.PronominalSubject.add(offsetObjCand);\n\t\t\t\t\t}\n\t\t\t\t\t}\n// \tSystem.out.println(\"DIROBJ STORE ONLY\");\n \t//told Obama\n \t//said IG metall boss Klaus Zwickel\n \t// problem: pointing DO\n \t//explains David Gems, pointing out the genetically manipulated species.\n \t if (language.equals(\"en\") \n \t\t\t\t\t\t&& !hds.normalPredicateToSubject.containsKey(offsetVerbCand)\n \t\t\t\t\t\t){\n// \t\t System.out.println(\"INVERSE SUBJ HACK ENGLISH PREDTOOBJ\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t }\n }\n //was reported to have said\n else if (infVerbTag.contains(typedDependency.reln().toString())){\n \tstoreRelations(typedDependency, hds.mainToInfinitiveVerb, hds.infinitiveToMainVerb, hds);\n// \tSystem.out.println(\"MAIN-INF\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t\n }\n else if (aclauseTag.contains(typedDependency.reln().toString())){\n \tstoreRelations(typedDependency, hds.nounToInfinitiveVerb, hds.infinitiveVerbToNoun, hds);\n// \tSystem.out.println(\"NOUN-INF\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t\n }\n \n \n\n\t\t\t}\n\t\t\t\n//\t\t\tSemanticGraph dependencies = sentence.get(CollapsedCCProcessedDependenciesAnnotation.class);\n//\t\t\tSystem.out.println(\"SEM-DEP \" + dependencies);\t\n\t\t}\n\t\t\n\n\t\tMap<Integer, edu.stanford.nlp.dcoref.CorefChain> corefChains = document.get(CorefChainAnnotation.class);\n\t\t \n\t\t if (corefChains == null) { return; }\n\t\t //SPCOPY\n\t\t for (Entry<Integer, edu.stanford.nlp.dcoref.CorefChain> entry: corefChains.entrySet()) {\n//\t\t System.out.println(\"Chain \" + entry.getKey() + \" \");\n\t\t \tint chain = entry.getKey();\n\t\t String repMenNer = null;\n\t\t String repMen = null;\n\t\t String offsetRepMenNer = null;\n\n\t\t List<IaiCorefAnnotation> listCorefAnnotation = new ArrayList<IaiCorefAnnotation>();\n\t\t \n\t\t for (CorefMention m : entry.getValue().getMentionsInTextualOrder()) {\n\t\t \tboolean corefMentionContainsNer = false;\n\t\t \tboolean repMenContainsNer = false;\n\n//\t\t \n\n\t\t\t\t// We need to subtract one since the indices count from 1 but the Lists start from 0\n\t\t \tList<CoreLabel> tokens = sentences.get(m.sentNum - 1).get(TokensAnnotation.class);\n\t\t // We subtract two for end: one for 0-based indexing, and one because we want last token of mention not one following.\n//\t\t System.out.println(\" \" + m + \", i.e., 0-based character offsets [\" + tokens.get(m.startIndex - 1).beginPosition() +\n//\t\t \", \" + tokens.get(m.endIndex - 2).endPosition() + \")\");\n\t\t \n\t\t int beginCoref = tokens.get(m.startIndex - 1).beginPosition();\n\t\t\t\t int endCoref = tokens.get(m.endIndex - 2).endPosition();\n\t\t\t\t String offsetCorefMention = \"\" + beginCoref + \"-\" + endCoref;\n\t\t\t\t String corefMention = m.mentionSpan;\n\n\t\t\t\t CorefMention RepresentativeMention = entry.getValue().getRepresentativeMention();\n\t\t\t\t repMen = RepresentativeMention.mentionSpan;\n\t\t\t\t List<CoreLabel> repMenTokens = sentences.get(RepresentativeMention.sentNum - 1).get(TokensAnnotation.class);\n//\t\t\t\t System.out.println(\"REPMEN ANNO \" + \"\\\"\" + repMen + \"\\\"\" + \" is representative mention\" +\n// \", i.e., 0-based character offsets [\" + repMenTokens.get(RepresentativeMention.startIndex - 1).beginPosition() +\n//\t\t \", \" + repMenTokens.get(RepresentativeMention.endIndex - 2).endPosition() + \")\");\n\t\t\t\t int beginRepMen = repMenTokens.get(RepresentativeMention.startIndex - 1).beginPosition();\n\t\t\t\t int endRepMen = repMenTokens.get(RepresentativeMention.endIndex - 2).endPosition();\n\t\t\t\t String offsetRepMen = \"\" + beginRepMen + \"-\" + endRepMen;\n\t\t \t \n\t\t\t\t//Determine repMenNer that consists of largest NER (Merkel) to (Angela Merkel)\n\t\t\t\t //and \"Chancellor \"Angela Merkel\" to \"Angela Merkel\"\n\t\t \t //Further reduction to NER as in \"Chancellor Angela Merkel\" to \"Angela Merkel\" is\n\t\t\t\t //done in determineBestSubject. There, Chunk information and subjectHead info is available.\n\t\t\t\t //Chunk info and subjectHead info is used to distinguish \"Chancellor Angela Merkel\" to \"Angela Merkel\"\n\t\t\t\t //from \"The enemies of Angela Merkel\" which is not reduced to \"Angela Merkel\"\n\t\t\t\t //Problem solved: The corefMentions of a particular chain do not necessarily have the same RepMenNer (RepMen) \n\t\t\t\t // any more: Chancellor Angela Merkel repMenNer Chancellor Angela Merkel , then Angela Merkel has RepMenNer Angela Merkel\n\t\t\t\t if (offsetRepMenNer != null && hds.Ner.contains(offsetRepMenNer)){\n//\t\t\t\t\t System.out.println(\"NEWNer.contains(offsetRepMenNer)\");\n\t\t\t\t }\n\t\t\t\t else if (offsetRepMen != null && hds.Ner.contains(offsetRepMen)){\n\t\t\t\t\t repMenNer = repMen;\n\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\tSystem.out.println(\"NEWNer.contains(offsetRepMen)\");\n\t\t\t\t }\n\t\t\t\t else if (offsetCorefMention != null && hds.Ner.contains(offsetCorefMention)){\n\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\tSystem.out.println(\"Ner.contains(offsetCorefMention)\");\n\t\t\t\t\t}\n\t\t\t\t else {\n\t\t\t\t\t corefMentionContainsNer = offsetsContainAnnotation(offsetCorefMention,hds.Ner);\n\t\t\t\t\t repMenContainsNer = offsetsContainAnnotation(offsetRepMen,hds.Ner);\n//\t\t\t\t\t System.out.println(\"ELSE Ner.contains(offsetCorefMention)\");\n\t\t\t\t }\n\t\t\t\t //Determine repMenNer that contains NER\n\t\t\t\t\tif (repMenNer == null){\n\t\t\t\t\t\tif (corefMentionContainsNer){\n\t\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT1\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (repMenContainsNer){\n\t\t\t\t\t\t\trepMenNer = repMen;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT2\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//no NER:\n\t\t\t\t\t\t//Pronoun -> repMen is repMenNer\n\t\t\t\t\t\telse if (hds.PronominalSubject.contains(offsetCorefMention) && repMen != null){\n\t\t\t\t\t\t\trepMenNer = repMen;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT3\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t//other no NER: corefMention is repMenNer because it is closer to original\n\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\tSystem.out.println(\"DEFAULT4\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t \n \t IaiCorefAnnotation corefAnnotation = new IaiCorefAnnotation(aJCas);\n\t\t\t\n\t\t\t\t\t\n\n\n\t\t\t\t\tcorefAnnotation.setBegin(beginCoref);\n\t\t\t\t\tcorefAnnotation.setEnd(endCoref);\n\t\t\t\t\tcorefAnnotation.setCorefMention(corefMention);\n\t\t\t\t\tcorefAnnotation.setCorefChain(chain);\n\t\t\t\t\t//done below\n//\t\t\t\t\tcorefAnnotation.setRepresentativeMention(repMenNer);\n//\t\t\t\t\tcorefAnnotation.addToIndexes(); \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tlistCorefAnnotation.add(corefAnnotation);\n\t\t\t\t\t\n//\t\t\t\t\tdone below:\n//\t\t\t\t\t offsetToRepMen.put(offsetCorefMention, repMenNer);\n//\t\t\t\t\t RepMen.add(offsetCorefMention);\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t }//end coref mention\n//\t\t System.out.println(\"END Chain \" + chain );\n//\t\t System.out.println(listCorefAnnotation.size());\n\t\t String offsetCorefMention = null;\n\t\t for (int i = 0; i < listCorefAnnotation.size(); i++) {\n\t\t \tIaiCorefAnnotation corefAnnotation = listCorefAnnotation.get(i);\n\t\t \tcorefAnnotation.setRepresentativeMention(repMenNer);\n\t\t \tcorefAnnotation.addToIndexes();\n\t\t \toffsetCorefMention = \"\" + corefAnnotation.getBegin() + \"-\" + corefAnnotation.getEnd();\n\t\t\t\t\thds.offsetToRepMen.put(offsetCorefMention, repMenNer);\n\t\t\t\t\thds.RepMen.add(offsetCorefMention);\n\t\t\t\t\t//COREF\n//\t\t\t\t\tSystem.out.println(\"Chain \" + corefAnnotation.getCorefChain());\n//\t\t\t\t\tSystem.out.println(\"corefMention \" + corefAnnotation.getCorefMention() + offsetCorefMention);\n//\t\t\t\t\tSystem.out.println(\"repMenNer \" + repMenNer);\n\t\t }\n\t\t } //end chains\n\n\n//\t\t System.out.println(\"NOW quote finder\");\n\n\n\t\t\n\t\t///* quote finder: begin find quote relation and quotee\n\t\t// direct quotes\n\t\t\n\t\t\n\t\tString quotee_left = null;\n\t\tString quotee_right = null; \n\t\t\n\t\tString representative_quotee_left = null;\n\t\tString representative_quotee_right = null; \n\t\t\n\t\tString quote_relation_left = null;\n\t\tString quote_relation_right = null;\n\t\t\n\t\tString quoteType = null;\n\t\tint quoteeReliability = 5;\n\t\tint quoteeReliability_left = 5;\n\t\tint quoteeReliability_right = 5;\n\t\tint quotee_end = -5;\n\t\tint quotee_begin = -5;\n\t\t\n\t\tboolean quoteeBeforeQuote = false;\n\n\n\t\n\t\t\n\t\t// these are all the quotes in this document\n\t\tList<CoreMap> quotes = document.get(QuotationsAnnotation.class);\n\t\tfor (CoreMap quote : quotes) {\n\t\t\tif (quote.get(TokensAnnotation.class).size() > 5) {\n\t\t\t\tQuoteAnnotation annotation = new QuoteAnnotation(aJCas);\n\n\t\t\t\tint beginQuote = quote.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endQuote = quote.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(quote.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tannotation.setBegin(beginQuote);\n\t\t\t\tannotation.setEnd(endQuote);\n\t\t\t\tannotation.addToIndexes();\n//\t\t\t}\n//\t\t}\n//\t\t\n//\t\tList<Q> newQuotes = document.get(QuotationsAnnotation.class);\t\t\n//\t\tfor (CoreMap annotation : newQuotes) {\n//\t\t\t\tif (1==1){\n//\t\t\t\tRe-initialize markup variables since they are also used for indirect quotes\n\t\t\t\tquotee_left = null;\n\t\t\t\tquotee_right = null; \n\t\t\t\t\n\t\t\t\trepresentative_quotee_left = null;\n\t\t\t\trepresentative_quotee_right = null;\n\t\t\t\t\n\t\t\t\tquote_relation_left = null;\n\t\t\t\tquote_relation_right = null;\n\t\t\t\tquoteeReliability = 5;\n\t\t\t\tquoteeReliability_left = 5;\n\t\t\t\tquoteeReliability_right = 5;\n\t\t\t\tquotee_end = -5;\n\t\t\t\tquotee_begin = -5;\n\t\t\t\tquoteType = \"direct\";\n\t\t\t\tquoteeBeforeQuote = false;\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> directQuoteTokens = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\tToken.class, annotation);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> followTokens = JCasUtil.selectFollowing(aJCas,\n\t\t\t\t\t\tToken.class, annotation, 1);\n\t\t\t\t\n \n//\t\t\t\tfor (Token aFollowToken: followTokens){\n//\t\t\t\t\t List<Chunk> chunks = JCasUtil.selectCovering(aJCas,\n//\t\t\t\t\tChunk.class, aFollowToken);\n \n//direct quote quotee right:\n\t\t\t\t\n\t for (Token aFollow2Token: followTokens){\n\t\t\t\t\t List<SentenceAnnotation> sentencesFollowQuote = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t SentenceAnnotation.class, aFollow2Token);\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t for (SentenceAnnotation sentenceFollowsQuote: sentencesFollowQuote){\n\t\t\t\t\t\t List<Chunk> chunks = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\tChunk.class, sentenceFollowsQuote);\n//\t\t\tSystem.out.println(\"DIRECT QUOTE RIGHT\");\n\t\t\tString[] quote_annotation_result = determine_quotee_and_quote_relation(\"RIGHT\", \n\t\t\t\t\tchunks, hds, annotation);\n\t\t\tif (quote_annotation_result.length>=4){\n\t\t\t quotee_right = quote_annotation_result[0];\n\t\t\t representative_quotee_right = quote_annotation_result[1];\n\t\t\t quote_relation_right = quote_annotation_result[2];\n\t\t\t try {\n\t\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t quoteeReliability_right = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t //Will Throw exception!\n\t\t\t //do something! anything to handle the exception.\n\t\t\t\tquoteeReliability = -5;\n\t\t\t\tquoteeReliability_right = -5;\n\t\t\t\t}\t\t\t\t\t \n\t\t\t }\n//\t\t\tSystem.out.println(\"DIRECT QUOTE RIGHT RESULT quotee \" + quotee_right + \" representative_quotee \" + representative_quotee_right\n//\t\t\t\t\t+ \" quote_relation \" + quote_relation_right);\n\t\t \n\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t \n }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> precedingTokens = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t\t\tToken.class, annotation, 1);\n for (Token aPrecedingToken: precedingTokens){ \n \t\n \tif (directQuoteIntro.contains(aPrecedingToken.getLemma().getValue().toString()) \n \t\t\t|| compLemma.contains(aPrecedingToken.getLemma().getValue().toString())) {\n// \t\tSystem.out.println(\"Hello, World lemma found\" + aPrecedingToken.getLemma().getValue());\n \t\tquoteeBeforeQuote = true;\n \t}\n \t\tList <NamedEntity> namedEntities = null;\n \t\tList <Token> tokens = null;\n \t\tList<Chunk> chunks = null;\n \t\t\n\t\t\t\t List<Sentence> precedingSentences = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t \t\tSentence.class, aPrecedingToken, 1);\n\t\t\t\t \n\t\t\t\t\t\tif (precedingSentences.isEmpty()){\n\t\t\t\t\t\t\tList<Sentence> firstSentence;\n\t\t\t\t \tfirstSentence = JCasUtil.selectCovering(aJCas,\n\t\t\t\t \t\tSentence.class, aPrecedingToken);\n\n\t\t\t\t \tfor (Sentence aSentence: firstSentence){\n\t\t\t\t \t\t\n\n\t\t\t\t\t\t\t\tchunks = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\t\tChunk.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t \t\tnamedEntities = JCasUtil.selectCovered(aJCas,\n\t \t \t\tNamedEntity.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\t\t\t\t \t\ttokens = JCasUtil.selectCovered(aJCas,\n\t\t\t\t \t\t\t\tToken.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\t\t\t\t \t\n\t\t\t\t \t}\n\t\t\t\t\t\t}\n\t\t\t\t else {\t\n\t\t\t\t \tfor (Sentence aSentence: precedingSentences){\n//\t\t\t\t \t\tSystem.out.println(\"Hello, World sentence\" + aSentence);\n\t\t\t\t \t\tchunks = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tChunk.class, aSentence, aPrecedingToken);\n\t\t\t\t \t\tnamedEntities = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tNamedEntity.class, aSentence, aPrecedingToken);\n\t\t\t\t \t\ttokens = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tToken.class, aSentence, aPrecedingToken);\n\t\t\t\t \t}\n\t\t\t\t }\n \t\n//\t\t\t\t \n//\t\t\t\t\t\tSystem.out.println(\"DIRECT QUOTE LEFT\");\n\t\t\t\t\t\tString[] quote_annotation_direct_left = determine_quotee_and_quote_relation(\"LEFT\", chunks,\n\t\t\t\t\t\t\t\t hds, annotation\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t );\n//\t\t\t\t\t\tSystem.out.println(\"QUOTE ANNOTATION \" + quote_annotation_direct_left.length);\t\t\n\t\tif (quote_annotation_direct_left.length>=4){\n//\t\t\tSystem.out.println(\"QUOTE ANNOTATION UPDATE \" + quote_annotation_direct_left[0] +\n//\t\t\t\t\t\" \" + quote_annotation_direct_left[1] + \" \" +\n//\t\t\t\t\tquote_annotation_direct_left[2]);\n\t\t quotee_left = quote_annotation_direct_left[0];\n\t\t representative_quotee_left = quote_annotation_direct_left[1];\n\t\t quote_relation_left = quote_annotation_direct_left[2];\n\t\t try {\n\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_direct_left[3]);\n\t\t\t quoteeReliability_left = Integer.parseInt(quote_annotation_direct_left[3]);\n\t\t\t} catch (NumberFormatException e) {\n\t\t //Will Throw exception!\n\t\t //do something! anything to handle the exception.\n\t\t\tquoteeReliability = -5;\n\t\t\tquoteeReliability_left = -5;\n\t\t\t}\t\t\t\t\t \n\t\t }\n//\t\tSystem.out.println(\"DIRECT QUOTE LEFT RESULT quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left\n//\t\t\t\t+ \" quote_relation \" + quote_relation_left);\n\t\t//no subject - predicate quotee quote_relation, quote introduced with colon: \n\t\tif (quotee_left == null && quote_relation_left == null && representative_quotee_left == null \n\t\t&& directQuoteIntro.contains(aPrecedingToken.getLemma().getValue().toString())){\n//\t\t\tSystem.out.println(\"NER DIRECT QUOTE LEFT COLON\");\n\t\t\tString quoteeCandOffset = null; \n\t\t\tString quoteeCandText = null;\n\t\t if (namedEntities.size() == 1){\n \t \tfor (NamedEntity ne : namedEntities){\n// \t \t\tSystem.out.println(\"ONE NER \" + ne.getCoveredText());\n \t \t\tquoteeCandText = ne.getCoveredText();\n\t\t\t\t\tquote_relation_left = aPrecedingToken.getLemma().getValue().toString();\n\t\t\t\t\tquotee_end = ne.getEnd();\n\t\t\t\t\tquotee_begin = ne.getBegin();\n\t\t\t\t\tquoteeCandOffset = \"\" + quotee_begin + \"-\" + quotee_end;\n\t\t\t\t\tquoteeReliability = 1;\n\t\t\t\t\tquoteeReliability_left = 1;\n \t }\n \t }\n \t else if (namedEntities.size() > 1) {\n \t \tint count = 0;\n \t \tString quotee_cand = null;\n// \t \tSystem.out.println(\"Hello, World ELSE SEVERAL NER\");\n \t \tfor (NamedEntity ner : namedEntities){\n// \t \t\tSystem.out.println(\"Hello, World NER TYPE\" + ner.getValue());\n \t \t\tif (ner.getValue().equals(\"PERSON\")){\n \t \t\t\tcount = count + 1;\n \t \t\t\tquotee_cand = ner.getCoveredText();\n \t \t\t\tquotee_end = ner.getEnd();\n \t \t\t\tquotee_begin = ner.getBegin();\n \t \t\t\tquoteeCandOffset = \"\" + quotee_begin + \"-\" + quotee_end;\n \t \t\t\t\n// \t \t\t\tSystem.out.println(\"Hello, World FOUND PERSON\" + quotee_cand);\n \t \t\t}\n \t \t}\n \t \tif (count == 1){ // there is exactly one NER.PERSON\n// \t \t\tSystem.out.println(\"ONE PERSON, SEVERAL NER \" + quotee_cand);\n \t \t\t\tquoteeCandText = quotee_cand;\n\t\t\t\t\t\tquote_relation_left = aPrecedingToken.getLemma().getValue().toString();\n\t\t\t\t\t\tquoteeReliability = 3;\n\t\t\t\t\t\tquoteeReliability_left = 3;\n \t \t}\n \t }\n\t\t if(quoteeCandOffset != null && quoteeCandText != null ){\n//\t\t \t quotee_left = quoteeCandText;\n\t\t \t String result [] = determineBestRepMenSubject(\n\t\t \t\t\t quoteeCandOffset,quoteeCandOffset, quoteeCandText, hds);\n\t\t \t if (result.length>=2){\n\t\t \t\t quotee_left = result [0];\n\t\t \t\t representative_quotee_left = result [1];\n//\t\t \t System.out.println(\"RESULT2 NER quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left);\n\t\t \t }\n\t\t }\n\t\t}\n }\n\t\t\n \n\n\t\t\t\t\n\t\t\t\tif (quotee_left != null && quotee_right != null){\n//\t\t\t\t\tSystem.out.println(\"TWO QUOTEES\");\n\t\t\t\t\t\n\t\t\t\t\tif (directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\".\") \n\t\t\t\t\t\t|| \tdirectQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"!\")\n\t\t\t\t\t\t|| directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"?\")\n\t\t\t\t\t\t\t){\n//\t\t\t\t\t\tSystem.out.println(\"PUNCT \" + quotee_left + quote_relation_left + quoteeReliability_left);\n\t\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\n\t\t\t\t\t}\n\t\t\t\t\telse if (directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\",\")){\n//\t\t\t\t\t\tSystem.out.println(\"COMMA \" + quotee_right + \" \" + quote_relation_right + \" \" + quoteeReliability_right);\n\t\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t\t}\n\t\t\t\t\telse if (!directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\".\")\n\t\t\t\t\t\t\t&& !directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"!\")\n\t\t\t\t\t\t\t&& !directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"?\")\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t){\n//\t\t\t\t\t\tSystem.out.println(\"NO PUNCT \" + quotee_right + \" \" + quote_relation_right + \" \" + quoteeReliability_right);\n\t\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n//\t\t\t\t\t\tSystem.out.println(\"UNCLEAR LEFT RIGHT \" + quotee_left + quote_relation_left + quote + quotee_right + quote_relation_right);\n\t\t\t\t\tannotation.setQuotee(\"<unclear>\");\n\t\t\t\t\tannotation.setQuoteRelation(\"<unclear>\");\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (quoteeBeforeQuote == true){\n\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t}\n\t\t\t\telse if (quotee_left != null){\n//\t\t\t\t\tSystem.out.println(\"QUOTEE LEFT\" + quotee_left + quote_relation_left + quoteeReliability_left);\n\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t}\n\t\t\t\telse if (quotee_right != null){\n//\t\t\t\t\tSystem.out.println(\"QUOTEE RIGHT FOUND\" + quotee_right + \" QUOTE RELATION \" + quote_relation_right + \":\" + quoteeReliability_right);\n\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t}\n\t\t\t\telse if (quote_relation_left != null ){\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n//\t\t\t\t\tSystem.out.println(\"NO QUOTEE FOUND\" + quote + quote_relation_left + quote_relation_right);\n\t\t\t\t}\n\t\t\t\telse if (quote_relation_right != null){\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t}\n\t\t\t\telse if (quoteType != null){\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n//\t\t\t\t\tSystem.out.println(\"Hello, World NO QUOTEE and NO QUOTE RELATION FOUND\" + quote);\n\t\t\t\t}\n\t\t\t\tif (annotation.getRepresentativeQuoteeMention() != null){\n//\t\t\t\t\tSystem.out.println(\"NOW!!\" + annotation.getRepresentativeQuoteeMention());\n\t\t\t\t\tif (hds.dbpediaSurfaceFormToDBpediaLink.containsKey(annotation.getRepresentativeQuoteeMention())){\n\t\t\t\t\t\tannotation.setQuoteeDBpediaUri(hds.dbpediaSurfaceFormToDBpediaLink.get(annotation.getRepresentativeQuoteeMention()));\n//\t\t\t\t\t\tSystem.out.println(\"DBPRED FOUND\" + annotation.getRepresentativeQuoteeMention() + \" URI: \" + annotation.getQuoteeDBpediaUri());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} //for direct quote\n\t\t\n\t\t// annotate indirect quotes: opinion verb + 'that' ... until end of sentence: said that ...\n\n//\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class); //already instantiated above\nINDIRECTQUOTE:\t\tfor (CoreMap sentence : sentences) {\n//\t\t\tif (sentence.get(TokensAnnotation.class).size() > 5) { \n\t\t\t\tSentenceAnnotation sentenceAnn = new SentenceAnnotation(aJCas);\n\t\t\t\t\n\t\t\t\tint beginSentence = sentence.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endSentence = sentence.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(sentence.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tsentenceAnn.setBegin(beginSentence);\n\t\t\t\tsentenceAnn.setEnd(endSentence);\n//\t\t\t\tsentenceAnn.addToIndexes();\n\t\t\t\t\n\t\t\t\tQuoteAnnotation indirectQuote = new QuoteAnnotation(aJCas);\n\t \tint indirectQuoteBegin = -5;\n\t\t\t\tint indirectQuoteEnd = -5;\n\t\t\t\tboolean subsequentDirectQuoteInstance = false;\n\t\t\t\t\n\t\t\t\tList<Chunk> chunksIQ = JCasUtil.selectCovered(aJCas,\n\t\t\t\tChunk.class, sentenceAnn);\n\t\t\t\tList<Chunk> chunksBeforeIndirectQuote = null;\n\t\t\t\t\n\t\t\t\tint index = 0;\nINDIRECTCHUNK:\tfor (Chunk aChunk : chunksIQ) {\n\t\t\t\t\tindex++;\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"INDIRECT QUOTE CHUNK VALUE \" + aChunk.getChunkValue().toString());\n//\t\t\t\t\tif (aChunk.getChunkValue().equals(\"SBAR\")) {\n\t\t\t\t\tif(indirectQuoteIntroChunkValue.contains(aChunk.getChunkValue())){\n//\t\t\t\t\t\tSystem.out.println(\"INDIRECT QUOTE INDEX \" + \"\" + index);\n\t\t\t\t\t\t\n\t\t\t\t\t\tList<Token> tokensSbar = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\tToken.class, aChunk);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (Token aTokenSbar : tokensSbar){\n//\t\t\t\t\t\t\tString that = \"that\";\n\t\t\t\t\t\t\tif (compLemma.contains(aTokenSbar.getLemma().getCoveredText())){\n\t\t\t\t\t\t// VP test: does that clause contain VP?\n//\t\t\t\t\t\t\t\tSystem.out.println(\"TOK1\" + aTokenSbar.getLemma().getCoveredText());\n//\t\t\t \tQuoteAnnotation indirectQuote = new QuoteAnnotation(aJCas);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t indirectQuoteBegin = aChunk.getEnd() + 1;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t chunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//NEW\n//\t\t\t\t\t\t\t\tif (LANGUAGE == \"en\")\n\t\t\t\t\t\t\t\tList<Token> precedingSbarTokens = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t\t\t\t\t\t\tToken.class, aChunk, 1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor (Token aPrecedingSbarToken: precedingSbarTokens){ \n//\t\t\t\t\t\t\t\t\tSystem.out.println(\"TOK2\" + aPrecedingSbarToken.getLemma().getCoveredText());\n\t\t\t\t \tif (coordLemma.contains(aPrecedingSbarToken.getLemma().getValue().toString())){\n//\t\t\t\t \t\tSystem.out.println(\"TOKK\" + aPrecedingSbarToken.getLemma().getCoveredText());\n\t\t\t\t \t\tchunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t \t\tint k = 0;\n\t\t\t\t \tSAY:\tfor (Chunk chunkBeforeAndThat : chunksBeforeIndirectQuote){\n//\t\t\t\t \t\t\txxxx\n\t\t\t\t \t\tk++;\n\t\t\t\t \t\t\tif (chunkBeforeAndThat.getChunkValue().equals(\"VP\")){\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t\tList<Token> tokensInVp = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToken.class, chunkBeforeAndThat);\n\t\t\t\t\t\t\t\t\t\t\t\tfor (Token aTokenInVp : tokensInVp){\n//\t\t\t\t\t\t\t\t\t\t\t\t\tString and;\n//\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"TOKK\" + aTokenInVp.getLemma().getCoveredText());\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (aTokenInVp.getLemma().getValue().equals(\"say\")){\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SAY OLD\" + indirectQuoteBegin + \":\" + sentenceAnn.getCoveredText());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchunksBeforeIndirectQuote = chunksIQ.subList(0, k);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindirectQuoteBegin = chunksBeforeIndirectQuote.get(chunksBeforeIndirectQuote.size()-1).getEnd()+1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SAY NEW\" + indirectQuoteBegin + \":\" );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak SAY;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t}\n\t\t\t\t \t\t\n\t\t\t\t \t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\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\tList<QuoteAnnotation> coveringDirectQuoteChunk = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t\t\t\tQuoteAnnotation.class, aChunk);\n\t\t\t\t\t\t\t\tif (coveringDirectQuoteChunk.isEmpty()){\n//\t\t\t\t\t\t\t\t indirectQuoteBegin = aChunk.getEnd() + 1;\n\t\t\t\t\t\t\t\t indirectQuote.setBegin(indirectQuoteBegin);\n//\t\t\t\t\t\t\t\t chunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t\t\t\t\t indirectQuoteEnd = sentenceAnn.getEnd();\n\t\t\t\t\t\t\t\t indirectQuote.setEnd(indirectQuoteEnd);\n\t\t\t\t\t\t\t\t indirectQuote.addToIndexes();\n\t\t\t\t\t\t\t\t subsequentDirectQuoteInstance = false;\n//\t\t\t\t\t\t\t\t System.out.println(\"SUBSEQUENT FALSE\");\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t List<Token> followTokens = JCasUtil.selectFollowing(aJCas,\n\t\t\t\t\t\t\t\t\t\t\tToken.class, indirectQuote, 1);\n\t\t\t\t\t\t\t\t for (Token aFollow3Token: followTokens){\n\t\t\t\t\t\t\t\t\t List<QuoteAnnotation> subsequentDirectQuotes = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t\t\t\t\tQuoteAnnotation.class,aFollow3Token);\n\t\t\t\t\t\t\t\t\t if (!subsequentDirectQuotes.isEmpty()){\n\t\t\t\t\t\t\t\t\t\t for (QuoteAnnotation subsequentDirectQuote: subsequentDirectQuotes){\n\t\t\t\t\t\t\t\t\t\t\t if (subsequentDirectQuote.getRepresentativeQuoteeMention() != null\n\t\t\t\t\t\t\t\t\t\t\t\t && subsequentDirectQuote.getRepresentativeQuoteeMention().equals(\"<unclear>\")){\n//\t\t\t\t\t\t\t\t\t\t\t System.out.println(\"SUBSEQUENT FOUND\"); \n\t\t\t\t\t\t\t\t\t\t\t hds.subsequentDirectQuote = subsequentDirectQuote;\n\t\t\t\t\t\t\t\t\t\t\t subsequentDirectQuoteInstance = true;\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t break INDIRECTCHUNK;\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}\t\t\n\t\t\t\t}\n\t\t\t\t\tif (indirectQuoteBegin >= 0 && indirectQuoteEnd >= 0){\n//\t\t\t\t\t\tList<QuoteAnnotation> coveringDirectQuote = JCasUtil.selectCovering(aJCas,\n//\t\t\t\t\t\t\t\tQuoteAnnotation.class, indirectQuote);\n//\t\t\t\t\t\tif (coveringDirectQuote.isEmpty()){\n////\t\t\t\t\t\t\t\n//\t\t\t\t\t\tindirectQuote.addToIndexes();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse {\n//\t\t\t\t\t\t\t//indirect quote is covered by direct quote and therefore discarded\n//\t\t\t\t\t\t\tcontinue INDIRECTQUOTE;\n//\t\t\t\t\t\t}\n\t\t\t\t\tList<QuoteAnnotation> coveredDirectQuotes = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\tQuoteAnnotation.class, indirectQuote);\n\t\t\t\t\tfor (QuoteAnnotation coveredDirectQuote : coveredDirectQuotes){\n//\t\t\t\t\t\tSystem.out.println(\"Hello, World covered direct quote\" + coveredDirectQuote.getCoveredText());\n\t\t\t\t\t\t//delete coveredDirectQuoteIndex\n\t\t\t\t\t\tcoveredDirectQuote.removeFromIndexes();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//no indirect quote in sentence\n\t\t\t\t\t\tcontinue INDIRECTQUOTE;\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n//\t\t\t\t\t\tRe-initialize markup variables since they are also used for direct quotes\n\t\t\t\t\t\tquotee_left = null;\n\t\t\t\t\t\tquotee_right = null; \n\t\t\t\t\t\t\n\t\t\t\t\t\trepresentative_quotee_left = null;\n\t\t\t\t\t\trepresentative_quotee_right = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tquote_relation_left = null;\n\t\t\t\t\t\tquote_relation_right = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tquoteType = \"indirect\";\n\t\t\t\t\t\tquoteeReliability = 5;\n\t\t\t\t\t\tquoteeReliability_left = 5;\n\t\t\t\t\t\tquoteeReliability_right = 5;\n\t\t\t\t\t\tquotee_end = -5;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\tif (chunksBeforeIndirectQuote != null){\n//\t\t\t\t\t\t\tSystem.out.println(\"chunksBeforeIndirectQuote FOUND!! \");\n\t\t\t\t\t\t\tString[] quote_annotation_result = determine_quotee_and_quote_relation(\"LEFT\", chunksBeforeIndirectQuote,\n\t\t\t\t\t\t\t\t\t hds, indirectQuote\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t );\n\t\t\tif (quote_annotation_result.length>=4){\n\t\t\t quotee_left = quote_annotation_result[0];\n\t\t\t representative_quotee_left = quote_annotation_result[1];\n\t\t\t quote_relation_left = quote_annotation_result[2];\n//\t\t\t System.out.println(\"INDIRECT QUOTE LEFT RESULT quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left\n//\t\t\t\t\t + \" QUOTE RELATION \" + quote_relation_left);\n\t\t\t try {\n\t\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t quoteeReliability_left = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tquoteeReliability = -5;\n\t\t\t\tquoteeReliability_left = -5;\n\t\t\t\t}\t\t\t\t\t \n\t\t\t }\n\t\t\t\n\t\t\t}\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (quotee_left != null){\n\t\t\t\t\t\t\tindirectQuote.setQuotee(quotee_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n\t\t\t\t\t\t\tindirectQuote.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\t\t\tindirectQuote.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//indirect quote followed by direct quote:\n\t\t\t\t\t\t\t//the quotee and quote relation of the indirect quote are copied to the direct quote \n\t\t\t\t\t\t\t//Genetic researcher Otmar Wiestler hopes that the government's strict controls on genetic research \n\t\t\t\t\t\t\t//will be relaxed with the advent of the new ethics commission. \n\t\t\t\t\t\t\t//\"For one thing the government urgently needs advice, because of course it's such an extremely \n\t\t\t\t\t\t\t//complex field. And one of the reasons Chancellor Schröder formed this new commission was without \n\t\t\t\t\t\t\t//a doubt to create his own group of advisors.\"\n\n\t\t\t\t\t\t\tif (subsequentDirectQuoteInstance == true\n\t\t\t\t\t\t\t\t&&\thds.subsequentDirectQuote.getRepresentativeQuoteeMention().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t&& \thds.subsequentDirectQuote.getQuotee().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t&& \thds.subsequentDirectQuote.getQuoteRelation().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t\t){\n//\t\t\t\t\t\t\t\tSystem.out.println(\"SUBSEQUENT UNCLEAR DIR QUOTE FOUND!!\"); \n\t\t\t\t\t\t\t\tint begin = hds.subsequentDirectQuote.getBegin();\n\t\t\t\t\t\t\t\tint end = hds.subsequentDirectQuote.getEnd();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuotee(quotee_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteType(\"direct\");\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteeReliability(quoteeReliability_left + 2);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.addToIndexes();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\tSystem.out.println(\"Hello, World INDIRECT QUOTE \" + quotee_left + quote_relation_left + quoteeReliability);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (quote_relation_left != null){\n\t\t\t\t\t\t\tindirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\telse if (quoteType != null){\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n//\t\t\t\t\t\t\tSystem.out.println(\"Hello, World INDIRECT QUOTE NOT FOUND\" + quote_relation_left);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (indirectQuote.getRepresentativeQuoteeMention() != null){\n//\t\t\t\t\t\t\tSystem.out.println(\"NOW!!\" + indirectQuote.getRepresentativeQuoteeMention());\n\t\t\t\t\t\t\tif (hds.dbpediaSurfaceFormToDBpediaLink.containsKey(indirectQuote.getRepresentativeQuoteeMention())){\n\t\t\t\t\t\t\t\tindirectQuote.setQuoteeDBpediaUri(hds.dbpediaSurfaceFormToDBpediaLink.get(indirectQuote.getRepresentativeQuoteeMention()));\n//\t\t\t\t\t\t\t\tSystem.out.println(\"DBPEDIA \" + indirectQuote.getRepresentativeQuoteeMention() + \" URI: \" + hds.dbpediaSurfaceFormToDBpediaLink.get(indirectQuote.getRepresentativeQuoteeMention()));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t }\n//\t\t\t} //for chunk\n//\t\t\t\tsay without that\n//\t\t\t}\t\t\n\t\t} //Core map sentences indirect quotes\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void demoDP(LexicalizedParser lp, String filename) {\n\t\t// This option shows loading and sentence-segmenting and tokenizing\n\t\t// a file using DocumentPreprocessor.\n\t\tTreebankLanguagePack tlp = new PennTreebankLanguagePack();\n\t\tGrammaticalStructureFactory gsf = tlp.grammaticalStructureFactory();\n\t\t// You could also create a tokenizer here (as below) and pass it\n\t\t// to DocumentPreprocessor\n\t\tfor (List<HasWord> sentence : new DocumentPreprocessor(filename)) {\n\t\t\tTree parse = lp.apply(sentence);\n\t\t\tList<Tree> testTree = new ArrayList<Tree>();\n\n\t\t\t// for (Tree subtree : parse) {\n\t\t\t// if (subtree.label().value().equals(\"VP\")) {\n\t\t\t// testTree.add(subtree);\n\t\t\t// }\n\t\t\t// }\n\t\t\t//\n//\t\t\tString pattern = \"VP < ((/VB.?/ < am|is|are|was|were) $+ (RB < /n['o]t/)) [< NP | < VP]\";// \"\\\\(VP \\\\([am|is|was|were|are]\\\\) .*\\\\)\";//\n//\t\t\tString pat = \"@NP < /NN.?/\";\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// \"\\\\(VP \\\\(.* [am|is|are|was|were]\\\\) \\\\(RB n[o’]t\\\\) \\\\(*\\\\)\\\\)\";\n//\t\t\tTregexPattern tgrepPattern = TregexPattern.compile(pattern);\n//\t\t\tTregexMatcher m = tgrepPattern.matcher(parse);\n//\t\t\twhile (m.find()) {\n//\t\t\t\tTree subtree = m.getMatch();\n//\t\t\t\ttestTree.add(subtree);\n//\t\t\t\tSystem.out.println(subtree.toString());\n//\t\t\t}\n\n\t\t\tTregexPatternCompiler tpc = new TregexPatternCompiler();\n\t\t\ttpc.addMacro(\"@VB\", \"/^VB/\");\n\t\t\ttpc.addMacro(\"@Be\", \"am|is|are|was|were\");\n\t\t\ttpc.addMacro(\"@Aux\", \"have|has|had|do|does|did\");\n\t\t\ttpc.addMacro(\"@NEGTerm\", \"(RB < /n['o]t/)\");\n\t\t\ttpc.addMacro(\"@PRN\", \"NP|ADJP|PP|ADVP|SBAR|S\");\n\t\t\ttpc.addMacro(\"@Modal\", \"can|could|may|might|will|would|must|shall|should|ought\");\n\t\t\ttpc.addMacro(\"@Be-Not\", \"(@VB < @Be $+ @NEGTerm)\");\n//\t\t\tTregexPattern test = tpc.compile(\"NP = cnp < DT !$ PP\");\n//\t\t\tTregexPattern test = tpc.compile(\"VP < ((@VB < @Be) $+ @NEGTerm) <@PRN\");\n//\t\t\tTregexPattern test = tpc.compile(\"VP < ((@VB < @Be) $+ @NEGTerm) < @PRN\");\n//\t\t\tTregexPattern test = tpc.compile(\"VP < @VB =vb < @NEGTerm < @PRN =xc \");\n//\t\t\tTregexPattern test = tpc.compile(\"VP < ((MD < @Modal) $+ @NEGTerm) < @PRN\");\n//\t\t\tTregexPattern test = tpc.compile(\"VP < (MD $+ @NEGTerm) < VP \"); //GOOD\n//\t\t\tTregexPattern test = tpc.compile(\"VP < MD=md < VP: =md $+ @NEGTerm \");\n//\t\t\tTregexPattern test = tpc.compile(\"VP < @VB=vb : =vb < @Be : =vb $+ @NEGTerm\");\n//\t\t\tTregexPattern test = tpc.compile(\"VP < @VB=vb < @PRN :(=vb < @Be $+ @NEGTerm)\");\n//\t\t\tTregexPattern test = tpc.compile(\"@VB < @Be $+ @NEGTerm\");\n\n\t\t\tTregexPattern test = tpc.compile(\"VP < ((@VB < @Aux) $+ @NEGTerm) < VP\");\n\t\t\t\n\n\t\t\tTregexMatcher mth = test.matcher(parse);\n\t\t\tif (mth.find()) {\n\t\t\t\tTree subtree = mth.getMatch();\n\t\t\t\ttestTree.add(subtree);\n\t\t\t\tSystem.out.println(\"Ter Compiler: \"+subtree.toString());\n\t\t\t}\n//\t\t\tfor (Tree subTree : testTree) {\n//\t\t\t\tString prdPattern = \"NP\";\n//\t\t\t\t TregexPattern prd = TregexPattern.compile(prdPattern);\n//\t\t\t\t TregexMatcher macher = prd.matcher(subTree);\n//\t\t\t\t if (macher.find()) {\n//\t\t\t\t Tree prdTree = m.getMatch();\n//\t\t\t\t System.out.println(\"PRD pattern: \"+prdTree.toString());\n//\t\t\t\t }\n//\t\t\t}\n\t\t\tSystem.out.println(\"--- Pattern: \" + testTree.toString());\n\t\t\t System.out.println(\"***\" + parse.toString());\n//\t\t\tparse.pennPrint();\n//\t\t\tSystem.out.println(parse.pennString());\n\t\t\tSystem.out.println();\n\n\t\t\tGrammaticalStructure gs = gsf.newGrammaticalStructure(parse);\n\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\tCollection tdl = gs.typedDependenciesCCprocessed();\n\t\t\t System.out.println(\"td1: \"+tdl);\n\t\t\t System.out.println();\n\t\t}\n\t}", "public void coreNLP(String inFile, String outFile) throws IOException {\n\tFile file = new File(inFile);\n\tlog.log(Level.INFO, \"Processing file with CoreNLP: {0}.\", new Object[] { file.getAbsolutePath() });\n\tString text = FileUtils.stringFromFileWithBytes(inFile, \"UTF-8\");\n\tDocument doc = new Document(inFile, text);\n\t// coreNLP(doc);\n\t// \n\tcoreNLPUsingServer(doc);\n\tFileUtils.write(doc.toXml().toXML(), new File(outFile));\n\n }", "public static void main(String[] args) throws FileNotFoundException {\n\n Scanner readFile = new Scanner(new File(\"sentences.txt\"));\n \n //Boolean to make sure parameters fit the finalized tokens\n boolean okay = true; \n \n while (readFile.hasNext()) {\n Stemmer s = new Stemmer();\n String token = readFile.next();\n okay = true;\n \n //Section to ensure no numerics\n if (token.contains(\"1\") || token.contains(\"2\"))\n okay = false;\n else if (token.contains(\"3\")||token.contains(\"4\"))\n okay = false;\n else if (token.contains(\"5\")||token.contains(\"6\"))\n okay = false;\n else if (token.contains(\"7\")||token.contains(\"8\"))\n okay = false;\n else if (token.contains(\"9\")||token.contains(\"0\"))\n okay = false;\n else {\n \n //remove characters\n token = token.replace(\"\\,\", \" \");\n token = token.replace(\"\\.\", \" \");\n token = token.replace(\"\\\"\", \" \");\n token = token.replace(\"\\(\", \" \");\n token = token.replace(\"\\)\", \" \");\n token = token.replace(\"'s\", \" \");\n token = token.trim();\n token = token.toLowerCase();\n }\n \n //Giant hard coded section to remove numerics\n if (token.compareTo(\"a\")==0)\n okay=false;\n if (token.compareTo(\"able\")==0)\n okay=false;\n if (token.compareTo(\"about\")==0)\n okay=false;\n if (token.compareTo(\"across\")==0)\n okay=false;\n if (token.compareTo(\"after\")==0)\n okay=false;\n if (token.compareTo(\"all\")==0)\n okay=false;\n if (token.compareTo(\"almost\")==0)\n okay=false;\n if (token.compareTo(\"also\")==0)\n okay=false;\n if (token.compareTo(\"am\")==0)\n okay=false;\n if (token.compareTo(\"among\")==0)\n okay=false;\n if (token.compareTo(\"an\")==0)\n okay=false;\n if (token.compareTo(\"and\")==0)\n okay=false;\n if (token.compareTo(\"any\")==0)\n okay=false;\n if (token.compareTo(\"are\")==0)\n okay=false;\n if (token.compareTo(\"as\")==0)\n okay=false;\n if (token.compareTo(\"at\")==0)\n okay=false;\n if (token.compareTo(\"be\")==0)\n okay=false;\n if (token.compareTo(\"because\")==0)\n okay=false;\n if (token.compareTo(\"been\")==0)\n okay=false;\n if (token.compareTo(\"but\")==0)\n okay=false;\n if (token.compareTo(\"by\")==0)\n okay=false;\n if (token.compareTo(\"can\")==0)\n okay=false;\n if (token.compareTo(\"cannot\")==0)\n okay=false;\n if (token.compareTo(\"could\")==0)\n okay=false;\n if (token.compareTo(\"dear\")==0)\n okay=false;\n if (token.compareTo(\"did\")==0)\n okay=false;\n if (token.compareTo(\"do\")==0)\n okay=false;\n if (token.compareTo(\"does\")==0)\n okay=false;\n if (token.compareTo(\"either\")==0)\n okay=false;\n if (token.compareTo(\"else\")==0)\n okay=false;\n if (token.compareTo(\"ever\")==0)\n okay=false;\n if (token.compareTo(\"every\")==0)\n okay=false;\n if (token.compareTo(\"for\")==0)\n okay=false;\n if (token.compareTo(\"from\")==0)\n okay=false;\n if (token.compareTo(\"get\")==0)\n okay=false;\n if (token.compareTo(\"got\")==0)\n okay=false;\n if (token.compareTo(\"had\")==0)\n okay=false;\n if (token.compareTo(\"has\")==0)\n okay=false;\n if (token.compareTo(\"have\")==0)\n okay=false;\n if (token.compareTo(\"he\")==0)\n okay=false;\n if (token.compareTo(\"her\")==0)\n okay=false;\n if (token.compareTo(\"hers\")==0)\n okay=false;\n if (token.compareTo(\"him\")==0)\n okay=false;\n if (token.compareTo(\"his\")==0)\n okay=false;\n if (token.compareTo(\"how\")==0)\n okay=false;\n if (token.compareTo(\"however\")==0)\n okay=false;\n if (token.compareTo(\"i\")==0)\n okay=false;\n if (token.compareTo(\"if\")==0)\n okay=false;\n if (token.compareTo(\"in\")==0)\n okay=false;\n if (token.compareTo(\"into\")==0)\n okay=false;\n if (token.compareTo(\"is\")==0)\n okay=false;\n if (token.compareTo(\"it\")==0)\n okay=false;\n if (token.compareTo(\"its\")==0)\n okay=false;\n if (token.compareTo(\"just\")==0)\n okay=false;\n if (token.compareTo(\"least\")==0)\n okay=false;\n if (token.compareTo(\"let\")==0)\n okay=false;\n if (token.compareTo(\"like\")==0)\n okay=false;\n if (token.compareTo(\"likely\")==0)\n okay=false;\n if (token.compareTo(\"may\")==0)\n okay=false;\n if (token.compareTo(\"me\")==0)\n okay=false;\n if (token.compareTo(\"might\")==0)\n okay=false;\n if (token.compareTo(\"most\")==0)\n okay=false;\n if (token.compareTo(\"must\")==0)\n okay=false;\n if (token.compareTo(\"my\")==0)\n okay=false;\n if (token.compareTo(\"neither\")==0)\n okay=false;\n if (token.compareTo(\"no\")==0)\n okay=false;\n if (token.compareTo(\"nor\")==0)\n okay=false;\n if (token.compareTo(\"not\")==0)\n okay=false;\n if (token.compareTo(\"of\")==0)\n okay=false;\n if (token.compareTo(\"off\")==0)\n okay=false;\n if (token.compareTo(\"often\")==0)\n okay=false;\n if (token.compareTo(\"on\")==0)\n okay=false;\n if (token.compareTo(\"only\")==0)\n okay=false;\n if (token.compareTo(\"or\")==0)\n okay=false;\n if (token.compareTo(\"other\")==0)\n okay=false;\n if (token.compareTo(\"our\")==0)\n okay=false;\n if (token.compareTo(\"own\")==0)\n okay=false;\n if (token.compareTo(\"rather\")==0)\n okay=false;\n if (token.compareTo(\"said\")==0)\n okay=false;\n if (token.compareTo(\"say\")==0)\n okay=false;\n if (token.compareTo(\"says\")==0)\n okay=false;\n if (token.compareTo(\"she\")==0)\n okay=false;\n if (token.compareTo(\"should\")==0)\n okay=false;\n if (token.compareTo(\"since\")==0)\n okay=false;\n if (token.compareTo(\"so\")==0)\n okay=false;\n if (token.compareTo(\"some\")==0)\n okay=false;\n if (token.compareTo(\"than\")==0)\n okay=false;\n if (token.compareTo(\"that\")==0)\n okay=false;\n if (token.compareTo(\"the\")==0)\n okay=false;\n if (token.compareTo(\"their\")==0)\n okay=false;\n if (token.compareTo(\"them\")==0)\n okay=false;\n if (token.compareTo(\"then\")==0)\n okay=false;\n if (token.compareTo(\"there\")==0)\n okay=false;\n if (token.compareTo(\"these\")==0)\n okay=false;\n if (token.compareTo(\"they\")==0)\n okay=false;\n if (token.compareTo(\"this\")==0)\n okay=false;\n if (token.compareTo(\"tis\")==0)\n okay=false;\n if (token.compareTo(\"to\")==0)\n okay=false;\n if (token.compareTo(\"too\")==0)\n okay=false;\n if (token.compareTo(\"twas\")==0)\n okay=false;\n if (token.compareTo(\"us\")==0)\n okay=false;\n if (token.compareTo(\"wants\")==0)\n okay=false;\n if (token.compareTo(\"was\")==0)\n okay=false;\n if (token.compareTo(\"we\")==0)\n okay=false;\n if (token.compareTo(\"were\")==0)\n okay=false;\n if (token.compareTo(\"what\")==0)\n okay=false;\n if (token.compareTo(\"when\")==0)\n okay=false;\n if (token.compareTo(\"where\")==0)\n okay=false;\n if (token.compareTo(\"which\")==0)\n okay=false;\n if (token.compareTo(\"while\")==0)\n okay=false;\n if (token.compareTo(\"who\")==0)\n okay=false;\n if (token.compareTo(\"whom\")==0)\n okay=false;\n if (token.compareTo(\"why\")==0)\n okay=false;\n if (token.compareTo(\"will\")==0)\n okay=false;\n if (token.compareTo(\"with\")==0)\n okay=false;\n if (token.compareTo(\"would\")==0)\n okay=false;\n if (token.compareTo(\"yet\")==0)\n okay=false;\n if (token.compareTo(\"you\")==0)\n okay=false;\n if (token.compareTo(\"your\")==0)\n okay=false;\n \n //Stemming process\n if(okay){\n s.add(token.toCharArray(),token.length());\n s.stem();\n token = s.toString();\n }\n \n //to make sure there are no duplicates\n if (tokenList.contains(token))\n okay = false;\n \n //Finalizing tokens\n if (okay)\n tokenList.add(token);\n \n\n }\n //System.out.println(i);\n System.out.println(tokenList.size());\n System.out.println(tokenList);\n readFile.close();\n \n Scanner readFile2 = new Scanner(new File(\"sentences.txt\"));\n \n \n //intializing TDMatrix\n int[][] tdm = new int[46][tokenList.size()];\n int i = 0;\n int j = 0;\n \n while (i<46){\n j=0;\n while (j < tokenList.size()){\n tdm[i][j]=0;\n j++;\n }\n i++;\n }\n \n String str;\n i=0;\n while (readFile2.hasNextLine()) {\n str=readFile2.nextLine();\n \n j=0;\n while (j<tokenList.size()){\n while ((str.contains(tokenList.get(j)))){\n tdm[i][j]++;\n str = str.replaceFirst(tokenList.get(j), \"***\");\n }\n j++;\n }\n \n i++;\n }\n \n i=0;\n while (i<46){\n j=0;\n while (j<tokenList.size()){\n System.out.print(tdm[i][j] + \" \");\n j++;\n }\n System.out.println(\"\");\n i++;\n }\n \n readFile.close();\n }", "@Test\n public void InternalNLP_annotate_doesAnnotate() {\n ExtractedText extractedText = null;\n\n String fileUri = \"dummyUri\";\n String fileRef = \"src/test/res/Pasta.txt\";\n File file = new File(fileRef);\n try {\n InputStream inputStream = new FileInputStream(file);\n extractedText = mInternalTextProcessor.processFile(inputStream, fileUri, fileRef\n , \"txt\", false);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (FileTypeNotSupportedException e) {\n e.printStackTrace();\n } catch (DocumentNotSupportedException e) {\n e.printStackTrace();\n }\n\n // Annotate\n mInternalNLP.annotate(extractedText);\n\n if(!extractedText.getTitle().isEmpty()) {\n Assert.assertNotNull(extractedText.getTitleAnnotation());\n }\n\n for (Section section: extractedText.getSections()) {\n if(!section.getBody().isEmpty()) {\n Assert.assertNotNull(section.getBodyAnnotation());\n }\n if(!section.getTitle().isEmpty()) {\n Assert.assertNotNull(section.getTitleAnnotation());\n }\n }\n }", "private void startParsing(){\r\n pondred = new ArrayList<>();\r\n //extract docs from corpus\r\n for (String xml:parseDocsFile(docs_file))\r\n {\r\n try {\r\n pondred.add(loadXMLFromString(xml));\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n System.out.println(\"Ending parsing\");\r\n for (Core pon:pondred){\r\n for (String string:pon.abstractTerm){\r\n Double tf = pon.getAbstractFerq(string)/pon.getAbstractSize();\r\n Double idf = Math.log10(Core.count/countingDuplicates(string));\r\n pon.abstractFrequence.put(string,tf*idf);\r\n }\r\n pon.finish();\r\n }\r\n }", "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}", "@Test\n\tpublic void probandoConParser() {\n\t\tString dBoxUrl = \"/home/julio/Dropbox/julio_box/educacion/maestria_explotacion_datos_uba/materias/cuat_4_text_mining/material/tp3/\";\n\t\tString modelUrl = dBoxUrl + \"NER/models/es-ner-person.bin\";\n\t\tString filesUrl = dBoxUrl + \"NER/archivoPrueba\";\n\t\tString sampleFile = filesUrl + \"/viernes-23-05-14-alan-fitzpatrick-gala-cordoba.html\";\n\t\tList<String> docs = getMyDocsFromSomewhere(filesUrl);\n\n\t\ttry {\n\t\t\t// detecting the file type\n\t\t\tBodyContentHandler handler = new BodyContentHandler();\n\t\t\tMetadata metadata = new Metadata();\n\t\t\tFileInputStream inputstream = new FileInputStream(new File(sampleFile));\n\t\t\tParseContext pcontext = new ParseContext();\n\n\t\t\t// Html parser\n\t\t\tHtmlParser htmlparser = new HtmlParser();\n\t\t\thtmlparser.parse(inputstream, handler, metadata, pcontext);\n\t\t\tSystem.out.println(\"Contents of the document:\" + handler.toString());\n\t\t\tSystem.out.println(\"Metadata of the document:\");\n\t\t\tString[] metadataNames = metadata.names();\n\n\t\t\tfor (String name : metadataNames) {\n\t\t\t\tSystem.out.println(name + \": \" + metadata.get(name));\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\n\t}", "@Override\r\n\tpublic DocumentData read(File in) throws Exception {\r\n\t\tDocumentData doc = new DocumentData(in);\r\n\t\tBufferedReader reader = FileHandler.getBufferedReader(in);\r\n\t\tBufferedReader nested = null;\r\n\t\tString inpath = in.getAbsolutePath();\r\n\t\tFile nestin = new File (inpath.substring(0,inpath.length()-5)+SUBSUFFIX);\r\n\t\tif(nestin.exists())\r\n\t\t\tnested = FileHandler.getBufferedReader(nestin);\r\n\t\tint lcnt=0;\r\n\t\tint scnt=0;\r\n\t\tint start=-1;\r\n\t\tint nstart = -1;\r\n\t\tSentenceData sent = null;\r\n\t\twhile(true){\r\n\t\t\tString line = reader.readLine();\r\n\t\t\tString nline = null;\r\n\t\t\tif(nested!=null)\r\n\t\t\t\tnline = nested.readLine();\r\n\t\t\tif(line==null) {\r\n\t\t\t\tif(sent!=null){\r\n\t\t\t\t\tdoc.addSentenceData(sent);\r\n\t\t\t\t\tsent=null;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tline = line.trim();\r\n\t\t\tlcnt++;\r\n\t\t\tif(line.length()==0){\r\n\t\t\t\tif(sent!=null){\r\n\t\t\t\t\tdoc.addSentenceData(sent);\r\n\t\t\t\t\tsent=null;\r\n\t\t\t\t\tscnt=0;\r\n\t\t\t\t}else\r\n\t\t\t\t\tSystem.out.println(\"Skip empty line in line:\"+lcnt);\r\n\t\t\t}else if(line.startsWith(\"#\")){\r\n\t\t\t\tSystem.out.println(\"Skip comments in line:\"+lcnt+\"; \"+line);\r\n\t\t\t}else{\r\n\t\t\t\tif(sent==null)\r\n\t\t\t\t\tsent = new SentenceData();\r\n\t\t\t\tscnt++;\r\n\t\t\t\t\r\n\t\t\t\tString tmp[] = line.split(\"\\t\");\r\n\t\t\t\tsent.addTokens(tmp[0]);\r\n\t\t\t\tString mark = tmp[tmp.length-1];// last column is the markables;\r\n\t\t\t\tif(mark.equals(\"O\")){\r\n\t\t\t\t\tif(start>=0)\r\n\t\t\t\t\t\tsent.addMarkables(start, scnt-1);\r\n\t\t\t\t\tstart=-1;\r\n\t\t\t\t}else if(mark.startsWith(\"I-\")||mark.startsWith(\"B-\")){\r\n\t\t\t\t\tif(start<0)\r\n\t\t\t\t\t\tstart = scnt;//support both IOB1 and IOB2\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Exception(\"Please input only IOB or IOB2 scheme (main): \"+lcnt+\": \"+line);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(nline!=null){\r\n\t\t\t\t\tString ntmp[] = nline.split(\"\\t\");\r\n\t\t\t\t\tString nmark = ntmp[ntmp.length-1];\r\n\t\t\t\t\tif(nmark.equals(\"O\")){\r\n\t\t\t\t\t\tif(nstart>=0)\r\n\t\t\t\t\t\t\tsent.addMarkables(start, scnt-1);\r\n\t\t\t\t\t\tnstart=-1;\r\n\t\t\t\t\t}else if(nmark.startsWith(\"I-\")||nmark.startsWith(\"B-\")){\r\n\t\t\t\t\t\tif(nstart<0)\r\n\t\t\t\t\t\t\tnstart = scnt;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthrow new Exception(\"Please input only IOB or IOB2 scheme (nested): \"+lcnt+\": \"+nline);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn doc;\r\n\t}", "@Override\n public void process(JCas jCas) throws AnalysisEngineProcessException {\n JCas viewJCas = jCas;\n if (!view.equals(VIEW_SYSTEM)) {\n try {\n viewJCas = jCas.getView(view);\n } catch (CASException e) {// just rethrow\n throw new AnalysisEngineProcessException(e);\n }\n }\n\n Collection<de.julielab.jules.types.Sentence> sentences = select(\n viewJCas, de.julielab.jules.types.Sentence.class);\n\n for (de.julielab.jules.types.Sentence julesSentence : sentences) {\n int sentence_start = julesSentence.getBegin();\n\n if (julesSentence.getCoveredText().length() > 0) {\n\n try {\n Sentence sentence = new Sentence(\n julesSentence.getCoveredText());\n bannerTokenizer.tokenize(sentence);\n crfTagger.tag(sentence);// error\n if (postProcessor != null)\n postProcessor.postProcess(sentence);\n\n for (Mention mention : sentence.getMentions()) {\n\n int startChar = mention.getStartChar() + sentence_start;\n int endChar = mention.getEndChar() + sentence_start;\n // LOG.debug(\"found NE:\" + mention.getText() + \" \" +\n // startChar\n // + \":\" + endChar);\n Protein prot = new Protein(viewJCas, startChar, endChar);\n prot.setName(mention.getText());\n prot.setTextualRepresentation(\"⊂PROT⊃\");\n prot.addToIndexes();\n }\n\n } catch (Throwable t) {\n // not sure why, but this happens sometimes after some time\n int docId = getHeaderIntDocId(viewJCas);\n LOG.warn(\"Banner exception at docId {}, skipping. {}\",\n docId, StringUtils.print(t));\n try {\n GarbageCollectorAnnotator.runGC();\n loadTagger(); // reload\n } catch (Exception e) {\n throw new AnalysisEngineProcessException(e);\n }\n }\n }\n }\n }", "public TextMetaData parse(IFileHandler file) {\n\n\t\tTextMetaData metaData = new TextMetaData();\n\t\tStringBuilder bldWord = new StringBuilder();\n\n\t\t// the caret position holds the current position in the text stream\n\t\t// and is used to store the position of the words that have been found\n\t\t// which is useful information to highlight the words later on\n\t\tlong caretPosition = 0;\n\t\t\n\t\twhile (file.hasNext()) {\n\n\t\t\t// we iterate over the file content (which is obviously text based)\n\t\t\tString filePart = file.next();\n\t\t\t\n\t\t\tfor (int i = 0; i < filePart.length(); ++i) {\n\n\t\t\t\tchar c = filePart.charAt(i);\n\t\t\t\tboolean isWordFinisihed = false;\n\n\t\t\t\tint type = Character.getType(c);\n\n\t\t\t\t// check for a punctuation character\n\t\t\t\tswitch (type) {\n\t\t\t\t\n\t\t\t\tcase Character.START_PUNCTUATION:\n\t\t\t\tcase Character.INITIAL_QUOTE_PUNCTUATION:\n\t\t\t\tcase Character.FINAL_QUOTE_PUNCTUATION:\n\t\t\t\tcase Character.END_PUNCTUATION:\n\t\t\t\tcase Character.DASH_PUNCTUATION:\n\t\t\t\tcase Character.CONNECTOR_PUNCTUATION:\n\t\t\t\tcase Character.SPACE_SEPARATOR:\n\t\t\t\tcase Character.LINE_SEPARATOR:\n\t\t\t\tcase Character.PARAGRAPH_SEPARATOR:\n\t\t\t\tcase Character.CONTROL:\n\t\t\t\t\t\n\t\t\t\t\tisWordFinisihed = true;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase Character.OTHER_PUNCTUATION:\n\n\t\t\t\t\t// if we found a punctuation between a letter or digit\n\t\t\t\t\t// aka 1.2.3 or V.1.2 or something like this\n\t\t\t\t\t// we will see this as a single word\n\t\t\t\t\tif ((i > 0)\n\t\t\t\t\t\t\t&& (i != filePart.length() - 1)\n\t\t\t\t\t\t\t&& Character\n\t\t\t\t\t\t\t\t\t.isLetterOrDigit(filePart.charAt(i - 1))\n\t\t\t\t\t\t\t&& Character\n\t\t\t\t\t\t\t\t\t.isLetterOrDigit(filePart.charAt(i + 1))) {\n\n\t\t\t\t\t\tisWordFinisihed = false;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t\n\t\t\t\t\t\tisWordFinisihed = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tisWordFinisihed = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// if we figured out that we have finished one word\n\t\t\t\tif (isWordFinisihed) {\n\n\t\t\t\t\tif (bldWord.length() > 0) {\n\n\t\t\t\t\t\t// we have to store this information in the meta data\n\t\t\t\t\t\tString newWord = bldWord.toString();\n\t\t\t\t\t\t\n\t\t\t\t\t\tWordPosition pos = new WordPosition(caretPosition + i - newWord.length(), newWord);\n\t\t\t\t\t\t\n\t\t\t\t\t\tmetaData.addWord(newWord, pos);\n\n\t\t\t\t\t\t// and inform the UI about the process update\n\t\t\t\t\t\tint percentage = (int) (pos.getEndPosition() * 100 / file.getFileLength());\n\t\t\t\t\t\t\n\t\t\t\t\t\tString message = String.format(\"Wort \\\"%s\\\" gefunden\",\n\t\t\t\t\t\t\t\tnewWord);\n\n\t\t\t\t\t\tnotifyTextProcessStatusUpdate(new TextProcessStatusEvent(\n\t\t\t\t\t\t\t\tthis, percentage, message));\n\n\t\t\t\t\t\tbldWord = new StringBuilder();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// when the word is finished, we have examined a valid punctuation character before\n\t\t\t\t\t// which is the signal to the text processing strategy that the word is finished\n\t\t\t\t\tmetaData.addPunctuation(c);\n\t\t\t\t\t\n\t\t\t\t} else {\n\n\t\t\t\t\t// otherwise we are still in-between the word and have to build it \n\t\t\t\t\t// char-by-char\n\t\t\t\t\tbldWord.append(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcaretPosition += filePart.length();\n\t\t}\n\n\t\t// notify that we will have to sort the list of examined words\n\t\t// based on their frequency, which might take a while\n\t\tnotifyTextProcessStatusUpdate(new TextProcessStatusEvent(this, -1,\n\t\t\t\t\"Sortiere Wortliste...\"));\n\n\t\tmetaData.sortWordsByFrequency();\n\n\t\t// after all the process is finished, so refresh the UI here\n\t\tnotifyTextProcessStatusFinish(new TextProcessFinishEvent(this,\n\t\t\t\tfile.getPlainText(), metaData));\n\t\t\n\t\treturn metaData;\n\t}", "public static CV parseDocx(String nom, String prenom, String mail, String tel,File file) throws IOException{\n CV moncv=null;\n try {\n FileInputStream fis = new FileInputStream(file);\n XWPFDocument xdoc = new XWPFDocument(OPCPackage.open(fis));\n XWPFWordExtractor extractor = new XWPFWordExtractor(xdoc);\n String text = extractor.getText();\n if(text.trim().equals(\"\")) {\n throw new IOException(\"Format non valide\");\n //System.out.println(\"VIDE\");\n }\n\n String[] l = text.split(\"\\\\s\");\n Arrays.stream(l).forEach(System.out::println);\n //On récupère tous les mots clées et competences du PDF\n ArrayList<String> competences= getCompetences(l);\n ArrayList<String> allkeyword = getCompetences(l);\n\n //Creation du CV\n moncv= new CV(String.valueOf(cpt++),\n prenom,\n nom,\n getAge(l),\n mail,\n tel,\n competences,\n allkeyword);\n\n fis.close();\n\n } catch (InvalidFormatException e) {\n e.printStackTrace();\n }\n\n return moncv;\n\n\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t\tList<Paragraph> paragraphs = new ArrayList<Paragraph>();\n\t\tList<Paragraph> paragraphsWithNoSentences = new ArrayList<Paragraph>();\n\t\t\n\t\tScanner sc = null, sc1 = null;\n\t\ttry {\n\t\t\tsc = new Scanner(new File(\"testsearchtext.txt\"));\n\t\t\tsc1 = new Scanner(new File(\"testsearchentity.txt\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsc.useDelimiter(\"[.]\");\n\t\tsc1.useDelimiter(\"[|]\");\n\t\t\n\t\tList<Sentence> sentences = new ArrayList<Sentence>();\n\t\tint sCount = 0;\n\t\tint pCount = 0;\n\t\twhile(sc.hasNext()){\n\t\t\tString temp = sc.next().trim();\n\n\t\t\tif(sCount > 0 && (sCount%10 == 0 || !sc.hasNext())){\n\t\t\t\tParagraph p = new Paragraph(pCount);\n\t\t\t\tparagraphsWithNoSentences.add(p);\n\t\t\t\t\n\t\t\t\tp = new Paragraph(pCount);\n\t\t\t\tp.setSentences(sentences);\n\t\t\t\tparagraphs.add(p);\n\t\t\t\tpCount++;\n\t\t\t\t\n\t\t\t\tsentences = new ArrayList<Sentence>();\n\t\t\t}\n\t\t\t\n\t\t\tif(!temp.equals(\"\"))\n\t\t\t\tsentences.add(new Sentence((sCount%10), temp));\n\t\t\t\n\t\t\tsCount++;\n\t\t}\n\t\t\n\t\tList<Entity> entities = new ArrayList<Entity>();\n\t\tint currType = -1; \n\t\twhile(sc1.hasNext()){\n\t\t\tString temp = sc1.next().trim();\n\t\t\tif(temp.equals(\"place\")){currType = Entity.PLACE;} else\n\t\t\tif(temp.equals(\"url\")){currType = Entity.URL;} else\n\t\t\tif(temp.equals(\"email\")){currType = Entity.EMAIL;} else\n\t\t\tif(temp.equals(\"address\")){currType = Entity.ADDRESS;} \n\t\t\telse{\n\t\t\t\tentities.add(new Entity(currType, temp));\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSource s = new Source(\"testsearchtext.txt\", \"testsearchtext.txt\");\n\t\tpt1 = new ProcessedText(s, paragraphs, null); \n\t\t\n\t\ts = new Source(\"testsearchtext1.txt\", \"testsearchtext1.txt\");\n\t\tpt2 = new ProcessedText(s, paragraphsWithNoSentences, null); \n\t\t\n\t\tpt3 = new ProcessedText();\n\t\tpt3.setParagraphs(paragraphs);\n\t\t\n\t\tpt4 = new ProcessedText();\n\t\ts = new Source(\"testsearchtext2.txt\", \"testsearchtext2.txt\");\n\t\tpt4.setMetadata(s);\n\t\t\n\t\ts = new Source(\"testsearchtext3.txt\", \"testsearchtext3.txt\");\n\t\tpt5 = new ProcessedText(s, paragraphs, entities); \n\t\t\n\t\ts = new Source(\"testsearchtext4.txt\", \"testsearchtext4.txt\");\n\t\tpt6 = new ProcessedText(s, null, entities); \n\t}", "public static void main(String[] args) throws ParseException {\n String text;\n\n File file;\n\n /* pdfStripper = null;\n pdDoc = null;\n cosDoc = null;\n */ String parsed = parseWithTika();\n file = new File(filePath);\n try {\n /* parser = new PDFParser(new FileInputStream(file)); // update for PDFBox V 2.0\n parser.parse();\n cosDoc = parser.getDocument();\n pdfStripper = new PDFTextStripper();\n pdDoc = new PDDocument(cosDoc);\n pdDoc.getNumberOfPages();\n */ //pdfStripper.setStartPage(1);\n //pdfStripper.setEndPage(10);\n /* text = pdfStripper.getText(pdDoc);\n String resultString = text.replaceAll(\"\\\\p{C}|\\\\p{Sm}|\\\\p{Sk}|\\\\p{So}\", \" \");\n */\n\n //testDictionary();\n testOpenNlp(parsed);\n testOpenNlp(\"anas al bassit\");\n testOpenNlp(\"Anas Al Bassit\");\n testOpenNlp(\"barack obama\");\n testOpenNlp(\"Barack Obama\");\n\n\n System.out.println();\n } catch (IOException e) {\n e.printStackTrace();\n }\n// catch (ParseException e) {\n// e.printStackTrace();\n// }\n }", "public Text pos(Text text) {\r\n\t\tInputStream model = null;\r\n\t\ttry {\r\n\t\t\tlog.debug(\"Executing POSTagger for each word in the text \" + text.getName());\r\n\t\t\tmodel = ClassLoader.getSystemClassLoader().getResourceAsStream(\"models/pt-pos-perceptron.bin\");\r\n\t\t\tPOSModel posModel = new POSModel(model);\r\n\t\t\t \r\n\t\t\tPOSTaggerME posTagger = new POSTaggerME(posModel); // uses maximum entropy model\r\n\t\t\t\r\n\t\t\tfor (Sentence sentence : text.getSentences()) {\r\n\t\t\t\tString tags[] = posTagger.tag(sentence.getRawWords());\r\n\t\t\t\tfor (int i = 0; i < tags.length; i++) {\r\n\t\t\t\t\tsentence.getWords().get(i).setPosTag(tags[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.warn(\"Problem with POSTagger model file.\" + e.getMessage());\r\n\t\t\tlog.warn(\"If you want to use POSTagger, please fix this issue first before proceeding.\");\r\n\t\t} finally {\r\n\t\t\tif(model != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tmodel.close();\r\n\t\t\t\t} catch (Exception e2) {\r\n\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn text;\r\n\t}", "public static void selectFeature() throws IOException {\n\t\tString trainPath = \"./corpus/trainData\";\n\t\tString stopPath = \"./corpus/english.stop\";\n\t\tString outPath = \"./corpus/features\";\n\t\tFileWriter fw = new FileWriter(outPath);\n\t\tFileReader fr = new FileReader(trainPath);\n\t\tFileReader fr2 = new FileReader(stopPath);\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tBufferedReader br = new BufferedReader(fr);\n\t\tBufferedReader br2 = new BufferedReader(fr2);\n\t\tString oneline;\n\n\t\tArrayList<String> as = new ArrayList<String>();\n\t\twhile ((oneline = br2.readLine()) != null) {\n\t\t\tas.add(oneline);\n\t\t}\n\t\tString[] stopWords = new String[as.size()];\n\t\tas.toArray(stopWords);\n\n\t\tHashtable<String, Integer> hs = new Hashtable<String, Integer>();\n\n\t\tAnalyzer analyzer = new SnowballAnalyzer(\"English\", stopWords);\n\n\t\ttry {\n\t\t\twhile ((oneline = br.readLine()) != null) {\n\t\t\t\tint pos = oneline.indexOf(\"\\t\");\n\t\t\t\tString topic = oneline.substring(0, pos);\n\t\t\t\tString content = oneline.substring(pos + 1);\n\t\t\t\t// StringTokenizer st=new StringTokenizer(content,\" \");\n\n\t\t\t\tTokenStream stream = analyzer.tokenStream(\"contents\",\n\t\t\t\t\t\tnew StringReader(content));\n\n\t\t\t\twhile (true) {\n\t\t\t\t\tToken token = stream.next();\n\t\t\t\t\tif (token == null)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tString tmp = token.termText();\n\t\t\t\t\tif (!hs.containsKey(tmp)) {\n\t\t\t\t\t\ths.put(tmp, new Integer(1));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tInteger num = hs.get(tmp);\n\t\t\t\t\t\ths.put(tmp, num + 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\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\tList<Map.Entry> list = new ArrayList<Map.Entry>(hs.entrySet());\n\t\tCollections.sort(list, new Comparator<Map.Entry>() {\n\t\t\tpublic int compare(Map.Entry e1, Map.Entry e2) {\n\t\t\t\tInteger i1 = (Integer) e1.getValue();\n\t\t\t\tInteger i2 = (Integer) e2.getValue();\n\t\t\t\treturn i2.compareTo(i1);\n\t\t\t}\n\t\t});\n\t\tint count = 0;\n\t\tSystem.out.println(\"word - freq\");\n\t\tSystem.out.println(\"-------------\");\n\t\tfor (Map.Entry e : list) {\n\t\t\tInteger num = (Integer) e.getValue();\n\t\t\tString term = (String) e.getKey();\n\t\t\tif (count++ < 2000) {\n\t\t\t\tbw.write(term);\n\t\t\t\tbw.newLine();\n\t\t\t}\n\n\t\t}\n\n\t\tbw.close();\n\n\t\tSystem.out.println(hs.keySet().size());\n\t\tSystem.out.println(count);\n\n\t}", "void tokenize(TextDocument document, TokenFactory tokens) throws IOException;", "@Override\n\tprotected Map<Object, Object> rawTextParse(CharSequence text) {\n\n\t\tStanfordCoreNLP pipeline = null;\n\t\ttry {\n\t\t\tpipeline = pipelines.take();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tAnnotation document = new Annotation(text.toString());\n\t\tpipeline.annotate(document);\n\t\tMap<Object, Object> sentencesMap = new LinkedHashMap<Object, Object>();//maintain sentence order\n\t\tint id = 0;\n\t\tList<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n\n\t\tfor (CoreMap sentence : sentences) {\n\t\t\tStringBuilder processedText = new StringBuilder();\n\t\t\tfor (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\n\t\t\t\tString word = token.get(CoreAnnotations.TextAnnotation.class);\n\t\t\t\tString lemma = token.get(CoreAnnotations.LemmaAnnotation.class);\n\t\t\t\tString pos = token.get(CoreAnnotations.PartOfSpeechAnnotation.class);\n\t\t\t\t//todo this should really happen after parsing is done, because using lemmas might confuse the parser\n\t\t\t\tif (config().isUseLowercaseEntries()) {\n\t\t\t\t\tword = word.toLowerCase();\n\t\t\t\t\tlemma = lemma.toLowerCase();\n\t\t\t\t}\n\t\t\t\tif (config().isUseLemma()) {\n\t\t\t\t\tword = lemma;\n\t\t\t\t}\n\t\t\t\tprocessedText.append(word).append(POS_DELIMITER).append(lemma).append(POS_DELIMITER).append(pos).append(TOKEN_DELIM);\n //inserts a TOKEN_DELIM at the end too\n\t\t\t}\n\t\t\tsentencesMap.put(id, processedText.toString().trim());//remove the single trailing space\n\t\t\tid++;\n\t\t}\n\t\ttry {\n\t\t\tpipelines.put(pipeline);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn sentencesMap;\n\t}", "public static Document parse(String filename) throws ParserException {\n\t\t// TODO YOU MUST IMPLEMENT THIS\n\t\t// girish - All the code below is mine\n\t\t\t\n\t\t// Creating the object for the new Document\n\t\t\n\t\t\n\t\tif (filename == null){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t\n\t\t// Variable indexPos to track the current pointer location in the String Array\n\t\tint indexPos = 0;\n\t\t\n\t\t// Creating an instance of the document class to store the parsed content\n\t\tDocument d = new Document();\n\t\t\n\t\t// to store the result sent from the regexAuthor method and regexPlaceDate method\n\t\tObject[] resultAuthor = {null, null, null};\n\t\tObject[] resultPlaceDate = {null, null, null};\n\t\tStringBuilder news = new StringBuilder();\n\t\t\n\t\t// Next 4 lines contains the code to get the fileID and Category metadata\n\t\tString[] fileCat = new String[2];\n\t\t\n\t\tfileCat = regexFileIDCat(\"/((?:[a-z]|-)+)/([0-9]{7})\", filename);\n\t\t// System.out.println(filename);\n\t\t// throw an exception if the file is blank, junk or null\n\t\tif (fileCat[0] == null){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\td.setField(FieldNames.CATEGORY, fileCat[0]);\n\t\td.setField(FieldNames.FILEID, fileCat[1]);\n\t\t\n\t\t\n\t\t// Now , parsing the file\n\t\tFile fileConnection = new File(filename);\n\t\t\n\t\t// newscollated - it will store the parsed file content on a line by line basis\n\t\tArrayList<String> newscollated = new ArrayList<String>();\n\t\t\n\t\t// String that stores the content obtained from the . readline() operation\n\t\tString temp = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\t\n\t\t\tBufferedReader getInfo = new BufferedReader(new FileReader(fileConnection));\n\t\t\twhile ((temp = getInfo.readLine()) != null)\n\t\t\t{\n\t\t\t\tif(temp.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\n\t\t\t\t\ttemp = temp + \" \";\n\t\t\t\t\tnewscollated.add(temp);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tgetInfo.close();\n\t\t\t\n\t\t\t//-- deprecated (REMOVE THIS IF OTHER WORKS)\n\t\t\t// setting the title using the arraylist's 0th index element\n\t\t\t//d.setField(FieldNames.TITLE, newscollated.get(0));\n\t\t\t\n\t\t\t// Appending the lines into one big string using StringBuilder\n\t\t\t\n\t\t\tfor (String n: newscollated)\n\t\t\t{\n\t\t\t\tnews.append(n);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// Obtaining the TITLE of the file\n\t\t\tObject[] titleInfo = new Object[2];\n\t\t\t\n\t\t\ttitleInfo = regexTITLE(\"([^a-z]+)\\\\s{2,}\", news.toString());\n\t\t\td.setField(FieldNames.TITLE, titleInfo[0].toString().trim());\n\t\t\tindexPos = (Integer) titleInfo[1];\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// Getting the Author and Author Org\n\t\t\tresultAuthor = regexAuthor(\"<AUTHOR>(.*)</AUTHOR>\", news.toString());\n\t\t\t\n\t\t\tif (resultAuthor[0] != null)\n\t\t\t{\n\t\t\t\td.setField(FieldNames.AUTHOR, resultAuthor[0].toString());\n\t\t\t}\n\t\t\t\n\t\t\tif (resultAuthor[1] != null)\n\t\t\t{\n\t\t\t\td.setField(FieldNames.AUTHORORG, resultAuthor[1].toString());\n\t\t\t}\n\t\t \n\t\t \n\t\t \n\t\t if ((Integer) resultAuthor[2] != 0)\n\t\t {\n\t\t \tindexPos = (Integer) resultAuthor[2];\n\t\t }\n\t\t\t\n\t\t \n\t\t \n\t\t // Getting the Place and Date\n \t\t\tresultPlaceDate = regexPlaceDate(\"\\\\s{2,}(.+),\\\\s(?:([A-Z][a-z]+\\\\s[0-9]{1,})\\\\s{1,}-)\", news.toString());\n \t\t\t\n \t\t\tif (resultPlaceDate[0] != null)\n \t\t\t{\n \t\t\t\td.setField(FieldNames.PLACE, resultPlaceDate[0].toString().trim());\n \t\t\t}\n \t\t \n \t\t\tif (resultPlaceDate[1] != null)\n \t\t\t{\n \t\t\t\td.setField(FieldNames.NEWSDATE, resultPlaceDate[1].toString().trim());\n \t\t\t}\n \t\t\t\n \t\t // getting the content\n \t\t \n \t\t if ((Integer) resultPlaceDate[2] != 0)\n\t\t {\n\t\t \tindexPos = (Integer) resultPlaceDate[2];\n\t\t }\n \t\t \n \t\t \n \t\t d.setField(FieldNames.CONTENT, news.substring(indexPos + 1));\n \t\t \n \t\t return d;\n \t\t \n\t\t \n\t\t \n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(FileNotFoundException e){\n\t\t\tthrow new ParserException();\n\t\t\t\n\t\t}\n\n\t\tcatch(IOException e){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\treturn d;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public abstract TextDocument getTextDocumentFromFile(String path) throws FileNotFoundException, IOException;", "public void processNER(ArrayList<Sentence> listofSentences,\r\n\t\t\tString path) throws FileNotFoundException {\r\n\r\n\t\tScanner sc = new Scanner(new File(path));\r\n\t\twhile (sc.hasNext()) {\r\n\t\t\tString properNoun = sc.nextLine();\r\n\t\t\tfor (Sentence sentence : listofSentences) {\r\n\t\t\t\tMap<String, Integer> tokenMap = sentence.tokenMap;\r\n\t\t\t\tint index = properNoun.indexOf(\" \");\r\n\t\t\t\tif (index > 0) {\r\n\t\t\t\t\tString[] nameParts = properNoun.split(\" \");\r\n\t\t\t\t\tboolean isPresent = false;\r\n\t\t\t\t\tfor (String name : nameParts) {\r\n\t\t\t\t\t\tif (tokenMap.containsKey(name))\r\n\t\t\t\t\t\t\tisPresent = true;\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tisPresent = false;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (isPresent) {\r\n\t\t\t\t\t\tfor (String name : nameParts) {\r\n\t\t\t\t\t\t\tint count = tokenMap.get(name);\r\n\t\t\t\t\t\t\tif (count == 1)\r\n\t\t\t\t\t\t\t\ttokenMap.remove(name);\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\ttokenMap.put(name, count - 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttokenMap.put(properNoun, 1);\r\n\t\t\t\t\t\tsentence.namedEntities.add(properNoun);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (tokenMap.containsKey(properNoun))\r\n\t\t\t\t\tsentence.namedEntities.add(properNoun);\r\n\t\t\t}\r\n\t\t}\r\n\t\tsc.close();\r\n\t}", "private void handleDocument(String name,InputStream ins)\n{\n Map<String,Integer> words = new HashMap<>();\n Map<String,Integer> kgrams = new HashMap<>();\n \n try {\n String cnts = IvyFile.loadFile(ins);\n CompilationUnit cu = JcompAst.parseSourceFile(cnts);\n words = handleDocumentText(cnts);\n kgrams = buildKgramCounts(cnts,cu);\n }\n catch (IOException e) {\n IvyLog.logI(\"Problem reading document file \" + name + \": \" + e);\n }\n \n if (words.size() > 0) {\n ++total_documents;\n for (String s : words.keySet()) {\n Integer v = document_counts.get(s);\n if (v == null) document_counts.put(s,1);\n else document_counts.put(s,v+1);\n }\n }\n if (kgrams.size() > 0) {\n ++total_kdocuments;\n for (String s : kgrams.keySet()) {\n Integer v = kgram_counts.get(s);\n if (v == null) kgram_counts.put(s,1);\n else kgram_counts.put(s,v+1);\n }\n }\n}", "private TextAnnotation parseSingleACEFile(String section, String fileName) {\n ACEDocument doc;\n\n // TODO: Static field might cause issue if we try to parse both versions in parallel.\n ReadACEAnnotation.is2004mode = this.is2004mode;\n\n try {\n File sectionDir = new File(this.aceCorpusHome + File.separator + section);\n doc = fileProcessor.processAceEntry(sectionDir, fileName);\n } catch (Exception ex) {\n logger.warn(\"Error while reading document - \" + fileName, ex);\n return null;\n }\n\n //logger.info(\"Parsing file - \" + fileName);\n\n // Adding `section/fileName` as textId for annotation.\n String textId = fileName.substring(fileName.indexOf(section + File.separator));\n TextAnnotation ta =\n taBuilder.createTextAnnotation(\n this.corpusId,\n textId,\n doc.contentRemovingTags);\n try {\n stanfordTrueCaseHandler.addView(ta);\n }\n catch (Exception e){\n e.printStackTrace();\n }\n View trueCaseView = ta.getView(\"STANFORD_TRUE_CASE\");\n String resText = doc.contentRemovingTags;\n char[] resTextChar = resText.toCharArray();\n int consIdx = 0;\n List<Constituent> tokens = ta.getView(ViewNames.TOKENS).getConstituents();\n for (int i = 0; i < resText.length(); i++){\n if (resTextChar[i] == ' ' || resTextChar[i] == '\\t' || resTextChar[i] == '\\r'){\n continue;\n }\n String curToken = tokens.get(consIdx).toString();\n if (trueCaseView.getConstituentsCovering(tokens.get(consIdx)).size() > 0){\n String trueCaseCurToken = trueCaseView.getConstituentsCovering(tokens.get(consIdx)).get(0).getLabel();\n if (curToken.length() == trueCaseCurToken.length()){\n curToken = trueCaseCurToken;\n }\n else{\n if (trueCaseCurToken.equals(\"U.S.\") && curToken.equals(\".\")){\n i = i - 3;\n curToken = trueCaseCurToken;\n }\n }\n }\n int curTokenLength = curToken.length();\n for (int j = i; j < i + curTokenLength - 1; j++){\n if (j == resText.length()){\n //break;\n }\n resTextChar[j] = curToken.charAt(j - i);\n }\n consIdx++;\n i = i + curTokenLength - 1;\n }\n resText = new String(resTextChar);\n String fileNameTransformed = fileName.replace(File.separator, \"/\");\n String[] fileNameGroup = fileNameTransformed.split(\"/\");\n String groupName = fileNameGroup[fileNameGroup.length - 2];\n if (groupName.equals(\"bn\")) {\n ta =\n taBuilder.createTextAnnotation(\n this.corpusId,\n textId,\n resText);\n }\n // Add metadata attributes to the generated Text Annotation.\n if (doc.metadata != null) {\n for (String metadataKey : doc.metadata.keySet()) {\n String value = doc.metadata.get(metadataKey);\n if (!value.isEmpty()) {\n ta.addAttribute(metadataKey, value);\n }\n }\n }\n\n File file = new File( fileName );\n this.addEntityViews(ta, doc.aceAnnotation, file);\n this.addEntityRelations(ta, doc.aceAnnotation, file);\n\n // TODO: Pending Event, TimeEx and Value Views\n\n return ta;\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}", "@Override\n public void textFileLoaded(File file, int wc, String contents)\n {\n cur_file = file;\n this.action_panel.setWordCount(wc);\n \n new Thread(new MarkdownProcessor(file, this)).start();\n }", "public static void main(final String[] args) throws IOException, TikaException, SAXException {\n\t File file = new File(args[0]);\n\n Tika tika = new Tika();\n \n //detecting the file type using detect method\n String filetype = tika.detect(file);\n //System.out.println(filetype);\n \n //Parser method parameters\n //Parser parser = new AutoDetectParser();\n //Parser parser = new DcXMLParser();\n Parser parser = new Eml211Parser();\n \n BodyContentHandler handler = new BodyContentHandler();\n Metadata metadata = new Metadata();\n FileInputStream inputstream = new FileInputStream(file);\n ParseContext context = new ParseContext();\n \n parser.parse(inputstream, handler, metadata, context);\n \n //System.out.println(handler.toString());\n \n System.out.println(\"Extracting Metadata of the document: \");\n //getting the list of all meta data elements \n String[] metadataNames = metadata.names();\n \n for(String name : metadataNames) {\t\t \n System.out.println(name + \": \"+ metadata.get(name));\n } \n }", "public void process (String text) {\n\t\tProperties props = new Properties();\n\t\tprops.put(\"annotators\", \"tokenize, ssplit, pos, lemma, ner, parse, dcoref\");\n\t\tStanfordCoreNLP pipeline = new StanfordCoreNLP(props);\n\t\tAnnotation document = new Annotation(text);\n\t\tpipeline.annotate(document);\n\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class);\n\t\tfor(CoreMap sentence: sentences) {\n\t\t\tsgs.add(sentence.get(CollapsedCCProcessedDependenciesAnnotation.class));\n\t\t}\n\t\tccg = document.get(CorefChainAnnotation.class);\n\t}", "public void read(String filename) throws IOException {\n // open the file\n BufferedReader r = new BufferedReader(new FileReader(filename));\n\n // load the number of terms\n int size = Integer.parseInt(r.readLine());\n\n // must divide by load factor (0.75) to not need to rehash\n index = new HashMap((int) (size / .75) + 1);\n\n // temporary variables\n String line;\n StringTokenizer tokens;\n String word;\n HashMap docList;\n String docid;\n int[] fArray;\n int lineNumber = 1;\n\n // while there are more lines in the document\n while ((line = r.readLine()) != null) {\n // increment the line number\n lineNumber++;\n\n // the word is the only thing on the line\n word = line;\n\n // load all documents containign this term\n docList = new HashMap();\n index.put(word, docList);\n\n line = r.readLine();\n while (line != null && !line.equals(\"\")) {\n fArray = new int[1];\n\n docid = line;\n fArray[0] = Integer.parseInt(r.readLine());\n\n docList.put(docid, fArray);\n line = r.readLine();\n }\n }\n\n // close the file\n r.close();\n }", "public void readFile(String filename){\n\t\ttry{\n\t\t\tBufferedReader bf = new BufferedReader(new FileReader(filename));\n\t\t\tString line;\n\t\t\tString[] categories = new String[5];\n\t\t\tline = bf.readLine();\n\t\t\tint[] pointValues = new int[5];\n\t\t\tboolean FJ = false;\n\t\t\t\n\t\t\t// Read the first line\n\t\t\tint index = 0;\n\t\t\tint catnum = 0;\n\t\t\twhile(catnum < 5){\n\t\t\t\tcategories[catnum] = readWord(line, index);\n\t\t\t\tindex += categories[catnum].length();\n\t\t\t\tif(index == line.length()-1){\n\t\t\t\t\tSystem.out.println(\"Error: Too few categories.\");\n\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t}\n\t\t\t\tfor(int i = 0; i < catnum; i++){\n\t\t\t\t\tif(categories[i].equals(categories[catnum])){\n\t\t\t\t\t\tSystem.out.println(\"Error: Duplicate categories.\");\n\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(catnum < 4)\n\t\t\t\t\tindex += 2;\n\t\t\t\tcatnum++;\n\t\t\t}\n\t\t\tif(index < line.length()-1){\n\t\t\t\tSystem.out.println(\"Error: Too many categories.\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\t\n\t\t\tCategory cat1, cat2, cat3, cat4, cat5, cat6;\n\t\t\tcat1 = new Category(categories[0]);\n\t\t\tcat2 = new Category(categories[1]);\n\t\t\tcat3 = new Category(categories[2]);\n\t\t\tcat4 = new Category(categories[3]);\n\t\t\tcat5 = new Category(categories[4]);\n\t\t\tcat6 = new Category(\"FJ\");\n\n\t\t\t// Read the second line\n\t\t\tline = bf.readLine();\n\t\t\t//System.out.println(line);\n\t\t\tindex = 0;\n\t\t\tint pointnum = 0;\n\t\t\twhile(pointnum < 5){\n\t\t\t\tint point = 0;\n\t\t\t\ttry{\n\t\t\t\t\tpoint = Integer.parseInt(readWord(line, index));\n\t\t\t\t\tindex += (readWord(line, index)).length();\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t\tSystem.out.println(\"Error: point value not integer.\");\n\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpointValues[pointnum] = point;\n\t\t\t\tfor(int i = 0; i < pointnum; i++){\n\t\t\t\t\tif(pointValues[pointnum] == pointValues[i]){\n\t\t\t\t\t\tSystem.out.println(\"Error: Duplicate point values\");\n\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(pointnum <4)\n\t\t\t\t\tindex += 2;\n\t\t\t\tpointnum++;\n\t\t\t}\n\t\t\tif(index < line.length()-1){\n\t\t\t\tSystem.out.println(\"Error: Too many point values.\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\t\n\t\t\t// Read in the questions\n\t\t\tString q=\"\";\n\t\t\tString a=\"\";\n\t\t\tString category=\"\";\n\t\t\tint point=0;\n\t\t\tint colonNumber = 0;\n\t\t\tQuestion question = new Question(0, \"\", \"\");\n\t\t\t\n\t\t\twhile((line = bf.readLine())!= null && line.length() != 0){\n\t\t\t\tindex = 0;\n\t\t\t\t// New question, initialize all vars\n\t\t\t\tif(line.substring(0,2).equals(\"::\")){\n\t\t\t\t\t// Add the previous question\n\t\t\t\t\tif(question.getPoint() != 0){\n\t\t\t\t\t\tif(category.equals(cat1.getName())){\n\t\t\t\t\t\t\tcat1.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(cat2.getName())){\n\t\t\t\t\t\t\tcat2.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(cat3.getName())){\n\t\t\t\t\t\t\tcat3.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(cat4.getName())){\n\t\t\t\t\t\t\tcat4.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(cat5.getName())){\n\t\t\t\t\t\t\tcat5.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(\"FJ\")){\n\t\t\t\t\t\t\tcat6.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tSystem.out.println(\"Error: Wrong category name.\");\n\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ta=\"\";\n\t\t\t\t\tq=\"\";\n\t\t\t\t\tcategory=\"\";\n\t\t\t\t\tpoint = 0;\n\t\t\t\t\tindex += 2;\n\t\t\t\t\tcolonNumber = 1;\n\t\t\t\t\tquestion = new Question(0, \"\", \"\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// If FJ cont'd\n\t\t\t\telse{\n\t\t\t\t\tif(category.equals(\"FJ\")){\n\t\t\t\t\t\twhile(index < line.length()){\n\t\t\t\t\t\t\tswitch(colonNumber){\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tq += readWord(line, index);\n\t\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\t\tquestion.setQuestion(q);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\ta += readWord(line, index);\n\t\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\t\tquestion.setAnswer(a);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error: Format error.\");\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(colonNumber < 3 && index < line.length()-1 && line.substring(index, index+2).equals(\"::\")){\n\t\t\t\t\t\t\t\tindex+=2;\n\t\t\t\t\t\t\t\tcolonNumber++;\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\t// FJ starts\n\t\t\t\tif(readWord(line, index).equals(\"FJ\")){\n\t\t\t\t\tif(FJ){\n\t\t\t\t\t\tSystem.out.println(\"Error: Multiple final jeopardy questions.\");\n\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t}\n\t\t\t\t\tFJ = true;\n\t\t\t\t\tpoint = -100;\n\t\t\t\t\tcategory = \"FJ\";\n\t\t\t\t\tindex += 4;\n\t\t\t\t\tcolonNumber++;\n\t\t\t\t\tif(index < line.length()-1)\n\t\t\t\t\t\tq += readWord(line, index);\n\t\t\t\t\tindex += q.length();\n\t\t\t\t\tindex += 2;\n\t\t\t\t\tif(index < line.length()-1)\n\t\t\t\t\t\ta += readWord(line, index);\n\t\t\t\t\tquestion.setPoint(point);\n\t\t\t\t\tquestion.setAnswer(a);\n\t\t\t\t\tquestion.setQuestion(q);\n\t\t\t\t}\n\t\t\t\t// Other questions\n\t\t\t\telse{\n\t\t\t\t\twhile(index < line.length()){\n\t\t\t\t\t\t//System.out.println(colonNumber);\n\t\t\t\t\t\tswitch(colonNumber){\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\tcategory = category + readWord(line, index);\n\t\t\t\t\t\t\tboolean right = false;\n\t\t\t\t\t\t\tfor(int i = 0; i < 5; i++){\n\t\t\t\t\t\t\t\tif(categories[i].equals(category))\n\t\t\t\t\t\t\t\t\tright = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!right){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error: Wrong category.\");\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tindex += category.length();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\tpoint = Integer.parseInt(readWord(line, index));\n\t\t\t\t\t\t\tright = false;\n\t\t\t\t\t\t\tfor(int i = 0; i < 5; i++){\n\t\t\t\t\t\t\t\tif(pointValues[i] == point)\n\t\t\t\t\t\t\t\t\tright = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!right){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error: Wrong point value.\");\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\tquestion.setPoint(point);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\tq = q + readWord(line, index);\n\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\tquestion.setQuestion(q);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\ta = a+ readWord(line, index);\n\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\tquestion.setAnswer(a);\n\t\t\t\t\t\t\tif(index < line.length()){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error: Format error.\");\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tSystem.out.println(\"Error: Format error.\");\n\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(colonNumber < 4 && index < line.length()-1 && line.substring(index, index+2).equals(\"::\")){\n\t\t\t\t\t\t\tindex += 2;\n\t\t\t\t\t\t\tcolonNumber++;\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// Add the last question\n\t\t\tif(category.equals(cat1.getName())){\n\t\t\t\tcat1.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(cat2.getName())){\n\t\t\t\tcat2.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(cat3.getName())){\n\t\t\t\tcat3.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(cat4.getName())){\n\t\t\t\tcat4.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(cat5.getName())){\n\t\t\t\tcat5.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(\"FJ\")){\n\t\t\t\tcat6.addQuestion(question);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Error: Wrong category name.\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\t\n\t\t\tmCategories.add(cat1);\n\t\t\tmCategories.add(cat2);\n\t\t\tmCategories.add(cat3);\n\t\t\tmCategories.add(cat4);\n\t\t\tmCategories.add(cat5);\n\t\t\tmCategories.add(cat6);\n\t\t\t\n\t\t\tbf.close();\n\t\t}\n\t\t\n\t\tcatch(IOException ioe){\n\t\t\tSystem.out.println(ioe);\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t}", "public LexAnnotator(File termFile) {\n this(Util.readLines(termFile)); \n }", "public String[] detectPOSTags(String[] tokens) throws IOException {\n\t\ttry (InputStream modelIn = new FileInputStream(\"en-pos-maxent.bin\")) {\r\n\r\n\t\t\t// Initialize POS tagger tool\r\n\t\t\tPOSTaggerME myCategorizer = new POSTaggerME(new POSModel(modelIn));\r\n\r\n\t\t\t// Tag sentence.\r\n\t\t\tString[] posTokens = myCategorizer.tag(tokens);\r\n\t\t\tSystem.out.println(\"POS Tags : \" + Arrays.stream(posTokens).collect(Collectors.joining(\" | \")));\r\n\r\n\t\t\treturn posTokens;\r\n\r\n\t\t}\r\n\t}", "public void tagDocument (Document doc) {\n\t\tmene.newDocument();\n\t\tVector textSegments = doc.annotationsOfType (\"TEXT\");\n\t\tIterator it = textSegments.iterator ();\n\t\twhile (it.hasNext ()) {\n\t\t\tAnnotation ann = (Annotation)it.next ();\n\t\t\tSpan textSpan = ann.span ();\n\t\t\tSentenceSplitter.split (doc, textSpan);\n\t\t}\n\t\tVector sentences = doc.annotationsOfType (\"sentence\");\n\t\tIterator is = sentences.iterator ();\n\t\twhile (is.hasNext ()) {\n\t\t\tAnnotation sentence = (Annotation)is.next ();\n\t\t\tSpan sentenceSpan = sentence.span();\n\t\t\tTokenizer.tokenize (doc, sentenceSpan);\n\t\t\tLexicon.annotateWithDefinitions(doc, sentenceSpan.start(), sentenceSpan.end());\n\t\t\ttag (doc, sentenceSpan);\n\t\t}\n\t}", "@Test\n public void testParse()\n {\n System.out.println(\"parse\");\n System.out.println(\" Test simple case\");\n final File file = new File(\"src/test/data/test.example.txt\");\n final Lexer lexer = new Lexer();\n final Token token = lexer.analyze(file);\n Model model = token.parse();\n assertTrue(model.isCompiled());\n System.out.println(\" Test complex case\");\n final File complexFile = new File(\"src/test/data/balancer.example.txt\");\n final Token complexToken = lexer.analyze(complexFile);\n model = complexToken.parse();\n assertTrue(model.isCompiled());\n }", "public static void readTechSentence(FileProcessor fp) {\n\t\tHelper.getSentence(fp, \"src/troubleShootSearch/dSeaGate/productC.txt\", techSentence);\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n\t\tInputStream modelIn = new FileInputStream(\"en-token.bin\");\n\n\t\ttry {\n\t\t\tTokenizerModel model = new TokenizerModel(modelIn);\n\t\t\tTokenizer tokenizer = new TokenizerME(model);\n\t\t\tString txt1 = readFile(\"files/job_1.txt\", null);\n\t\t\ttokenize(txt1,tokenizer);\n\t\t\t\n\t\t//\tString txt2 = readFile(\"files/job_1.html\", null);\n\t\t//\ttokenize(txt2,tokenizer);\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (modelIn != null) {\n\t\t\t\ttry {\n\t\t\t\t\tmodelIn.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public Map<String, String> partsOfSpeech(String input) {\n Map<String, String> output = new HashMap();\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // traverse words in the document\n document.get(CoreAnnotations.TokensAnnotation.class).stream().forEach((token) -> {\n // this is the text of the token\n String word = token.get(CoreAnnotations.TextAnnotation.class);\n // this is the POS tag of the token\n String pos = token.get(CoreAnnotations.PartOfSpeechAnnotation.class);\n output.put(word, pos);\n });\n\n return output;\n }", "@Override\r\npublic Object produceValue(Annotation np, Document doc)\r\n{\n SortedSet<Integer> quoteLocations = new TreeSet<Integer>();\r\n Pattern p = Pattern.compile(\"\\\"|''|``|\\u201C|\\u201D\");\r\n\r\n String text = doc.getText();\r\n Matcher m = p.matcher(text);\r\n\r\n boolean inQuote = false;\r\n while (m.find()) {\r\n int start = m.start();\r\n if (inQuote && (text.substring(start).startsWith(\"``\") || text.substring(start).startsWith(\"\\u201C\"))) {\r\n // We have an opening quote; Make sure the previous quote is closed\r\n quoteLocations.add((start - 1));\r\n inQuote = false;\r\n }\r\n quoteLocations.add((start));\r\n inQuote = !inQuote;\r\n }\r\n // System.out.println(\"Quote locations: \"+quoteLocations);\r\n\r\n // Figure out which noun corresponds to which quote\r\n AnnotationSet sent = doc.getAnnotationSet(Constants.SENT);\r\n Iterator<Integer> quoteIter = quoteLocations.iterator();\r\n HashMap<Integer, Annotation> reporters = new HashMap<Integer, Annotation>();\r\n HashMap<Integer, Annotation> companies = new HashMap<Integer, Annotation>();\r\n HashMap<Integer, Annotation> sentReporter = new HashMap<Integer, Annotation>();\r\n HashMap<Integer, Annotation> compReporter = new HashMap<Integer, Annotation>();\r\n int counter = 1;\r\n while (quoteIter.hasNext()) {\r\n int qStart = quoteIter.next();\r\n if (!quoteIter.hasNext()) {\r\n break;\r\n }\r\n int qEnd = quoteIter.next() + 1;\r\n\r\n AnnotationSet sentences = sent.getOverlapping(qStart, qEnd);\r\n\r\n // Three cases for the size of the sentences set\r\n Annotation match, compMatch;\r\n if (sentences.size() < 1) {\r\n System.out.println(\"Quote is not covered by any sentence:\");\r\n int beg = qStart - 15;\r\n beg = beg < 0 ? 0 : beg;\r\n int en = qStart + 15;\r\n en = en >= text.length() ? text.length() - 1 : en;\r\n System.out.println(Utils.getAnnotText(beg, en, text));\r\n System.out.println(\"Position \" + qStart);\r\n match = Annotation.getNullAnnot();\r\n compMatch = Annotation.getNullAnnot();\r\n // throw new RuntimeException(\"Quote is not covered by any sentence\");\r\n }\r\n else if (sentences.size() == 1) {\r\n Annotation s = sentences.getFirst();\r\n // System.out.println(\"Sent: \"+Utils.getAnnotText(s, text));\r\n if (s.properCovers(qStart, qEnd)) {\r\n match = findReporter(qStart, qEnd, s, doc);\r\n compMatch = findCompany(qStart, qEnd, s, doc);\r\n if (match.equals(Annotation.getNullAnnot())) {\r\n match = findReportCont(sentReporter, s, doc);\r\n compMatch = findReportCont(compReporter, s, doc);\r\n }\r\n }\r\n else {\r\n match = findReportCont(sentReporter, s, doc);\r\n compMatch = findReportCont(compReporter, s, doc);\r\n }\r\n sentReporter.put(Integer.decode(s.getAttribute(\"sentNum\")), match);\r\n compReporter.put(Integer.decode(s.getAttribute(\"sentNum\")), compMatch);\r\n }\r\n else {\r\n // The quoted string spans more than one sentence.\r\n Annotation beg = sentences.getFirst();\r\n // System.out.println(\"First sent: \"+Utils.getAnnotText(beg, text));\r\n Annotation end = sentences.getLast();\r\n // System.out.println(\"Last sent: \"+Utils.getAnnotText(end, text));\r\n match = Annotation.getNullAnnot();\r\n compMatch = Annotation.getNullAnnot();\r\n if (beg.getStartOffset() < qStart) {\r\n match = findReporter(qStart, qEnd, beg, doc);\r\n compMatch = findCompany(qStart, qEnd, beg, doc);\r\n }\r\n if (match.equals(Annotation.getNullAnnot()) && qEnd < end.getEndOffset()) {\r\n match = findReporter(qStart, qEnd, end, doc);\r\n compMatch = findCompany(qStart, qEnd, end, doc);\r\n }\r\n if (match.equals(Annotation.getNullAnnot())) {\r\n match = findReportCont(sentReporter, beg, doc);\r\n compMatch = findCompany(qStart, qEnd, end, doc);\r\n }\r\n sentReporter.put(Integer.parseInt(beg.getAttribute(\"sentNum\")), match);\r\n sentReporter.put(Integer.parseInt(end.getAttribute(\"sentNum\")), match);\r\n compReporter.put(Integer.parseInt(beg.getAttribute(\"sentNum\")), compMatch);\r\n compReporter.put(Integer.parseInt(end.getAttribute(\"sentNum\")), compMatch);\r\n\r\n }\r\n reporters.put(counter, match);\r\n companies.put(counter, compMatch);\r\n counter += 2;\r\n\r\n // System.out.println(\"Quote: \"+Utils.getAnnotText(qStart, qEnd, text));\r\n // if(!match.equals(Annotation.getNullAnnot())){\r\n // System.out.println(\"Match: \"+Utils.getAnnotText(match, text));\r\n // }else{\r\n // System.out.println(\"no match!\");\r\n // }\r\n }\r\n int initial = quoteLocations.size();\r\n\r\n AnnotationSet nps = doc.getAnnotationSet(Constants.NP);\r\n for (Annotation a : nps.getOrderedAnnots()) {\r\n int s = a.getStartOffset();\r\n quoteLocations = quoteLocations.tailSet(s);\r\n int numQuotes = initial - quoteLocations.size();\r\n\r\n // System.err.println(numQuotes);\r\n if (numQuotes % 2 == 0) {\r\n a.setProperty(this, -1);\r\n a.setProperty(Property.AUTHOR, Annotation.getNullAnnot());\r\n a.setProperty(Property.COMP_AUTHOR, Annotation.getNullAnnot());\r\n }\r\n else {\r\n a.setProperty(this, numQuotes);\r\n a.setProperty(Property.AUTHOR, reporters.get(numQuotes));\r\n a.setProperty(Property.COMP_AUTHOR, companies.get(numQuotes));\r\n // if(FeatureUtils.isPronoun(a, annotations, text)&&FeatureUtils.getPronounPerson(FeatureUtils.getText(a,\r\n // text))==1\r\n // &&FeatureUtils.NumberEnum.SINGLE.equals(FeatureUtils.getNumber(a, annotations, text))){\r\n // Annotation repo = reporters.get(new Integer(numQuotes));\r\n // if(repo==null||repo.equals(Annotation.getNullAnnot())){\r\n // Annotation thisSent = sent.getOverlapping(a).getFirst();\r\n // System.out.println(\"*** No author in \"+Utils.getAnnotText(thisSent, text+\"***\"));\r\n // }\r\n // }\r\n }\r\n }\r\n // System.out.println(\"End of inquote\");\r\n\r\n return np.getProperty(this);\r\n}", "private void parseFile(Project p, File f, ImportSettings settings, int pass)\n throws ImportException {\n\n\n try {\n BufferedInputStream bs = new BufferedInputStream(new FileInputStream(f));\n Lexer l = new Lexer(bs, f.getAbsolutePath());\n TokenCollection toks = l.lex();\n Parser px = new Parser();\n CompilationUnitNode cu = px.parse(toks, l.StringLiterals);\n parsedElements.add(cu);\n } catch (FeatureNotSupportedException e) {\n //throw new ImportException(\"Error parsing file: \" + f.getAbsolutePath() + \" due to: \"+e.getMessage());\n System.out.println(\"Error parsing file: \" + f.getAbsolutePath() + \" due to: \"+e.getMessage());\n } catch (Exception e) {\n// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n// throw new ImportException(\"Error parsing file: \" + f.getAbsolutePath());\n System.out.println(\"Error parsing file: \" + f.getAbsolutePath());\n }\n\n }", "public static List<Sentence> readFile(String filename) {\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tList<Sentence> sentences = new ArrayList<>(); \n\t\ttry {\n//\t\t\tBufferedReader reviews = new BufferedReader(new FileReader(filename));\n\t\t\tFile reviews = new File(filename);\n\t Scanner scnr = new Scanner(reviews);\n\t while(scnr.hasNextLine()){\n\t String line = scnr.nextLine();\n\t //split line on score and text\n\t int score = Integer.parseInt(line.substring(0, 2).trim());//converting to int\n\t String text = line.substring(2).trim();\n//\t System.out.println(\"Score: \" + score + \" text: \" + text);\n\t if(score >= -2 && score <= 2) {\n\t \tsentences.add(new Sentence(score, text));\n\t }\n\t }\n\t scnr.close();//close scanner\n\t\t}catch(Exception ex) {\n\t\t\tSystem.out.println(\"Ooops: \" + ex.getMessage());\n\t\t}\n\t\treturn sentences; // this line is here only so this code will compile if you don't modify it\n\n\t}", "public void computeParagraph(){\r\n\r\n\t\tstrBuff = new StringBuffer();\r\n\r\n\t\t//For else for ER2 rule of inserting the first letter of my last name twice before each consonant\r\n\t\tfor(int i = 0; i < paragraph.length(); i++){\r\n\r\n\t\t\tif(paragraph.charAt(i) == 'a' || paragraph.charAt(i) == 'e' || paragraph.charAt(i) == 'i'\r\n\t\t\t\t|| paragraph.charAt(i) == 'o' || paragraph.charAt(i) == 'u' || paragraph.charAt(i) == 'A'\r\n\t\t\t\t|| paragraph.charAt(i) == 'E' || paragraph.charAt(i) == 'I' || paragraph.charAt(i) == 'O'\r\n\t\t\t\t|| paragraph.charAt(i) == 'U' || paragraph.charAt(i) == ' ' || paragraph.charAt(i) == '.'\r\n\t\t\t\t|| paragraph.charAt(i) == '!' || paragraph.charAt(i) == '?'){\r\n\t\t\t\tstrBuff.append(paragraph.charAt(i));\r\n\t\t\t}\r\n\r\n\t\t\telse{\r\n\t\t\t\tstrBuff.append(\"OO\");\r\n\t\t\t\tstrBuff.append(paragraph.charAt(i));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tnewParagraph = strBuff.toString();\r\n\r\n\t\tcount = 0;\r\n\r\n\t\t//For for ER2 rule of counting the number of characters in the initial text excluding the number of vowels\r\n\t\tfor(int i = 0; i < paragraph.length(); i++){\r\n\t\t\tif(paragraph.charAt(i) != 'a' && paragraph.charAt(i) != 'e' && paragraph.charAt(i) != 'i'\r\n\t\t\t\t&& paragraph.charAt(i) != 'o' && paragraph.charAt(i) != 'u' && paragraph.charAt(i) != 'A'\r\n\t\t\t\t&& paragraph.charAt(i) != 'E' && paragraph.charAt(i) != 'I' && paragraph.charAt(i) != 'O'\r\n\t\t\t\t&& paragraph.charAt(i) != 'U'){\r\n\t\t\t\t\tcount++;\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t}", "public static ArrayList<String> sentenceTokenizer(String filename) throws FileNotFoundException{\n \n ArrayList<String> sentenceList = new ArrayList<String>();\n \n Scanner sc = new Scanner(new File(filename));\n \n String token;\n String sentence = \"\";\n while(sc.hasNext()){\n \n token = sc.next();\n sentence += \" \" + token + \" \";\n \n if(!sc.hasNext()){\n sentenceList.add(sentence.trim());\n break;\n }\n \n if(token.endsWith(\".\")){\n sentence = sentence.trim();\n sentenceList.add(sentence);\n sentence = \"\";\n }\n \n }\n \n sc.close();\n \n return sentenceList;\n \n }", "private void processContentCn() {\n if (this.content == null || this.content.equals(\"\")) {\r\n _logger.error(\"{} - The sentence is null or empty\", this.traceId);\r\n }\r\n\r\n // process input using ltp(Segmentation, POS, DP, SRL)\r\n this.ltp = new LTP(this.content, this.traceId, this.setting);\r\n }", "public String parse(File file);", "public NesCDocScanner( IMultiPreferenceProvider preferences ) {\r\n super();\r\n \r\n this.preferences = preferences;\r\n \r\n buildRules();\r\n }", "public static void readDatafiles() throws FileNotFoundException {\n int docNumber = 0;\n\n while(docNumber<totaldocument) { // loop will run until all 0 - 55 speech data is read\n String tempBuffer = \"\";\n\n Scanner sc_obj = new Scanner(new File(\"./inputFiles/speech_\"+docNumber+\".txt\"));\n sc_obj.nextLine(); //skip the first line of every document\n\n while(sc_obj.hasNext()) {\n tempBuffer = sc_obj.next();\n tempBuffer = tempBuffer.replaceAll(\"[^a-zA-Z]+\",\" \");\n\n String[] wordTerm = tempBuffer.split(\" |//.\"); // the read data will convert into single word from whole stream of characters\n // it will split according to white spaces . - , like special characters\n\n for (int i=0; i < wordTerm.length; i++) {\n\n String term = wordTerm[i].toLowerCase();\t\t//each splitted word will be converted into lower case\n term = RemoveSpecialCharacter(term);\t\t\t// it will remove all the characters apart from the english letters\n term = removeStopWords(term);\t\t\t\t\t// it will remove the stopWords and final version of the term in the form of tokens will form\n\n if(!term.equalsIgnoreCase(\"\") && term.length()>1) {\n term = Lemmatize(term);\t\t\t\t\t//all the words in the form of tokens will be lemmatized\n //increment frequency of word if it is already present in dictionary\n if(dictionary.containsKey(term)) {\t\t//all the lemmatized words will be placed in HashMap dictionary\n List<Integer> presentList = dictionary.get(term);\n int wordFrequency = presentList.get(docNumber);\n wordFrequency++;\n presentList.set(docNumber, wordFrequency);\t\t//frequency of all the lemmatized words in dictionary is maintained \t\t\t\t\t\t\t\t\t//i.e: Word <2.0,1.0,3.0,0.0 ...> here hashmap<String,List<Double> is used\n }\t\t\t\t\t\t\t\t\t\t//the 0th index shows the word appared 2 times in doc 0 and 1 times in doc 1 and so forth..\n else { // if word was not in the dictionary then it will be added\n // if word was found in 5 doc so from 0 to 4 index representing doc 0 to doc 4 (0.0) will be placed\n List<Integer>newList = new ArrayList<>();\n for(int j=0; j<57; j++) {\n if(j != docNumber)\n newList.add(0);\n else\n newList.add(1);\n }\n dictionary.put(term, newList);\n }\n }\n }\n\n }\n docNumber++;\n }\n }", "public abstract WordAudioDocument convertToAudioDocument(TextDocument doc) throws IOException;", "public static CV parse(String nom, String prenom, String mail, String tel,File file) throws IOException{\n PDDocument doc;\n CV moncv;\n\n doc = PDDocument.load(file);\n PDFTextStripper stripper = new PDFTextStripper();\n String text = stripper.getText(doc);\n if(text.trim().equals(\"\")) {\n throw new IOException(\"Format non valide\");\n //System.out.println(\"VIDE\");\n }\n String[] l = text.split(\"\\n\");\n\n //On récupère tous les mots clées et competences du PDF\n ArrayList<String> competences= getCompetences(l);\n ArrayList<String> allkeyword = getAllKeyWord(l);\n\n //Creation du CV\n moncv= new CV(String.valueOf(cpt++),\n prenom,\n nom,\n getAge(l),\n mail,\n tel,\n competences,\n allkeyword);\n\n doc.close();\n return moncv;\n }", "public static void main(String[] args) throws IOException {\n\t\t\n\t\tQueue<String> nextSlang = initializeQueue();\t//Queue of slang phrases\n\t\t\n\t\tBufferedReader in = getFileContents(args[0]);\n\t\t\n\t\tboolean isEvenPunctuation = true;\t\t\t\t//Must start as true because the value is flipped upon first inspection\n\t\t\n\t\tString input;\n\t\twhile((input = in.readLine()) != null){\n\t\t\tfor(Character c : input.toCharArray()){\n\t\t\t\tswitch(c){\t\t\t\t\t\t\t\t//Easily expendable to new trigger characters\n\t\t\t\t\tcase '.':\n\t\t\t\t\tcase '!':\n\t\t\t\t\tcase '?':\n\t\t\t\t\t\tisEvenPunctuation = !isEvenPunctuation;\n\n\t\t\t\t\t\tif(isEvenPunctuation){\n\t\t\t\t\t\t\tSystem.out.print(nextSlang.peek());\n\t\t\t\t\t\t\tnextSlang.add(nextSlang.poll());\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} \t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tSystem.out.print(c);\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\t\n\t\t\t\t\n\t\t}\n\t}", "public DOECorpus loadFromHTML() {\n\t\tFile[] files = getFileList();\n\t\t\n\t\tSystem.out.println(\"Found \" + files.length + \" documents in \" + this.sourceDir);\n\t\tSystem.out.println(\"Parsing their contents...\");\n\t\tint totalLineCount = 0;\n\t\t\n\t\tDOECorpus corpus = new DOECorpus();\n\t\t\n\t\tfor(File file : files) {\n\t\t\ttry {\n\t\t\t\tDocument htmlDoc = Jsoup.parse(file, null);\n\t\t\t\tString originalLocation = htmlDoc.location();\n\t\t\t\tString shortTitle = htmlDoc.title();\n\t\t\t\tString shortShortTitle = \"\";\n\t\t\t\tString cameronNumber = \"\";\n\t\t\t\t\n\t\t\t\tDOECorpusDocument corpusDoc = new DOECorpusDocument(shortTitle, shortShortTitle, cameronNumber, originalLocation);\n\t\t\t\t\t\t\n\t\t\t\tElements paragraphElements = htmlDoc.select(\"p\");\n\t\t\t\tDOECorpusLine lineBefore = null;\n\t\t\t\t\n\t\t\t\tfor(Element p : paragraphElements) {\n\t\t\t\t\tString text = p.text();\n\t\t\t\t\t\n\t\t\t\t\tif(ignoreLine(text))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\telse if(text.startsWith(SHORT_SHORT_TITLE))\n\t\t\t\t\t\tshortShortTitle = text.replace(SHORT_SHORT_TITLE, \"\");\n\t\t\t\t\t\n\t\t\t\t\telse if(text.startsWith(CAMERON_NUMBER))\n\t\t\t\t\t\tcameronNumber = text.replace(CAMERON_NUMBER, \"\");\n\t\t\t\t\t\n\t\t\t\t\telse if(text.startsWith(\"[\")) {\n\t\t\t\t\t\tString lineID = \"\";\n\t\t\t\t\t\tString line = \"\";\n\t\t\t\t\t\tPattern linePattern = Pattern.compile(\"\\\\[([0-9]+\\\\s\\\\([0-9a-zA-Z\\\\.,\\\\s\\\\(\\\\)]+\\\\))\\\\]\\\\s(.*)\");\n\t\t\t\t\t\tMatcher m = linePattern.matcher(text);\n\t\t\t\t\t\tif (m.matches()) {\n\t\t\t\t\t\t lineID = m.group(1).trim();\n\t\t\t\t\t\t line = m.group(2).trim();\n\t\t\t\t\t\t \n\t\t\t\t\t\t DOECorpusLine newLine = new DOECorpusLine(lineID, line, shortTitle);\n\t\t\t\t\t\t newLine.setLineBefore(lineBefore);\n\t\t\t\t\t\t if(lineBefore != null)\n\t\t\t\t\t\t\t lineBefore.setLineAfter(newLine);\n\t\t\t\t\t\t corpusDoc.addLine(newLine);\n\t\t\t\t\t\t lineBefore = newLine;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(!text.isEmpty())\t// This should be the full title\n\t\t\t\t\t\tcorpusDoc.setFullTitle(text);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttotalLineCount += corpusDoc.getLineCount();\n\t\t\t\tcorpus.addDocument(corpusDoc);\n\t\t\t\t\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\tSystem.out.println(\"Parsing their contents...DONE\");\n\t\tSystem.out.println(\"Total number of lines: \" + totalLineCount);\n\t\t\n\t\tSystem.out.println(\"Splitting lines into sentences...\");\n\t\tcorpus.splitIntoSentences();\n\t\tSystem.out.println(\"Splitting lines into sentences...DONE\");\n\t\t\n\t\tSystem.out.println(\"Tokenizing sentences...\");\n\t\tcorpus.tokenize();\n\t\tSystem.out.println(\"Tokenizing sentences...DONE\");\n\t\tSystem.out.println(\"Total number of tokens: \" + corpus.getTokenCount());\n\t\tSystem.out.println(\"Total number of types: \" + corpus.getTypeCount());\n\t\tSystem.out.println(\"Total number of sentences: \" + corpus.getSentenceCount());\n\t\tSystem.out.println(\"Average sentence length: \" + corpus.getAvgSenLength());\n\t\tSystem.out.println(\"Minimum sentence length: \" + corpus.getMinSenLength());\n\t\tSystem.out.println(\"Maximum sentence length: \" + corpus.getMaxSenLength());\n\t\t\n\t\treturn corpus;\n\t}", "@Override\n public void startElement(String aUri, String aLocalName, String aName,\n Attributes aAttributes)\n throws SAXException\n {\n if (!inTextElement && TAG_TEI_DOC.equals(aName)) {\n if (useXmlId) {\n documentId = aAttributes.getValue(\"xml:id\");\n }\n else if (useFilenameId) {\n documentId = FilenameUtils.getName(currentResource.getPath()) + \"#\"\n + currentTeiElementNumber;\n }\n else {\n documentId = currentResource.getPath() + \"#\" + currentTeiElementNumber;\n }\n }\n else if (!inTextElement && TAG_TITLE.equals(aName)) {\n captureText = true;\n }\n else if (TAG_TEXT.equals(aName)) {\n captureText = true;\n inTextElement = true;\n }\n else if (inTextElement && (TAG_SUNIT.equals(aName) || \n (utterancesAsSentences && TAG_U.equals(aName)))) {\n sentenceStart = getBuffer().length();\n }\n else if (inTextElement && TAG_PARAGRAPH.equals(aName)) {\n paragraphStart = getBuffer().length();\n }\n else if (readNamedEntity && inTextElement && TAG_RS.equals(aName)) {\n NamedEntity ne = new NamedEntity(getJCas());\n ne.setBegin(getBuffer().length());\n ne.setValue(aAttributes.getValue(ATTR_TYPE));\n namedEntities.push(ne);\n }\n else if (readConstituent && inTextElement && TAG_PHRASE.equals(aName)) {\n if (constituents.isEmpty()) {\n ROOT root = new ROOT(getJCas());\n root.setConstituentType(\"ROOT\");\n constituents.push(new ConstituentWrapper(root));\n }\n \n Constituent constituent = new Constituent(getJCas());\n constituent.setConstituentType(aAttributes.getValue(ATTR_TYPE));\n constituent.setSyntacticFunction(aAttributes.getValue(ATTR_FUNCTION));\n constituents.push(new ConstituentWrapper(constituent));\n }\n else if (inTextElement\n && (TAG_WORD.equals(aName) || TAG_CHARACTER.equals(aName) || TAG_MULTIWORD\n .equals(aName))) {\n tokenStart = getBuffer().length();\n if (StringUtils.isNotEmpty(aAttributes.getValue(ATTR_POS))) {\n posTag = aAttributes.getValue(ATTR_POS);\n }\n else {\n posTag = aAttributes.getValue(ATTR_TYPE);\n }\n lemma = aAttributes.getValue(ATTR_LEMMA);\n }\n }", "private void indexDocument(File f) throws IOException {\n\n\t\tHashMap<String, StringBuilder> fm;\n\t\tif (!f.getName().equals(\".DS_Store\")) {\n\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\n\t\t\tString s = \"\";\n\t\t\twhile ((s = br.readLine()) != null) {\n\n\t\t\t\tString temp = \"\";\n\n\t\t\t\tif (s.contains(\"<DOC>\")) {\n\n\t\t\t\t\ts = br.readLine();\n\n\t\t\t\t\twhile (!s.contains(\"</DOC>\")) {\n\n\t\t\t\t\t\ttemp += s + \" \";\n\n\t\t\t\t\t\ts = br.readLine();\n\t\t\t\t\t}\n\n\t\t\t\t\tfm = parseTags(temp);\n\t\t\t\t\tindexDocumentHelper(fm);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\n\t}", "public ArrayList<String> makeSentences(String text) {\n \t\t/*\n \t\t * Quick check so we're not trying to split up an empty\n \t\t * String. This only happens right before the user types\n \t\t * at the end of a document and we don't have anything to\n \t\t * split, so return.\n \t\t */\n \t\tif (text.equals(\"\")) {\n \t\t\tArrayList<String> sents = new ArrayList<String>();\n \t\t\tsents.add(\"\");\n \t\t\treturn sents;\n \t\t}\n \t\t\n \t\t/**\n \t\t * Because the eosTracker isn't initialized until the TaggedDocument is,\n \t\t * it won't be ready until near the end of DocumentProcessor, in which\n \t\t * case we want to set it to the correct\n \t\t */\n \t\tthis.eosTracker = main.editorDriver.taggedDoc.eosTracker;\n \t\tthis.editorDriver = main.editorDriver;\n \t\t\n \t\tArrayList<String> sents = new ArrayList<String>(ANONConstants.EXPECTED_NUM_OF_SENTENCES);\n \t\tArrayList<String> finalSents = new ArrayList<String>(ANONConstants.EXPECTED_NUM_OF_SENTENCES);\n \t\tboolean mergeNext = false;\n \t\tboolean mergeWithLast = false;\n \t\tboolean forceNoMerge = false;\n \t\tint currentStart = 1;\n \t\tint currentStop = 0;\n \t\tString temp;\n \n \t\t/**\n \t\t * replace unicode format characters that will ruin the regular\n \t\t * expressions (because non-printable characters in the document still\n \t\t * take up indices, but you won't know they're there untill you\n \t\t * \"arrow\" though the document and have to hit the same arrow twice to\n \t\t * move past a certain point. Note that we must use \"Cf\" rather than\n \t\t * \"C\". If we use \"C\" or \"Cc\" (which includes control characters), we\n \t\t * remove our newline characters and this screws up the document. \"Cf\"\n \t\t * is \"other, format\". \"Cc\" is \"other, control\". Using \"C\" will match\n \t\t * both of them.\n \t\t */\n \t\ttext = text.replaceAll(\"\\u201C\",\"\\\"\");\n \t\ttext = text.replaceAll(\"\\u201D\",\"\\\"\");\n \t\ttext = text.replaceAll(\"\\\\p{Cf}\",\"\");\n \n \t\tint lenText = text.length();\n \t\tint index = 0;\n \t\tint buffer = editorDriver.sentIndices[0];\n \t\tString safeString = \"\";\n \t\tMatcher abbreviationFinder = ABBREVIATIONS_PATTERN.matcher(text);\n \t\t\n \t\t//================ SEARCHING FOR ABBREVIATIONS ================\n \t\twhile (index < lenText-1 && abbreviationFinder.find(index)) {\n \t\t\tindex = abbreviationFinder.start();\n \t\t\t\n \t\t\ttry {\n \t\t\t\tint abbrevLength = index;\n \t\t\t\twhile (text.charAt(abbrevLength) != ' ') {\n \t\t\t\t\tabbrevLength--;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif (ABBREVIATIONS.contains(text.substring(abbrevLength+1, index+1))) {\n \t\t\t\t\teosTracker.setIgnore(index+buffer, true);\n \t\t\t\t}\n \t\t\t} catch (Exception e) {}\n \t\t\t\n \t\t\tindex++;\n \t\t}\t\t\n \t\t\n \t\tMatcher sent = EOS_chars.matcher(text);\n \t\tboolean foundEOS = sent.find(currentStart); // xxx TODO xxx take this EOS character, and if not in quotes, swap it for a permanent replacement, and create and add an EOS to the calling TaggedDocument's eosTracker.\n \t\t\n \t\t/*\n \t\t * We want to check and make sure that the EOS character (if one was found) is not supposed to be ignored. If it is, we will act like we did not\n \t\t * find it. If there are multiple sentences with multiple EOS characters passed it will go through each to check, foundEOS will only be true if\n \t\t * an EOS exists in \"text\" that would normally be an EOS character and is not set to be ignored.\n \t\t */\n \t\t\n \t\tindex = 0;\n \t\tif (foundEOS) {\t\n \t\t\ttry {\n \t\t\t\twhile (index < lenText-1 && sent.find(index)) {\n \t\t\t\t\tindex = sent.start();\n \t\t\t\t\tif (!eosTracker.sentenceEndAtIndex(index+buffer)) {\n \t\t\t\t\t\tfoundEOS = false;\n \t\t\t\t\t} else {\n \t\t\t\t\t\tfoundEOS = true;\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\tindex++;\n \t\t\t\t}\n \t\t\t} catch (IllegalStateException e) {}\n \t\t}\n \t\t//We need to reset the Matcher for the code below\n \t\tsent = EOS_chars.matcher(text);\n \t\tsent.find(currentStart);\n \t\t\n \t\tMatcher sentEnd;\n \t\tMatcher citationFinder;\n \t\tboolean hasCitation = false;\n \t\tint charNum = 0;\n \t\tint lenTemp = 0;\n \t\tint lastQuoteAt = 0;\n \t\tint lastParenAt = 0;\n \t\tboolean foundQuote = false;\n \t\tboolean foundParentheses = false;\n \t\tboolean isSentence;\n \t\tboolean foundAtLeastOneEOS = foundEOS;\n \t\t\n \t\t/**\n \t\t * Needed otherwise when the user has text like below:\n \t\t * \t\tThis is my sentence one. This is \"My sentence?\" two. This is the last sentence.\n \t\t * and they begin to delete the EOS character as such:\n \t\t * \t\tThis is my sentence one. This is \"My sentence?\" two This is the last sentence.\n \t\t * Everything gets screwed up. This is because the operations below operate as expected only when there actually is an EOS character\n \t\t * at the end of the text, it expects it there in order to function properly. Now usually if there is no EOS character at the end it wouldn't\n \t\t * matter since the while loop and !foundAtLeastOneEOS conditional are executed properly, BUT as you can see the quotes, or more notably the EOS character inside\n \t\t * the quotes, triggers this initial test and thus the operation breaks. This is here just to make sure that does not happen.\n \t\t */\n \t\tString trimmedText = text.trim();\n \t\tint trimmedTextLength = trimmedText.length();\n \n \t\t//We want to make sure that if there is an EOS character at the end that it is not supposed to be ignored\n \t\tboolean EOSAtSentenceEnd = true;\n \t\tif (trimmedTextLength != 0) {\n \t\t\tEOSAtSentenceEnd = EOS.contains(trimmedText.substring(trimmedTextLength-1, trimmedTextLength)) && eosTracker.sentenceEndAtIndex(editorDriver.sentIndices[1]-1);\n \t\t} else {\n \t\t\tEOSAtSentenceEnd = false;\n \t\t}\n \t\t\n \t\t//Needed so that if we are deleting abbreviations like \"Ph.D.\" this is not triggered.\n \t\tif (!EOSAtSentenceEnd && (editorDriver.taggedDoc.watchForEOS == -1))\n \t\t\tEOSAtSentenceEnd = true;\n \n \t\twhile (foundEOS == true) {\n \t\t\tcurrentStop = sent.end();\n \t\t\t\n \t\t\t//We want to make sure currentStop skips over ignored EOS characters and stops only when we hit a true EOS character\n \t\t\ttry {\n \t\t\t\twhile (!eosTracker.sentenceEndAtIndex(currentStop+buffer-1) && currentStop != lenText) {\n \t\t\t\t\tsent.find(currentStop+1);\n \t\t\t\t\tcurrentStop = sent.end();\n \t\t\t\t}\n \t\t\t} catch (Exception e) {}\n \n \t\t\ttemp = text.substring(currentStart-1,currentStop);\n \t\t\tlenTemp = temp.length();\n \t\t\tlastQuoteAt = 0;\n \t\t\tlastParenAt = 0;\n \t\t\tfoundQuote = false;\n \t\t\tfoundParentheses = false;\n \t\t\t\n \t\t\tfor(charNum = 0; charNum < lenTemp; charNum++){\n \t\t\t\tif (temp.charAt(charNum) == '\\\"') {\n \t\t\t\t\tlastQuoteAt = charNum;\n \t\t\t\t\t\n \t\t\t\t\tif (foundQuote == true)\n \t\t\t\t\t\tfoundQuote = false;\n \t\t\t\t\telse\n \t\t\t\t\t\tfoundQuote = true;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif (temp.charAt(charNum) == '(') {\n \t\t\t\t\tlastParenAt = charNum;\n \t\t\t\t\t\n \t\t\t\t\tif (foundParentheses)\n \t\t\t\t\t\tfoundParentheses = false;\n \t\t\t\t\telse\n \t\t\t\t\t\tfoundParentheses = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (foundQuote == true && ((temp.indexOf(\"\\\"\",lastQuoteAt+1)) == -1)) { // then we found an EOS character that shouldn't split a sentence because it's within an open quote.\n \t\t\t\tif ((currentStop = text.indexOf(\"\\\"\",currentStart +lastQuoteAt+1)) == -1) {\n \t\t\t\t\tcurrentStop = text.length(); // if we can't find a closing quote in the rest of the input text, then we assume the author forgot to put a closing quote, and act like it's at the end of the input text.\n \t\t\t\t}\n \t\t\t\telse{\n \t\t\t\t\tcurrentStop +=1;\n \t\t\t\t\tmergeNext=true;// the EOS character we are looking for is not in this section of text (section being defined as a substring of 'text' between two EOS characters.)\n \t\t\t\t}\n \t\t\t}\n \t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\n \t\t\tif (foundParentheses && ((temp.indexOf(\")\", lastParenAt+1)) == -1)) {\n \t\t\t\tif ((currentStop = text.indexOf(\")\", currentStart + lastParenAt + 1)) == -1)\n \t\t\t\t\tcurrentStop = text.length();\n \t\t\t\telse {\n \t\t\t\t\tcurrentStop += 1;\n \t\t\t\t\tmergeNext = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \n \t\t\tif (foundQuote) {\n \t\t\t\tsentEnd = SENTENCE_QUOTE.matcher(text);\t\n \t\t\t\tisSentence = sentEnd.find(currentStop-2); // -2 so that we match the EOS character before the quotes (not -1 because currentStop is one greater than the last index of the string -- due to the way substring works, which is includes the first index, and excludes the end index: [start,end).)\n \n \t\t\t\tif (isSentence == true) { // If it seems that the text looks like this: He said, \"Hello.\" Then she said, \"Hi.\" \n \t\t\t\t\t// Then we want to split this up into two sentences (it's possible to have a sentence like this: He said, \"Hello.\")\n \t\t\t\t\tcurrentStop = text.indexOf(\"\\\"\",sentEnd.start())+1;\n \t\t\t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\t\tforceNoMerge = true;\n \t\t\t\t\tmergeNext = false;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (foundParentheses) {\n \t\t\t\tsentEnd = SENTENCE_PARENTHESES.matcher(text);\n \t\t\t\tisSentence = sentEnd.find(currentStop-2);\n \t\t\t\t\n \t\t\t\tif (isSentence == true) {\n \t\t\t\t\tcurrentStop = text.indexOf(\")\", sentEnd.start()) + 1;\n \t\t\t\t\tsafeString = text.substring(currentStart-1, currentStop);\n \t\t\t\t\tforceNoMerge = true;\n \t\t\t\t\tmergeNext = false;\n \t\t\t\t}\n \t\t\t}\n \n \t\t\t// now check to see if there is a CITATION after the sentence (doesn't just apply to quotes due to paraphrasing)\n \t\t\t// The rule -- at least as of now -- is if after the EOS mark there is a set of parenthesis containing either one word (name) or a name and numbers (name 123) || (123 name) || (123-456 name) || (name 123-456) || etc..\n \t\t\tcitationFinder = CITATION.matcher(text.substring(currentStop));\t\n \t\t\thasCitation = citationFinder.find(); // -2 so that we match the EOS character before the quotes (not -1 because currentStop is one greater than the last index of the string -- due to the way substring works, which is includes the first index, and excludes the end index: [start,end).)\n \t\t\t\n \t\t\tif (hasCitation == true) { // If it seems that the text looks like this: He said, \"Hello.\" Then she said, \"Hi.\" \n \t\t\t\t// Then we want to split this up into two sentences (it's possible to have a sentence like this: He said, \"Hello.\")\n \t\t\t\tcurrentStop = text.indexOf(\")\",citationFinder.start()+currentStop)+1;\n \t\t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\tmergeNext = false;\n \t\t\t}\t\n \t\t\t\n \t\t\tif (mergeWithLast) {\n \t\t\t\tmergeWithLast=false;\n \t\t\t\tString prev=sents.remove(sents.size()-1);\n \t\t\t\tsafeString=prev+safeString;\n \t\t\t}\n \t\t\t\n \t\t\tif (mergeNext && !forceNoMerge) {//makes the merge happen on the next pass through\n \t\t\t\tmergeNext=false;\n \t\t\t\tmergeWithLast=true;\n \t\t\t} else {\n \t\t\t\tforceNoMerge = false;\n \t\t\t\tfinalSents.add(safeString);\n \t\t\t}\n \t\t\n \t\t\tsents.add(safeString);\n \t\t\t\n \t\t\t//// xxx xxx xxx return the safeString_subbedEOS too!!!!\n \t\t\tif (currentStart < 0 || currentStop < 0) {\n \t\t\t\tLogger.logln(NAME+\"Something went really wrong making sentence tokens.\", LogOut.STDERR);\n \t\t\t\tErrorHandler.fatalProcessingError(null);\n \t\t\t}\n \n \t\t\tcurrentStart = currentStop+1;\n \t\t\tif (currentStart >= lenText) {\n \t\t\t\tfoundEOS = false;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tfoundEOS = sent.find(currentStart);\n \t\t}\n \n \t\tif (!foundAtLeastOneEOS || !EOSAtSentenceEnd) {\n \t\t\tArrayList<String> wrapper = new ArrayList<String>(1);\n \t\t\twrapper.add(text);\n \t\t\treturn wrapper;\n \t\t}\n \t\t\n \t\treturn finalSents;\n \t}", "public static void addPossesives(Annotation np, Document doc, Map<Annotation, ArrayList<Annotation>> posessives)\r\n{\r\n int end = np.getEndOffset();\r\n // get all nps that start within 2 to 5 characters of the end of the np\r\n AnnotationSet nps = doc.getAnnotationSet(Constants.NP);\r\n AnnotationSet candidates = nps.getOverlapping(end + 2, end + 5);\r\n ArrayList<Annotation> coresp = posessives.get(np);\r\n if (coresp == null) {\r\n coresp = new ArrayList<Annotation>();\r\n }\r\n if (candidates == null) {\r\n posessives.put(np, coresp);\r\n return;\r\n }\r\n for (Annotation c : candidates) {\r\n if (c.getStartOffset() >= end + 2) {\r\n String[] wds = FeatureUtils.getWords(doc.getAnnotText(end, c.getStartOffset()));\r\n if (wds != null && wds.length == 1) {\r\n if (wds[0].equalsIgnoreCase(\"of\")) {\r\n // we have x of y -- x is the pos of y\r\n coresp.add(c);\r\n }\r\n if (wds[0].equalsIgnoreCase(\"'s\")) {\r\n // we have y's x -- x is the pos of y\r\n ArrayList<Annotation> coresp2 = posessives.get(c);\r\n if (coresp2 == null) {\r\n coresp2 = new ArrayList<Annotation>();\r\n posessives.put(c, coresp2);\r\n }\r\n coresp2.add(np);\r\n }\r\n }\r\n }\r\n }\r\n posessives.put(np, coresp);\r\n}", "public synchronized void process() \n\t{\n\t\t// for each word in a line, tally-up its frequency.\n\t\t// do sentence-segmentation first.\n\t\tCopyOnWriteArrayList<String> result = textProcessor.sentenceSegmementation(content.get());\n\t\t\n\t\t// then do tokenize each word and count the terms.\n\t\ttextProcessor.tokenizeAndCount(result);\n\t}", "@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tparseFile(\"english_file.txt\");\r\n\t\t\t\t}", "public static void main(String[] args){\n SentenceParser sp = new SentenceParser (\"Peas and carrots and potatoes.\");\n System.out.println(sp);\n //then print your results\n \n\n }", "private void fileToPoSTags(String filePath,int version){\n Log.log(\"Reading TreeBank file <\" + filePath +\">\");\n\n FileReader fr = null;\n BufferedReader br = null;\n\n try{\n fr = new FileReader(filePath);\n br = new BufferedReader(fr);\n\n String currentLine;\n String[] columns;\n\n Tag tag1 = null;\n Tag tag2;\n String word;\n\n Integer numRow;\n while((currentLine = br.readLine()) != null){\n columns = currentLine.split(\"\\t\");\n numRow = getIntegerString(columns[0]);\n if(numRow != null && numRow >= 1){\n if(numRow == 1) {\n tag1 = Tag.valueOf(\"START\");\n saveTag(tag1);\n }\n try{\n tag2 = Tag.valueOf(columns[3]);\n saveTag(tag2);\n word = columns[1];\n switch (version){\n case 1:\n savePoSTag(new PoSTag(word.toLowerCase(),tag2));\n break;\n case 2:\n if(!tag2.equals(Tag.PROPN))\n savePoSTag(new PoSTag(word.toLowerCase(),tag2));\n else if(Character.isUpperCase(word.charAt(0)))\n savePoSTag(new PoSTag(word,tag2));\n break;\n case 3:\n\n if(tag2.equals(Tag.PROPN))\n savePoSTag(new PoSTag(word,tag2));\n else{\n if(Character.isUpperCase(word.charAt(0))){\n savePoSTag(new PoSTag(word,tag2));\n savePoSTag(new PoSTag(word.toLowerCase(),tag2));\n }else{\n savePoSTag(new PoSTag(word,tag2));\n savePoSTag(new PoSTag(\n word.substring(0,1).toUpperCase()\n +word.substring(1),tag2));\n }\n\n }\n\n break;\n case 4:\n\n if(!tag2.equals(Tag.PROPN))\n savePoSTag(new PoSTag(word,tag2));\n savePoSTag(new PoSTag(word,tag2));\n break;\n case 5:\n\n if(!tag2.equals(Tag.PROPN))\n savePoSTag(new PoSTag(word.toLowerCase(),tag2));\n savePoSTag(new PoSTag(word,tag2));\n break;\n\n }\n saveBigram(new BiGram(tag1,tag2));\n tag1 = tag2;\n }catch (IllegalArgumentException e){\n e.printStackTrace();\n }\n }\n }\n\n }catch (IOException e){\n e.printStackTrace();\n }finally {\n UtilitiesIO.closeFile(fr,br);\n }\n }", "public DocReader(File f)\n\t{\n\t\tthis.inputFile = f;\n\t}", "private void openNlpSentSplitter(String source) throws InvalidFormatException, IOException {\n\t\tString paragraph = \"Hi. How are you? This is Mike. This is Elvis A. A cat in the hat. The type strain is KOPRI 21160T (= KCTC 23670T= JCM 18092T), isolated from a soil sample collected near the King Sejong Station on King George Island, Antarctica. The DNA G+ C content of the type strain is 30.0 mol%.\";\r\n\r\n\t\tInputStream modelIn = new FileInputStream(source);\r\n\r\n\t\ttry {\r\n\t\t // SentenceModel model = new SentenceModel(modelIn);\r\n\t\t\t// InputStream is = new FileInputStream(myConfiguration.getOpenNLPTokenizerDir());\r\n\t\t\t\r\n\t\t\tSentenceModel model = new SentenceModel(modelIn);\r\n\t\t\tSentenceDetectorME sdetector = new SentenceDetectorME(model);\r\n\t\t\tString sentences[] = sdetector.sentDetect(paragraph);\r\n\t\t\tfor ( int i = 0; i < sentences.length; i++ ) {\r\n\t\t\t\tSystem.out.println(sentences[i]);\r\n\t\t\t}\r\n\t\t\tmodelIn.close();\t\t \r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t if (modelIn != null) {\r\n\t\t try {\r\n\t\t modelIn.close();\r\n\t\t }\r\n\t\t catch (IOException e) {\r\n\t\t }\r\n\t\t }\r\n\t\t}\r\n\t}", "public void Tokenizer(String s) throws FileNotFoundException\r\n {\nInputStream modelIn = new FileInputStream(\"C:/OpenNLP_models/en-token.bin\"); \r\n\t \r\n // InputStream modelIn=getClass().getResourceAsStream(\"en-token.bin\");\r\n try {\r\n TokenizerModel model = new TokenizerModel(modelIn);\r\n TokenizerME tokenizer = new TokenizerME(model);\r\n String tokens[] = tokenizer.tokenize(s);\r\n \r\n for(int i=0; i<tokens.length;i++)\r\n {\r\n System.out.println(tokens[i]);\r\n }\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n finally {\r\n if (modelIn != null) {\r\n try {\r\n modelIn.close();\r\n }\r\n catch (IOException e) {\r\n }\r\n } \r\n } \r\n }", "public void readReviewsFoodVertical() throws IOException {\n File fileAnnotation = new File(filePathExternalFile);\n FileReader fr = new FileReader(fileAnnotation);\n BufferedReader br = new BufferedReader(fr);\n String line;\n\n while ((line = br.readLine()) != null) {\n annotate(\"aspect\",\"item\");\n }\n br.close();\n fr.close();\n }", "public void readCategoryFile(File file) {\n\ttry (BufferedReader br = new BufferedReader(new FileReader(file)))\n\t{\n\t\tString sCurrentLine;\n\t\tString [] lineElements;\n\t\t\n\t\tint row = 0;\n\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t//System.out.println(sCurrentLine);\n\t\t\t\n\t\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\t\t//System.out.println(lineElements.length);\n\t\t\tfor (int column = 0; column < lineElements.length; column++) {\t\t\n\t\t\t\t//System.out.println(column);\n\t\t\t\tint category = Integer.parseInt(lineElements[column]);\n\t\t\t\t//System.out.println(vertices.size());\n\t\t\t\tPOI v1 = vertices.get(row);\n\t\t\t\tPOI v2 = vertices.get(column);\n\t\t\t\t\n\t\t\t\tArc arc = getArc(v1, v2);\n\t\t\t\tif (!distMtx) {\n\t\t\t\t\tdouble distance = v1.distanceTo(v2);\n\t\t\t\t\tif (data == Dataset.VERBEECK) {\n\t\t\t\t\t\tdistance = distance / 5.0;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tdistance = distance / 10.0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tarc.setLength(distance);\n\t\t\t\t}\n\t\t\t\tarc.setCategory(category);\n\t\t\t\tif (distConstraint) {\n\t\t\t\t\tarc.setSpeedTable(allOneSpeedTable);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tarc.setSpeedTable(speedTables.get(category));\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\trow ++;\n\t\t}\n\t} catch (IOException e) {\n\t\te.printStackTrace();\n\t}\n}", "@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}", "@Override\n\tpublic Document parse(final char[] content) {\n\t\tfinal LagartoParser lagartoParser = new LagartoParser(config.parserConfig, content);\n\t\treturn parseWithLagarto(lagartoParser);\n\t}", "static TreeSet<Preposition> parsePrepositions(Scanner data){\n\t\tArrayList<String[]> raw = parseDataToArray(data);\n\t\tTreeSet<Preposition> output = new TreeSet<Preposition>();\n\n\t\tfor(String[] current : raw){ //iterate over each line from the original file.\n\n\t\t\tif(current.length != Values.PREPOSITION_DATA_ARRAY_LENGTH_CORRECT){\n\t\t\t\tSystem.err.println(\"Error parsing a line.\");\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//System.out.println(\"Raw: \" + Arrays.toString(current));\n\n\t\t\t//current[] contains a split based on tabs. Generally {chapter, nom/gen/gender, definition}.\n\n\t\t\tint chapter = 0;\n\t\t\tString Preposition;\n\t\t\tint caseTaken = 0;\n\t\t\tArrayList<String> definitions = new ArrayList<String>();\n\n\t\t\t//Values.betterStringArrayPrint(current);\n\n\t\t\ttry{ //try to read a noun, assuming that the chapter IS specified\n\t\t\t\tchapter = Integer.parseInt(current[0]);\n\t\t\t\tPreposition = current[1].split(\" \\\\+ \")[0];\n\t\t\t\tcaseTaken = Values.getCaseFromString(current[1].split(\" \\\\+ \")[1]);\n\t\t\t\tList<String> tempDefinitions = Arrays.asList(current[2].split(\",|;\")); //definitions\n\t\t\t\tdefinitions.addAll(tempDefinitions);\n\t\t\t} catch(NumberFormatException e){ //can happen if a chapter isn't specified. Read the noun from a null chapter.\n\t\t\t\tchapter = Values.CHAPTER_VOID;\n\t\t\t\tPreposition = current[1].split(\" \\\\+ \")[0];\n\t\t\t\tcaseTaken = Values.getCaseFromString(current[1].split(\" \\\\+ \")[1]);\n\t\t\t\tList<String> tempDefinitions = Arrays.asList(current[2].split(\",|;\")); //definitions\n\t\t\t\tdefinitions.addAll(tempDefinitions);\n\t\t\t} catch(Exception e){\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.err.println(\"Could not read a line!\");\n\t\t\t\tcontinue; //We can't make a noun out of the botrked line.\n\t\t\t}\n\t\t\ttrimAll(definitions);\n\t\t\tPreposition currentPreposition = new Preposition(Preposition, caseTaken, chapter, definitions);\n\t\t\tSystem.out.println(\"Added: \" + currentPreposition);\n\t\t\toutput.add(currentPreposition);\n\t\t}\n\n\t\treturn output;\n\t}", "public static Document parse(String filename) throws ParserException {\n\n\t\tString FileID, Category, Title = null, Author = null, AuthorOrg = null, Place = null, NewsDate = null, Content = null, FileN;\n\t\tDocument d = new Document();\n\t\tif (filename == null || filename == \"\")\n\t\t\tthrow new ParserException();\n\t\tFileN = filename;\n\t\tHashMap<Integer, String> map = new HashMap<Integer, String>();\n\t\tBufferedReader r = null;\n\t\tFile file = new File(FileN);\n\t\tif (!file.exists())\n\t\t\tthrow new ParserException();\n\t\tFileID = file.getName();\n\t\tCategory = file.getParentFile().getName();\n\t\ttry {\n\t\t\tr = new BufferedReader(new FileReader(file));\n\t\t\tint i = 1, j = 3;\n\t\t\tBoolean isTitle = true, hasAuthor = false;\n\t\t\tString line;\n\t\t\twhile ((line = r.readLine()) != null) {\n\t\t\t\tline = line.trim();\n\t\t\t\tif (!line.equals(\"\")) {\n\t\t\t\t\tmap.put(i, line);\n\t\t\t\t\tif (isTitle) {\n\t\t\t\t\t\tTitle = line;\n\t\t\t\t\t\tisTitle = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (hasAuthor == false && i == 2) {\n\t\t\t\t\t\tPattern pattern = Pattern\n\t\t\t\t\t\t\t\t.compile(\"<AUTHOR>(.+?)</AUTHOR>\");\n\t\t\t\t\t\tMatcher matcher = pattern.matcher(line);\n\t\t\t\t\t\tif (matcher.find()) {\n\t\t\t\t\t\t\tAuthor = matcher.group(1).replace(\"BY\", \"\");\n\t\t\t\t\t\t\tAuthorOrg = Author.substring(\n\t\t\t\t\t\t\t\t\tAuthor.lastIndexOf(\",\") + 1).trim();\n\t\t\t\t\t\t\tAuthor = Author.split(\",\")[0].trim();\n\t\t\t\t\t\t\thasAuthor = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!hasAuthor && i == 2) {\n\t\t\t\t\t\tString[] str = checkPlace(line);\n\t\t\t\t\t\tContent = str[0];\n\t\t\t\t\t\tPlace = str[1];\n\t\t\t\t\t\tNewsDate = str[2];\n\t\t\t\t\t} else if (hasAuthor && i == 3) {\n\t\t\t\t\t\tString[] str = checkPlace(line);\n\t\t\t\t\t\tContent = str[0];\n\t\t\t\t\t\tPlace = str[1];\n\t\t\t\t\t\tNewsDate = str[2];\n\t\t\t\t\t\tj = 4;\n\t\t\t\t\t}\n\t\t\t\t\tif (i >= j) {\n\t\t\t\t\t\tContent = Content + map.get(i) + \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tr.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (Author != null) {\n\t\t\tAuthor = Author.replace(\"By\", \"\").trim();\n\t\t\td.setField(FieldNames.AUTHOR, Author);\n\t\t\td.setField(FieldNames.AUTHORORG, AuthorOrg);\n\t\t} \n\t\td.setField(FieldNames.FILEID, FileID);\n\t\td.setField(FieldNames.CATEGORY, Category);\n\t\td.setField(FieldNames.TITLE, Title);\n\t\td.setField(FieldNames.PLACE, Place);\n\t\td.setField(FieldNames.NEWSDATE, NewsDate);\n\t\td.setField(FieldNames.CONTENT, Content);\n\n\t\treturn d;\n\t}", "public static void main(String[] args) {\n\t\tif (args.length == 0) {\n\t\t\tSystem.out.println(\"Please specify the name of the input file\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tString filename = args[0];\n\t\tSystem.out.print(\"Please enter a sentence: \");\n\t\tScanner in = new Scanner(System.in);\n\t\tString sentence = in.nextLine();\n\t\tin.close();\n\t\tSystem.out.println(\"enetered sentence: \" + sentence);\n//\t\tList<Sentence> sentences = Analyzer.readFile(filename);\n//\t\tSet<Word> words = Analyzer.allWords(sentences);\n//\t\tMap<String, Double> wordScores = Analyzer.calculateScores(words);\n\t\tList<Sentence> sentences = Analyzer.readFile(\"reviews\");//step 1\n\t\tSet<Word> words = Analyzer.allWords(sentences);//step 2\n\t\tMap<String, Double> wordScores = Analyzer.calculateScores(words);//step 3 \n\t\tdouble score = Analyzer.calculateSentenceScore(wordScores, sentence);\n\t\tSystem.out.println(\"The sentiment score is \" + score);\n\t}", "public AnalysePSRFile(File file) throws IOException {\n ReadFileToString str = new ReadFileToString();\n str.read(file);\n StringTokenizer tok = new StringTokenizer(str.outputString,\"\\n\");\n boolean notfound = true;\n int count = 4;\n while(notfound && tok.hasMoreTokens()) {\n String line = tok.nextToken();\n if(line.indexOf(startKeyword) >= 0) \n count--;\n if(count == 0)\n notfound = false;\n }\n if(!notfound) {\n Temperature = getTemperature(tok);\n getMoleFractionHeader(tok);\n getMoleFractions(tok);\n int n = namesV.size();\n namesS = new String[n];\n molefractionsD = new Double[n];\n for(int i=0;i<n;i++) {\n namesS[i] = (String) namesV.elementAt(i);\n molefractionsD[i] = (Double) molefractionsV.elementAt(i);\n }\n } else {\n throw new IOException(\"PSR file incomplete: Begin not found in \\n \" + file.toString() );\n }\n \n }", "public static void main(String[] args) throws FileNotFoundException,IOException {\n\t\tFileReader fr=new FileReader(\"E:\\\\iostreams\\\\question.txt\");\n\n\t\tBufferedReader br=new BufferedReader(fr);\n\n\t\tStreamTokenizer st=new StreamTokenizer(br);\n\n\t\tint token=0;\n\t\tdouble sum=0;\n\t\twhile((token=st.nextToken())!=StreamTokenizer.TT_EOF) {\n\n\t\t\tswitch(token) {\n\t\t\t\tcase StreamTokenizer. TT_NUMBER:\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(st.nval);\n\t\t\t\t\tsum+=st.nval;\n\t\t\t\t\t//System.out.println(sum);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase StreamTokenizer. TT_WORD:\n\t\t\t\t{\n\t\t\t\t\tif(sum!=0) {\n\t\t\t\t\t\tSystem.out.println((int)sum);\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.print(st.sval+\" \");\n\t\t\t\t\tsum=0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println((int)sum);\n\n\t}", "private static Document processFile(String filename, String mode) throws Exception {\t\t\n\t\t// First make sure the properties file is loaded...\n\t\tOscar3Props.getInstance();\n\t\tDocument doc;\n\n\t\tPubXMLToSciXML ptsx = null;\n\t\t\n\t\tif(mode.equals(\"Process\") || mode.equals(\"SAF\") || mode.equals(\"Data\")) {\n\t\t\tSystem.out.println(\"Loading file...\");\n\t\t\tdoc = ToSciXML.fileToSciXML(new File(filename));\n\t\t} else if(mode.equals(\"RoundTrip\")) {\n\t\t\tptsx = new PubXMLToSciXML(new Builder().build(new File(filename)));\n\t\t\tdoc = ptsx.getSciXML();\n\t\t} else {\n\t\t\tthrow new Error(\"Mode not recognised\");\n\t\t}\n\t\t\n\t\tOscarFlow oscarFlow = new OscarFlow(doc);\n\n\t\tif(mode.equals(\"Process\")) {\n\t\t\toscarFlow.processLite();\n\t\t\treturn oscarFlow.getInlineXML();\n\t\t} else if(mode.equals(\"SAF\")) {\n\t\t\toscarFlow.processToSAF();\n\t\t\treturn oscarFlow.getSafXML();\n\t\t} else if(mode.equals(\"Data\")) {\n\t\t\toscarFlow.parseData();\n\t\t\treturn oscarFlow.getDataXML();\n\t\t} else if(mode.equals(\"RoundTrip\")) {\n\t\t\toscarFlow.processLite();\n\t\t\tptsx.setSciXMLDoc(oscarFlow.getInlineXML());\n\t\t\treturn ptsx.getAnnotatedPubXML();\n\t\t}\n\t\treturn null;\n\t}", "@Test\n public void testGetPosition()\n {\n System.out.println(\"getPosition\");\n final File file = new File(\"src/test/data/test.example.txt\");\n final Lexer lexer = new Lexer();\n final Token token = lexer.analyze(file);\n assertEquals(Syntax.LABEL, token.getSyntax());\n assertEquals(1, token.getLine());\n assertEquals(1, token.getPosition());\n assertEquals(Vocabulary.COMPONENT, token.getValue());\n }", "@Override\r\n protected void parseDocuments()\r\n {\n\r\n }", "public void parse(String filename);", "@Test\n public void testProcessJCas() throws CASRuntimeException, IOException,\n AnalysisEngineProcessException {\n final String text = \"This is an \" + ENTITY_NAME + \" inside the text.\\n\";\n final int offset = \"This is an \".length();\n final BufferedWriter out = new BufferedWriter(new FileWriter(textFile));\n out.write(text);\n out.close();\n textJCas.setDocumentText(text);\n rawJCas.setSofaDataURI(\"file:\" + textFile.getCanonicalPath(), \"text/plain\");\n annotator.process(baseJCas.getCas());\n int count = 0;\n for (final SemanticAnnotation ann : JCasUtil.select(textJCas, SemanticAnnotation.class)) {\n Assert.assertEquals(offset, ann.getBegin());\n Assert.assertEquals(offset + ENTITY_NAME.length(), ann.getEnd());\n Assert.assertEquals(KnownEntityAnnotator.URI, ann.getAnnotator());\n Assert.assertEquals(SEMANTIC_ANNOTATION_NAMESPACE, ann.getNamespace());\n Assert.assertEquals(SEMANTIC_ANNOTATION_IDENTIFIER, ann.getIdentifier());\n Assert.assertEquals(1.0, ann.getConfidence(), 0.000001);\n final FSArray a = ann.getProperties();\n Assert.assertEquals(2, a.size());\n final Property p0 = (Property) a.get(0);\n final Property p1 = (Property) a.get(1);\n Assert.assertEquals(\"namespace\", p0.getName());\n Assert.assertEquals(ENTITY_NS, p0.getValue());\n Assert.assertEquals(\"identifier\", p1.getName());\n Assert.assertEquals(ENTITY_ID, p1.getValue());\n count++;\n }\n Assert.assertEquals(1, count);\n }", "@Override\n public void process(JCas jcas)\n throws AnalysisEngineProcessException\n {\n \tfor (LineAnnotation line : JCasUtil.select(jcas, LineAnnotation.class)) {\n String pText = line.getCoveredText();\n int boundary = pText.length();\n int start = 0;\n int end = 0;\n\n while (start < boundary) {\n while (start < boundary && (Character.isSpaceChar(pText.charAt(start)) || Character.isWhitespace(pText.charAt(start))) ) {\n start++;\n }\n\n for (end = start; end < boundary && !(Character.isSpaceChar(pText.charAt(end)) || Character.isWhitespace(pText.charAt(end))); end++);\n \n if (start < boundary) {\n Token tokenAnnotation = new Token(jcas);\n tokenAnnotation.setBegin(start+line.getBegin());\n tokenAnnotation.setEnd(end+line.getBegin());\n tokenAnnotation.addToIndexes();\n }\n start = end + 1;\n }\n \t}\n }", "@SuppressWarnings(\"unchecked\")\r\npublic static void ruleResolvePronouns(AnnotationSet basenp, Document doc)\r\n{\n Annotation[] basenpArray = basenp.toArray();\r\n\r\n // Initialize coreference clusters\r\n int maxID = basenpArray.length;\r\n\r\n // Create an array of pointers\r\n // clust = new UnionFind(maxID);\r\n fvm = new RuleResolvers.FeatureVectorMap();\r\n ptrs = new int[maxID];\r\n clusters = new HashSet[maxID];\r\n for (int i = 0; i < clusters.length; i++) {\r\n ptrs[i] = i;\r\n HashSet<Annotation> cluster = new HashSet<Annotation>();\r\n cluster.add(basenpArray[i]);\r\n clusters[i] = cluster;\r\n }\r\n Annotation zero = new Annotation(-1, -1, -1, \"zero\");\r\n\r\n for (int i = 1; i < basenpArray.length; i++) {\r\n Annotation np2 = basenpArray[i];\r\n if (FeatureUtils.isPronoun(np2, doc)) {\r\n Annotation ant = ruleResolvePronoun(basenpArray, i, doc);\r\n if (ant != null) {\r\n np2.setProperty(Property.PRO_ANTES, ant);\r\n }\r\n else {\r\n np2.setProperty(Property.PRO_ANTES, zero);\r\n }\r\n }\r\n }\r\n}", "public void processFile(ITextFileProcessor procer) {\r\n\t\ttry {\r\n\t\t\tfinal File file = new File(this.filepath);\r\n\t\t\tfinal InputStream stream = new FileInputStream(file);\r\n\t\t\tString str = null;\r\n\t\t\tfinal BufferedReader din = new BufferedReader(new InputStreamReader(stream));\t\t\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tdo {\r\n\t\t\t\t\tstr = din.readLine(); \r\n\t\t\t\t\tif (str != null)\r\n\t\t\t\t\t\tprocer.processLine(str);\r\n\t\t\t\t} while (str != null);\r\n\t\t\t} catch (InterpssException e) {\r\n\t\t\t\tipssLogger.severe(e.toString());\r\n\t\t\t} finally {\r\n\t\t\t\tdin.close();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tipssLogger.severe(e.toString());\r\n\t\t}\r\n\t}", "public static Annotation ruleResolvePronoun(Annotation[] basenps, int num, Document doc)\r\n{\n Annotation np2 = basenps[num];\r\n // Get some properties of the np\r\n FeatureUtils.PRTypeEnum type2 = Pronoun.getValue(np2, doc);\r\n String str2 = doc.getAnnotString(np2);\r\n boolean reflexive = FeatureUtils.isReflexive(str2);\r\n // Get the possible antecedents\r\n ArrayList<Annotation> antes = new ArrayList<Annotation>();\r\n ArrayList<Integer> nums = new ArrayList<Integer>();\r\n if (DEBUG) {\r\n System.err.println(\"Pronoun: \" + doc.getAnnotText(np2));\r\n }\r\n if (FeatureUtils.getPronounPerson(str2) == PersonPronounTypeEnum.FIRST) {\r\n if (NumberEnum.SINGLE.equals(Number.getValue(np2, doc)))\r\n return ruleResolvePronounI(np2, basenps, num, doc);\r\n else\r\n return ruleResolvePronounWe(np2, basenps, num, doc);\r\n }\r\n if (FeatureUtils.getPronounPerson(str2) == PersonPronounTypeEnum.SECOND)\r\n return ruleResolvePronounYou(np2, basenps, num, doc);\r\n else {\r\n int sentnum = 0;\r\n for (int i = num - 1; i >= 0 && sentnum <= 3; i--) {\r\n Annotation np1 = basenps[i];\r\n sentnum = sentNum(np1, np2, doc);\r\n if (DEBUG) {\r\n System.err.println(\"Possible antecedent: \" + i + \" :\" + doc.getAnnotText(np1));\r\n }\r\n if (!isNumberIncompatible(np1, np2, doc) && !isGenderIncompatible(np1, np2, doc)\r\n && !isAnimacyIncompatible(np1, np2, doc) && isWNClassComp(np1, np2, doc) && isProComp(np1, np2, doc)\r\n && !Embedded.getValue(np1, doc) && isSyntax(np1, np2, doc)) {\r\n if (DEBUG) {\r\n System.err.println(\"Candidate antecedent: \" + i + \" :\" + doc.getAnnotText(np1));\r\n }\r\n antes.add(0, np1);\r\n nums.add(0, i);\r\n }\r\n }\r\n }\r\n if (antes.size() == 0) return null;\r\n // Check for reflexsives\r\n if (FeatureUtils.isReflexive(doc.getAnnotText(np2))) {\r\n union(nums.get(nums.size() - 1).intValue(), num);\r\n return antes.get(antes.size() - 1);\r\n }\r\n if (antes.size() == 1) {\r\n // Rule 1: Unique in discourse\r\n if (DEBUG) {\r\n System.err.println(\"Rule 1 match!!!\");\r\n }\r\n union(nums.get(0).intValue(), num);\r\n return antes.get(0);\r\n }\r\n // Rule 2: Reflexive -- the last possible antecedent\r\n if (reflexive) {\r\n if (DEBUG) {\r\n System.err.println(\"Rule 2 match!!!\");\r\n }\r\n union(nums.get(nums.size() - 1).intValue(), num);\r\n return antes.get(antes.size() - 1);\r\n }\r\n // Rule 3: Unique current + Prior\r\n ArrayList<Annotation> antes1 = new ArrayList<Annotation>();\r\n ArrayList<Integer> nums1 = new ArrayList<Integer>();\r\n int counter = 0;\r\n for (Annotation np1 : antes) {\r\n if (sentNum(np1, np2, doc) < 2) {\r\n antes1.add(np1);\r\n nums1.add(nums.get(counter));\r\n }\r\n counter++;\r\n }\r\n if (antes1.size() == 1) {\r\n if (DEBUG) {\r\n System.err.println(\"Rule 3 match!!!\");\r\n }\r\n union(nums1.get(0).intValue(), num);\r\n return antes1.get(0);\r\n }\r\n // Rule 4: Possesive Pro\r\n\r\n if (FeatureUtils.isPossesive(str2) && antes1.size() > 0) {\r\n Integer found = null;\r\n Annotation ant = null;\r\n boolean multiple = false;\r\n for (int i = 0; i < antes1.size() && !multiple; i++) {\r\n Annotation np1 = antes1.get(i);\r\n if (doc.getAnnotText(np1).equalsIgnoreCase(str2) && sentNum(np1, np2, doc) == 1) {\r\n if (found == null) {\r\n found = nums1.get(i);\r\n ant = antes1.get(i);\r\n }\r\n else {\r\n multiple = true;\r\n }\r\n }\r\n }\r\n if (!multiple && found != null) {\r\n if (DEBUG) {\r\n System.err.println(\"Rule 4 match!!!\");\r\n }\r\n union(found.intValue(), num);\r\n return ant;\r\n }\r\n }\r\n // Rule #5: Unique in the current sentence\r\n ArrayList<Annotation> antes2 = new ArrayList<Annotation>();\r\n ArrayList<Integer> nums2 = new ArrayList<Integer>();\r\n counter = 0;\r\n for (Annotation np1 : antes1) {\r\n if (sentNum(np1, np2, doc) < 1) {\r\n antes2.add(np1);\r\n nums2.add(nums1.get(counter));\r\n }\r\n counter++;\r\n }\r\n if (antes2.size() == 1) {\r\n if (DEBUG) {\r\n System.err.println(\"Rule 5 match!!!\");\r\n }\r\n union(nums2.get(0).intValue(), num);\r\n return antes2.get(0);\r\n }\r\n // Extra Rule: Unique in the current clause (or parent clauses\r\n AnnotationSet parse = doc.getAnnotationSet(Constants.PARSE);\r\n Annotation clause = SyntaxUtils.getClause(np2, parse);\r\n while (clause != null) {\r\n ArrayList<Annotation> antes3 = new ArrayList<Annotation>();\r\n ArrayList<Integer> nums3 = new ArrayList<Integer>();\r\n counter = 0;\r\n for (Annotation np1 : antes2) {\r\n if (clause.covers(np1)) {\r\n antes3.add(np1);\r\n nums3.add(nums2.get(counter));\r\n }\r\n counter++;\r\n }\r\n if (DEBUG) {\r\n System.err.println(antes3.size() + \" antecedents in the clause\");\r\n }\r\n if (antes3.size() == 1) {\r\n if (DEBUG) {\r\n System.err.println(\"Clause rule match!!!\");\r\n }\r\n union(nums3.get(0).intValue(), num);\r\n return antes3.get(0);\r\n }\r\n clause = SyntaxUtils.getParentClause(clause, parse);\r\n }\r\n\r\n // Rule #6: Unique Subject\r\n\r\n // //Look for the subject in the current sentence\r\n // boolean unique = true;\r\n // Annotation subject = null;\r\n // Integer subjectNum = null;\r\n // for(int i=antes.size()-1; i>=0; i--){\r\n // Annotation np1 = antes.get(i);\r\n // if(sentNum(np1, np2, annotations, text)==0){\r\n // if(FeatureUtils.getGramRole(np1, annotations, text).equals(\"SUBJECT\")){\r\n // //&&SyntaxUtils.isMainClause(np1, parse)){\r\n // if(DEBUG)\r\n // System.err.println(\"Rule 6 match!!!\");\r\n // if(subjectNum!=null)\r\n // unique=false;\r\n // subjectNum = nums.get(i);\r\n // subject = antes.get(i);\r\n // }\r\n // }\r\n // }\r\n\r\n // if(subject!=null&&unique){\r\n // union(subjectNum.intValue(), num);\r\n // return subject;\r\n // }\r\n\r\n // Look for the subject in the previous sentence\r\n boolean unique = true;\r\n Annotation subject = null;\r\n Integer subjectNum = null;\r\n if (GramRole.getValue(np2, doc).equals(\"SUBJECT\")) {\r\n // &&SyntaxUtils.isMainClause(np2, parse)){\r\n for (int i = antes.size() - 1; i >= 0; i--) {\r\n Annotation np1 = antes.get(i);\r\n if (sentNum(np1, np2, doc) == 1) {\r\n if (GramRole.getValue(np1, doc).equals(\"SUBJECT\")) {\r\n // &&SyntaxUtils.isMainClause(np1, parse)){\r\n if (DEBUG) {\r\n System.err.println(\"Rule 6 match!!!\");\r\n }\r\n if (subjectNum != null) {\r\n unique = false;\r\n }\r\n subjectNum = nums.get(i);\r\n subject = antes.get(i);\r\n }\r\n }\r\n }\r\n }\r\n if (subject != null && unique) {\r\n union(subjectNum.intValue(), num);\r\n return subject;\r\n }\r\n subjectNum = null;\r\n subject = null;\r\n\r\n // One more Rule -- assign possessive pronouns to the last subject\r\n if (type2.equals(FeatureUtils.PRTypeEnum.POSSESSIVE)) {\r\n for (int i = antes.size() - 1; i >= 0; i--) {\r\n Annotation np1 = antes.get(i);\r\n if (sentNum(np1, np2, doc) == 0) {\r\n if (GramRole.getValue(np1, doc).equals(\"SUBJECT\")) {\r\n // &&SyntaxUtils.isMainClause(np1, parse)){\r\n if (DEBUG) {\r\n System.err.println(\"Rule 6a match!!!\");\r\n }\r\n if (subject == null) {\r\n subjectNum = nums.get(i);\r\n subject = antes.get(i);\r\n }\r\n }\r\n }\r\n }\r\n if (subject != null) {\r\n union(subjectNum.intValue(), num);\r\n return subject;\r\n }\r\n }\r\n\r\n return null;\r\n}", "private void init(){\r\n\t\t// already checked that this is a valid file and reader\r\n\t\ttokenizer = new StreamTokenizer(reader);\r\n\t\ttokenizer.slashSlashComments(true);\r\n\t\ttokenizer.slashStarComments(true);\r\n\t\ttokenizer.wordChars('_', '_');\r\n\t\ttokenizer.wordChars('.', '.');\r\n\t\ttokenizer.ordinaryChar('/');\r\n\t\ttokenizer.ordinaryChar('-');\r\n\t\tfillKeywords();\r\n\t\t//tokenChoose = new TokenChooser();\r\n\t}", "private ArrayList<String> parseDocsFile(String file_name){\r\n // extract each <DOC> ... </DOC> from file AS string (corpus)\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 scanner.useDelimiter(\"</DOC>\"); // END of Next()\r\n while (scanner.hasNext())\r\n {\r\n list.add(scanner.next()+\"</DOC>\");\r\n }\r\n list.remove(list.size()-1);\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 void main( String[] args ) {\n Optional< WordFeed > wordFeed = new WordFeedProvider().buildWordFeed();\n if ( !wordFeed.isPresent() || !wordFeed.get().hasNext() ) {\n System.out.println( \"Unable to read selected file. Aborting analysis.\" );\n return;\n }\n\n TextAnalyzer textAnalyzer = new TextAnalyzer();\n textAnalyzer.process( wordFeed.get() );\n textAnalyzer.report( new SystemOutReporter() );\n }", "public static List<String> parseDocument(Path file) throws IOException {\n List<String> words = new ArrayList<>();\n try (BufferedReader br = Files.newBufferedReader(file)) {\n String line;\n while ((line = br.readLine()) != null) {\n char[] characters = line.trim().toCharArray();\n int startPosition = -1;\n for (int i = 0; i < characters.length; i++) {\n char c = characters[i];\n if (!Character.isAlphabetic(c)) {\n if (startPosition == -1) {\n continue;\n }\n words.add(new String(characters, startPosition, i - startPosition).toLowerCase());\n startPosition = -1;\n } else if (Character.isAlphabetic(c) && startPosition == -1) {\n startPosition = i;\n }\n }\n if (startPosition != -1) {\n words.add(new String(characters, startPosition, characters.length - startPosition).toLowerCase());\n }\n }\n }\n return words;\n }", "@Test\r\n public void testSentencesFromFile() throws IOException {\r\n System.out.print(\"Testing all sentences from file\");\r\n int countCorrect = 0;\r\n int countTestedSentences = 0;\r\n\r\n for (ArrayList<String> sentences : testSentences) {\r\n String correctSentence = sentences.get(0);\r\n System.out.println(\"testing '\" + correctSentence + \"' variations\");\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n int countSub = 0;\r\n for (String s : sentences) {\r\n String output = sc.correctPhrase(s);\r\n countSub += correctSentence.equals(output) ? 1 : 0;\r\n System.out.println(String.format(\"Input \\\"%1$s\\\" returned \\\"%2$s\\\", equal: %3$b\", s, output, correctSentence.equals(output)));\r\n collector.checkThat(\"input sentence: \" + s + \". \", output, IsEqual.equalTo(correctSentence));\r\n countTestedSentences++;\r\n }\r\n System.out.println(String.format(\"Correct answers for '%3$s': (%1$2d/%2$2d)\", countSub, sentences.size(), correctSentence));\r\n System.out.println();\r\n countCorrect += countSub;\r\n }\r\n\r\n System.out.println(String.format(\"Correct answers in total: (%1$2d/%2$2d)\", countCorrect, countTestedSentences));\r\n System.out.println();\r\n }", "public void process(String infilename, String outfilename)\n throws IOException, Exception\n {\n PrintWriter pw = new PrintWriter(new FileWriter(outfilename));\n List<Result> resultList = this.api.processCitationsFromFile(infilename);\n for (Result result : resultList) {\n if (result != null) {\n\t/** Add cuis in evterms to cui set */\n\tfor (Utterance utterance : result.getUtteranceList()) {\n\t for (PCM pcm : utterance.getPCMList()) {\n\t for (Mapping map : pcm.getMappingList()) {\n\t for (Ev mapEv : map.getEvList()) {\n\t\tpw.println(infilename + \"|\" + \n\t\t\t pcm.getPhrase().getPhraseText() + \"|(\" +\n\t\t\t pcm.getPhrase().getPosition().getX() + \",\" + pcm.getPhrase().getPosition().getY() + \")|\" +\n\t\t\t mapEv.getScore() + \"|\" + \n\t\t\t mapEv.getConceptId() + \"|\" +\n\t\t\t ((mapEv.getNegationStatus() == 0) ? \"POS\" : \"NEG\") + \"|\" +\n\t\t\t mapEv.getConceptName () + \n\t\t\t pprintBracketedList(mapEv.getSemanticTypes(), \",\") + \"|\" +\n\t\t\t mapEv.getPreferredName() + \"|\" +\n\t\t\t pprintBracketedList(mapEv.getMatchedWords(), \",\") + \"|\" +\n\t\t\t pprintBracketedList(mapEv.getSources(), \",\") + \"|\");\n\t }\n\t }\n\t }\n\t}\n }\n }\n }", "private void getSentenceTense(String pos)\n\t{\n\t\tif (pos.equalsIgnoreCase(\"VBD\")) // I ate pizza. \n\t\t\tSentenceTenseDirection = Tense_Direction.PAST; \n\t\tif (pos.equalsIgnoreCase(\"VB\"))\tTenseFlag=true; \n\t\tif (pos.equalsIgnoreCase(\"MD\"))\tModalFlag=true; \n\t\tif ((TenseFlag == true) && (ModalFlag==true)) // I will eat pizza. \n\t\t\tSentenceTenseDirection = Tense_Direction.FUTURE; \n\t\tif (((TenseFlag == true) && (ModalFlag==false)) || (pos.equalsIgnoreCase(\"VBP\"))) // I eat pizza. \n\t\t\tSentenceTenseDirection = Tense_Direction.PRESENT;\n\t\t\n\t\t// ============== Get Type of Tense: Simple, Continuous, Perfect, Perfect Continuous\n\t\tif (pos.equalsIgnoreCase(\"VBG\")) \n\t\t{\n\t\t\tContinuousFlag=true;\n\t\t\tSentenceTenseModifier = Tense_Modifier.CONTINUOUS; // Continuous: eating, smoking, ...\n\t\t}\n\t\t\n\t\tif (pos.equalsIgnoreCase(\"VBN\"))\n\t\t{\n\t\t\tPerfectFlag=true;\n\t\t\tSentenceTenseModifier = Tense_Modifier.PERFECT; // Perfect: eaten \n\t\t}\n\t\t\n\t\tif ((ContinuousFlag==true) && (PerfectFlag==true))\n\t\t{\n\t\t\tPerfectContinuousFlag = true;\n\t\t\tPerfectFlag = false;\n\t\t\tContinuousFlag = false;\n\t\t\tSentenceTenseModifier = Tense_Modifier.PERFECT_CONTINUOUS; // I will have been eating pizza. \n\t\t}\n\t\t\n\t\tif ((PerfectFlag || ContinuousFlag || PerfectContinuousFlag)) {} else // Perfect Simple: I ate pizza. \n\t\t\tSentenceTenseModifier = Tense_Modifier.SIMPLE; \n\t\n\t}", "public static void main(String[] args) {\n\t\tPropertyManager.setPropertyFilePath(\"/home/francesco/Desktop/NLP_HACHATHON_4YFN/TextDigesterConfig.properties\");\n\t\t\n\t\tString text = MultilingImport.readText(\"/home/francesco/Desktop/NLP_HACHATHON_4YFN/EXAMPLE_TEXTS/multilingMss2015Training/body/text/\" + lang + \"/\" + docName);\n\n\t\t/* Process text document */\n\t\tLangENUM languageOfHTMLdoc = FlProcessor.getLanguage(text);\n\t\t\n\t\tTDDocument TDdoc = FlProcessor.generateDocumentFromFreeText(text, null, languageOfHTMLdoc);\n\n\t\t// Store GATE document\n\t\tWriter out = null;\n\t\ttry {\n\t\t\tout = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(\"/home/francesco/Desktop/NLP_HACHATHON_4YFN/EXAMPLE_TEXTS/\" + lang + \"_\" + docName.replace(\".txt\", \"_GATE.xml\")), \"UTF-8\"));\n\t\t} catch (UnsupportedEncodingException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tout.write(TDdoc.getGATEdoc().toXml());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tout.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\ttry {\n\t\t\tLexRankSummarizer lexRank = new LexRankSummarizer(languageOfHTMLdoc, SentenceSimilarityENUM.cosineTFIDF, false, 0.01);\n\t\t\tMap<Annotation, Double> sortedSentences = lexRank.sortSentences(TDdoc);\n\t\t\t\n\t\t\tList<Annotation> sentListOrderedByRelevance = new ArrayList<Annotation>();\n\t\t\tfor(Entry<Annotation, Double> sentence : sortedSentences.entrySet()) {\n\t\t\t\tlogger.info(\"Score: \" + sentence.getValue() + \" - '\" + GtUtils.getTextOfAnnotation(sentence.getKey(), TDdoc.getGATEdoc()) + \"'\");\n\t\t\t\tsentListOrderedByRelevance.add(sentence.getKey());\n\t\t\t}\n\t\t\t\n\t\t\tlogger.info(\"Summary max 100 tokens: \");\n\t\t\tList<Annotation> summarySentences = GtUtils.orderAnnotations(sentListOrderedByRelevance, TDdoc.getGATEdoc(), 100);\n\t\t\tfor(Annotation ann : summarySentences) {\n\t\t\t\tlogger.info(GtUtils.getTextOfAnnotation(ann, TDdoc.getGATEdoc()));\n\t\t\t}\n\t\t} catch (TextDigesterException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t*/\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n\t\tString modelFilePath = \"java//opennlpmodels//en-token.bin\";\n\t\tInputStream modelIn = new FileInputStream(modelFilePath);\n\n\t\ttry {\n\t\t\tTokenizerModel model = new TokenizerModel(modelIn);\n\t\t\tTokenizer tokenizer = new TokenizerME(model);\n\t\t\tString tokens[] = tokenizer.tokenize(\"An input sample sentence.\");\n\t\t\t\n\t\t for (String item : tokens ) {\n\t\t\t System.out.println(item);\n\t\t }\n\t\t \n\t\t}\n\t\tcatch (IOException e) {\n\t\t e.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t if (modelIn != null) {\n\t\t try {\n\t\t modelIn.close();\n\t\t }\n\t\t catch (IOException e) {\n\t\t }\n\t\t }\n\t\t}\n\t}", "public static LeanDocument readDocumentOld(String directory, int docID)\n throws IOException\n{\n // Open the document\n String corefFilename = directory + \"/\" + docID + \"/answer.key.corrected\";\n LeanDocument doc = new LeanDocument(docID);\n // This will keep track of the number of chains\n\n LineIterator fi = new LineIterator(new File(corefFilename));\n String line;\n while (fi.hasNext()) {\n line = fi.next();\n\n String[] parse = line.split(\",\");\n int currentID = Integer.parseInt(parse[0]);\n\n // int start = Integer.parseInt(parse[1]);\n // int end = Integer.parseInt(parse[2]);\n int corefID = Integer.parseInt(parse[3]);\n\n // The rest of the line belongs to the text of the NP\n StringBuilder npText1 = new StringBuilder(parse[4]);\n for (int i = 5; i < parse.length; i++) {\n npText1.append(\",\").append(parse[i]);\n }\n String npText = npText1.toString();\n // Make sure that we read the np until the end (across newlines)\n while (!npText.endsWith(\"<END>#\") && !npText.endsWith(\"<END>*\") && fi.hasNext()) {\n // add back the endl\n line = fi.next();\n npText1.append(\"\\n\").append(line);\n npText = npText1.toString();\n }\n if (npText.charAt(npText.length() - 1) == '#') {\n // we have a source\n npText = npText.substring(0, npText.length() - 6);\n\n // Now we have all the info, create a new np\n if (doc.NPchains.containsKey(currentID)) throw new RuntimeException(\"Id \" + currentID + \" read twice.\");\n doc.NPchains.put(currentID, corefID);\n TreeMap<Integer, Integer> cluster;\n if (corefID < 0 || !doc.clusters.containsKey(corefID)) {\n doc.numChains++;\n }\n if (doc.clusters.containsKey(corefID)) {\n cluster = doc.clusters.get(corefID);\n }\n else {\n cluster = new TreeMap<Integer, Integer>();\n doc.clusters.put(corefID, cluster);\n }\n cluster.put(currentID, currentID);\n\n }\n }\n // Take care of singleton clusters (marked -1)\n TreeMap<Integer, Integer> singl = doc.clusters.get(-1);\n if (singl != null) {\n int index = doc.numChains;\n for (Integer item : singl.keySet()) {\n TreeMap<Integer, Integer> cl = Maps.newTreeMap();\n cl.put(item, item);\n Integer itemInd = index--;\n doc.clusters.put(itemInd, cl);\n doc.NPchains.put(item, itemInd);\n }\n doc.clusters.remove(-1);\n }\n return doc;\n}", "static TreeSet<Noun> parse3rdNouns(Scanner data){\n\n\t\tint declension = 3;\n\t\tArrayList<String[]> raw = parseDataToArray(data);\n\t\tTreeSet<Noun> output = new TreeSet<Noun>();\n\n\t\tfor(String[] current : raw){ //iterate over each line from the original file.\n\n\t\t\tif(current.length != Values.NOUN_DATA_ARRAY_LENGTH_CORRECT){\n\t\t\t\tSystem.err.println(\"Error parsing a line.\");\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//System.out.println(\"Raw: \" + Arrays.toString(current));\n\n\t\t\t//current[] contains a split based on tabs. Generally {chapter, nom/gen/gender, definition}.\n\n\t\t\tint chapter = 0;\n\t\t\tString nominative = null;\n\t\t\tString genitive = null;\n\t\t\tchar gender = '-';\n\t\t\tArrayList<String> definitions = new ArrayList<String>();\n\n\t\t\t//Values.betterStringArrayPrint(current);\n\t\t\ttry{\n\t\t\t\ttry{ //try to read a noun, assuming that the chapter IS specified\n\t\t\t\t\tchapter = Integer.parseInt(current[0]);\n\t\t\t\t\tnominative = current[1].split(\", \")[0];\n\t\t\t\t\tgenitive = current[1].split(\", \")[1];\n\t\t\t\t\tgender = current[1].split(\", \")[2].charAt(0);\n\t\t\t\t\tList<String> tempDefinitions = Arrays.asList(current[2].split(\",|;\")); //definitions\n\t\t\t\t\tdefinitions.addAll(tempDefinitions);\n\t\t\t\t\tdeclension = Values.INDEX_ENDINGS_DECLENSION_THIRD;\n\t\t\t\t\t//System.out.println(\"No i-stem\");\n\t\t\t\t} catch(NumberFormatException e){ //I-Stem.\n\t\t\t\t\tchapter = Integer.parseInt(current[0].substring(0, 2));\n\t\t\t\t\tnominative = current[1].split(\", \")[0];\n\t\t\t\t\tgenitive = current[1].split(\", \")[1];\n\t\t\t\t\tgender = current[1].split(\", \")[2].charAt(0);\n\t\t\t\t\tList<String> tempDefinitions = Arrays.asList(current[2].split(\",|;\")); //definitions\n\t\t\t\t\tdefinitions.addAll(tempDefinitions);\n\t\t\t\t\tdeclension = Values.INDEX_ENDINGS_DECLENSION_THIRD_I;\n\t\t\t\t\t//System.out.println(\"i-stem\");\n\t\t\t\t}\n\t\t\t} catch(Exception e){\n\t\t\t\tSystem.err.println(\"Could not read a line!\");\n\t\t\t\tcontinue; //We can't make a noun out of the botrked line.\n\t\t\t}\n\t\t\tint genderIndex = Values.getGenderIndex(gender);\n\t\t\ttrimAll(definitions);\n\t\t\tNoun currentNoun = new Noun(nominative, genitive, chapter, genderIndex, declension, definitions);\n\t\t\tSystem.out.println(\"Added: \" + currentNoun);\n\t\t\toutput.add(currentNoun);\n\t\t}\n\n\t\treturn output;\n\t}", "protected abstract void parseFile(File f) throws IOException;", "public void inputForAnalysis() throws IOException\n {\n ArrayList<String> words = new ArrayList<String>(0);\n \n File fileName = new File(\"ciphertext.txt\");\n Scanner inFile = new Scanner(fileName);\n \n int index = 0;\n while(inFile.hasNext())\n {\n words.add(inFile.next());\n index++;\n }\n inFile.close();\n analyze(words);\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\tString modelFilePath = \"java//opennlpmodels//en-sent.bin\";\n\t\tInputStream modelIn = new FileInputStream(modelFilePath);\n\n\t\ttry {\n\t\t SentenceModel model = new SentenceModel(modelIn);\n\t\t SentenceDetectorME sentenceDetector = new SentenceDetectorME(model);\n\t\t String sentences[] = sentenceDetector.sentDetect(\" First sentence. Second B.S. U.S. sentence. \");\n\t\t \n\t\t for (String sent : sentences ) {\n\t\t\t System.out.println(sent);\n\t\t }\n\t\t \n\t\t}\n\t\tcatch (IOException e) {\n\t\t e.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t if (modelIn != null) {\n\t\t try {\n\t\t modelIn.close();\n\t\t }\n\t\t catch (IOException e) {\n\t\t }\n\t\t }\n\t\t}\n\t}", "@ParameterizedTest\n\t@CsvSource({\"/inhrt.wl\", // Detects correct inheritance\n\t\t\"/inhrtVar.wl\", // Detects correct inheritance of variables\n\t\t\"/classVarInit.wl\", // Test referencing class variables.\n\t\t\"/assignExprRef.wl\", // Test referencing class variables from assign expression.\n\t\t\"/vnm.wl\", // Test method and class variable having the same name\n\t\t\"/methRedef.wl\", // Test inheritance method redefinition\n\t\t\"/methVarRef.wl\", // Test referencing variables in a method\n\t\t\"/objMethExpr.wl\", // Test referencing methods with . operator\n\t\t\"/locMethRef.wl\", // Test that using local method references is correct\n\t\t\"/objInstance.wl\",// Create instance of object correctly\n\t\t\"/copy.wl\", // Check the overriding of SELF_TYPE methods\n\t\t\"/ref.wl\",\n\t\t\"/methClassVarRedef.wl\", // check referenced class vars in methods before they are redefed in method\n\t\t\"/forwardAttributeReference1.wl\"\n\t\t})\n\tvoid posTests(String file) throws IOException {\n\t\tParseTree tree;\n\t\t\n\t\tWoolRunnerImpl imp = WoolFactory.makeParserRunner(\n\t\t\t\tCharStreams.fromFileName(posFilesLoc+file));\n\t\ttree = imp.parse();\n\t\t\n\t\ttree.accept(stb);\n\t\ttree.accept(stc);\n\t\t\n\t\tassertTrue(true);\n\t}", "public List<Section> processDocument(String path) throws FileNotFoundException {\n\t\tList<Section> finalSections = new ArrayList<Section>();\r\n\t\t// Load file to process...\r\n\t\tInputStream input = new FileInputStream(\r\n\t\t\t\tpath.replace(\"\\\\\", \"/\").substring(1, path.replace(\"\\\\\", \"/\").length() - 1));\r\n\t\tFile file = new File(path);\r\n\t\ttry {\r\n\t\t\t// Use PdfBox library to load PDF Stream with their geometric descriptors...\r\n\t\t\tPDDocument doc = PDDocument.load(input);\r\n\t\t\tDocument resultDoc = new Document();\r\n\t\t\t// Create maps to hold fonts used in the processed document .\r\n\t\t\tfinal Map<Object, Integer> fonts = new HashMap<Object, Integer>();\r\n\t\t\tfinal Map<Integer, Font> idToFont = new HashMap<Integer, Font>();\r\n\t\t\t// If the document have multiple pages, manages the segmentation page by page...\r\n\t\t\tfor (int i = 0; i < doc.getNumberOfPages(); i++) {\r\n\t\t\t\tPDPage page = (PDPage) doc.getDocumentCatalog().getAllPages().get(i);\r\n\t\t\t\t// Set up pdf page object.\r\n\t\t\t\tPage pdfPage = new Page();\r\n\t\t\t\tpdfPage.setPageRotation(page.findRotation());\r\n\t\t\t\tpdfPage.setPageWidth(page.findMediaBox().getWidth());\r\n\t\t\t\tpdfPage.setPageHeight(page.findMediaBox().getHeight());\r\n\t\t\t\tpdfPage.setOffsetUpperRightX(\r\n\t\t\t\t\t\tpage.findMediaBox().getUpperRightX() - page.findCropBox().getUpperRightX());\r\n\t\t\t\tpdfPage.setOffsetUpperRightY(\r\n\t\t\t\t\t\tpage.findMediaBox().getUpperRightY() - page.findCropBox().getUpperRightY());\r\n\t\t\t\tpdfPage.setNumber(i);\r\n\t\t\t\t// Extracting textual content of each page.\r\n\t\t\t\tPDStream contents = page.getContents();\r\n\t\t\t\tif (contents != null) {\r\n\t\t\t\t\tif (true) {\r\n\t\t\t\t\t\tTextExtractor extractor = new TextExtractor(pdfPage, idToFont, fonts);\r\n\t\t\t\t\t\textractor.processStream(page, page.findResources(), contents.getStream());\r\n\t\t\t\t\t\tpdfPage.setLines(extractor.getLines());\r\n\t\t\t\t\t\textractor.getTextMatrix();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Add pages decorated by geometric descriptors to the doc to segment ...\r\n\t\t\t\tresultDoc.getPages().add(pdfPage);\r\n\t\t\t\tfor (Entry<Integer, Font> e : idToFont.entrySet()) {\r\n\t\t\t\t\tresultDoc.getFonts().add(e.getValue());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Process extracting document Sections...\r\n\t\t\tPdfBlockExtractor pdfExtractor = new PdfBlockExtractor();\r\n\t\t\tList<Block> extractedBlocks = pdfExtractor.extractBlocks(resultDoc,\r\n\t\t\t\t\tpath.split(File.separator + File.separator)[1]);\r\n\r\n\t\t\t// Generating final result....\r\n\t\t\tgenerateFinalSegmentationResults(finalSections, extractedBlocks);\r\n\r\n\t\t\tdoc.close();\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn finalSections;\r\n\t}", "public void getNounPhrases(Parse p) {\n if (p.getType().equals(\"NN\") || p.getType().equals(\"NNS\") || p.getType().equals(\"NNP\") \n || p.getType().equals(\"NNPS\")) {\n nounPhrases.add(p.getCoveredText()); //extracting the noun parse\n }\n \n if (p.getType().equals(\"VB\") || p.getType().equals(\"VBP\") || p.getType().equals(\"VBG\")|| \n p.getType().equals(\"VBD\") || p.getType().equals(\"VBN\")) {\n \n verbPhrases.add(p.getCoveredText()); //extracting the verb parse\n }\n \n for (Parse child : p.getChildren()) {\n getNounPhrases(child);\n }\n}", "public static void main(String[] args) {\n\t\ttry (InputStream modelInputStream = new FileInputStream(new File(\"en-frograt.bin\"));) {\r\n\r\n\t\t\tString testString = \"Amphibians are animals that dwell in wet environments\";\r\n\t\t\t\r\n\t\t\tDoccatModel documentCategorizationModel = new DoccatModel(modelInputStream);\r\n\t\t\tDocumentCategorizerME documentCategorizer = new \r\n\t\t\tDocumentCategorizerME(documentCategorizationModel);\r\n\t\t\t\r\n\t\t\tdouble[] probabilities = documentCategorizer.categorize(testString);\r\n\t\t\tString bestCategory = documentCategorizer.getBestCategory(probabilities);\r\n\t\t\tSystem.out.println(\"The best fit is: \" + bestCategory);\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < documentCategorizer.getNumberOfCategories(); i++) {\r\n\t\t\t System.out.printf(\"Category: %-4s - %4.2f\\n\", \r\n\t\t\t documentCategorizer.getCategory(i), probabilities[i]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(documentCategorizer.getAllResults(probabilities));\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t // Handle exceptions\r\n\t\t} catch (IOException e) {\r\n\t\t // Handle exceptions\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic void test3() throws IOException, LexerException, ParserException {\r\n\t\tStringReader ex = new StringReader(\"(lam^s f.\\n\\t(lam^s x.x) (f 1))\\n(lam^c y.\\n\\t(lam^s z.z) y)\");\r\n\r\n\t\tParser parser = new Parser();\r\n\t\tTerm result = parser.Parsing(ex);\r\n\t}", "@Override\n\tpublic Document parse(final CharSequence content) {\n\t\tfinal LagartoParser lagartoParser = new LagartoParser(config.parserConfig, content);\n\t\treturn parseWithLagarto(lagartoParser);\n\t}", "public PCLParser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "private void extractFile() {\n try (BufferedReader buffered_reader = new BufferedReader(new FileReader(source_file))) {\n String line;\n while((line = buffered_reader.readLine()) != null) {\n String spaceEscaped = line.replace(\" \", \"\");\n //file was read, each line is one of the elements of the file_read_lines list\n //line 0 is keyword \"TELL\"\n //line 1 is the knowledge base\n //line 2 is the keyword \"ASK\"\n //line 3 is the query\n file_read_lines.add(spaceEscaped);\n }\n\n //generate list of Horn clauses (raw) from the KB raw sentence\n //replace \\/ by |\n String kbLine = file_read_lines.get(1).replace(\"\\\\/\", \"|\");\n rawClauses = Arrays.asList(kbLine.split(\";\"));\n //query - a propositional symbol\n query = file_read_lines.get(3);\n } catch (IOException e) {\n //Return error if file cannot be opened\n error = true;\n System.out.println(source_file.toString() + \" is not found!\");\n }\n }" ]
[ "0.54538494", "0.5408556", "0.5300944", "0.5294719", "0.5226945", "0.51305044", "0.51184475", "0.5051737", "0.504698", "0.49098527", "0.48901078", "0.48657092", "0.48523262", "0.48085657", "0.47895372", "0.47591022", "0.47402188", "0.4736052", "0.4728838", "0.46943864", "0.46912843", "0.4687551", "0.4683377", "0.46645254", "0.4663647", "0.4661697", "0.4651434", "0.46460864", "0.4639008", "0.463602", "0.46199095", "0.46192357", "0.4614852", "0.46073166", "0.46061993", "0.45879054", "0.45843187", "0.45740482", "0.4545099", "0.45429146", "0.4538553", "0.45340976", "0.45310733", "0.45191967", "0.45092797", "0.45081007", "0.4507398", "0.44936937", "0.44906747", "0.44880295", "0.44771755", "0.44695067", "0.44623104", "0.44611558", "0.44594437", "0.44507974", "0.44443256", "0.44239813", "0.4416882", "0.4416567", "0.44124132", "0.44121063", "0.43979868", "0.4397504", "0.43958437", "0.43957072", "0.4386195", "0.43827775", "0.4382463", "0.4378914", "0.43705907", "0.4370317", "0.43693373", "0.43692127", "0.43688563", "0.4355", "0.4353512", "0.43527484", "0.43525273", "0.43464836", "0.43458647", "0.4344716", "0.43429413", "0.43425336", "0.43363515", "0.43355754", "0.4334178", "0.43275303", "0.43254122", "0.43238267", "0.4322341", "0.4318961", "0.43154174", "0.4314898", "0.4310233", "0.4309064", "0.43069488", "0.4305281", "0.43042326", "0.43020257" ]
0.6272991
0
saves the Document to the directory/fileName used for opening the Document. The document must be open.
public void save () { if (!open) { System.out.println ("ExternalDocument.save: attempt to save unopened document " + fileName); return; } try { if (format.equals("sgml")) { String tagToWrite; if (allTags) tagToWrite = null; else if (SGMLtags.length == 0) tagToWrite = "***"; // unused annotation type else if (SGMLtags.length == 1) tagToWrite = SGMLtags[0]; else { System.out.println ("ExternalDocument.save: cannot write more than 1 annotation type"); return; } String string = writeSGML(tagToWrite).toString(); File file = new File(fullFileName()); BufferedWriter writer = new BufferedWriter ( new OutputStreamWriter (new FileOutputStream(file), JetTest.encoding)); writeWithSystemNewlines (writer, string); writer.close(); } else { System.out.println ("Error saving document " + fileName); System.out.println ("Unknown document format."); } } catch (IOException e) { System.out.println ("Error opening document " + fileName); System.out.println (e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveDocument() throws IOException;", "@Override\n\tpublic void saveDocument(String path, String name) {\n\t\t\n\t}", "public static void saveDocument( Document doc, String path ) {\n\t\ttry {\n\t\t\tFormat format = Format.getPrettyFormat();\n\t\t\tXMLOutputter fmt = new XMLOutputter( format );\n\t\t\tFile file = new File( path );\n\t\t\tOutputStream stream = new FileOutputStream( file );\n\t\t\tfmt.output( doc, stream );\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new RuntimeException( \"No se encontro el archivo: \" + path, e );\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException( \"Error al guardar el archivo: \" + path, e );\n\t\t}\n\t}", "void saveDocument(SingleDocumentModel model, Path newPath);", "private void saveAs ()\n {\n\tJFileChooser chooser = new JFileChooser ();\n\tchooser.setFileSelectionMode (chooser.FILES_ONLY);\n\tint result = chooser.showSaveDialog (this);\n\tif (result == chooser.CANCEL_OPTION)\n\t{\n\t return;\n\t}\n\n\tFile f = chooser.getSelectedFile ();\n\tif (f.exists ())\n\t{\n\t try\n\t {\n\t\tresult = \n\t\t JOptionPane.showConfirmDialog (\n this,\n\t\t\t\"Overwrite existing file \\\"\" + f.getCanonicalPath () + \n\t\t\t\"\\\"?\",\n\t\t\t\"File Exists\",\n\t\t\tJOptionPane.YES_NO_OPTION);\n\n\t\tif (result != JOptionPane.YES_OPTION)\n\t\t{\n\t\t return;\n\t\t}\n\n\t\tf.delete ();\n\t }\n\t catch (IOException ex)\n\t {\n\t\tthrow new ShouldntHappenException (ex);\n\t }\n\t}\n\n\tString text;\n\tsynchronized (myDocument)\n\t{\n\t int len = myDocument.getLength ();\n\t try\n\t {\n\t\ttext = myDocument.getText (0, len);\n\t }\n\t catch (BadLocationException ex)\n\t {\n\t\tthrow new ShouldntHappenException (ex);\n\t }\n\t}\n\n\ttry\n\t{\n\t FileWriter fw = new FileWriter (f);\n\t fw.write (text);\n\t fw.flush ();\n\t fw.close ();\n\t}\n\tcatch (IOException ex)\n\t{\n\t JOptionPane.showMessageDialog (null,\n\t\t\t\t\t ex.getMessage (),\n\t\t\t\t\t \"Write Error\",\n\t\t\t\t\t JOptionPane.ERROR_MESSAGE);\n\t}\n }", "public static native boolean saveDocument(String doc, String toFile);", "public void save(String savePath) throws IOException {\n try (FileWriter fw = new FileWriter(savePath)) {\n fw.write(reportDoc.toString());\n }\n }", "public static void save() {\n Game.save(UI.askNgetString(\"Filename for this save file?\")+\".xml\");\n }", "public void save(){\n\tif(currentFile == null){\n\t // TODO: add popup to select where to save file and file name\n\t // currentFile = new TextFile(os, title, null);\n\t}else{\n\t currentFile.setBody(textArea.getText());\n\t}\n }", "public void save() {\n\t\tWriteFile data = new WriteFile( this.name + \".txt\" );\n\t\ttry {\n\t\t\t data.writeToFile(this.toString());\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(\"Couldn't print to file\");\n\t\t}\n\t}", "public void saveFile() {\r\n File savedFile = new File(fileName);\r\n\r\n try (FileWriter fw = new FileWriter(savedFile)) {\r\n fw.write(workSpace.getText());\r\n\r\n fw.close();\r\n } catch (IOException ex) {\r\n JOptionPane.showMessageDialog(null, \"There was an error saving the file\");\r\n }\r\n }", "public boolean doSave() {\n\n if (fDocument.getFile() == null) {\n return doSaveAs(fDocument.getFormat());\n }\n \n return fDocument.save();\n }", "public void saveChanges() throws TransformerException {\n\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\r\n\t\tTransformer transformer = transformerFactory.newTransformer();\r\n\t\tDOMSource source = new DOMSource(document);\r\n\t\tStreamResult result = new StreamResult(new File(path));\r\n\t\ttransformer.transform(source, result);\r\n\t}", "public void fileSaved(OpenDefinitionsDocument doc) { }", "public void fileSaved(OpenDefinitionsDocument doc) { }", "public void save() {\n JAXB.marshal(this, new File(fileName));\n }", "public void save() {\n\t\tBufferedWriter bw = null;\n\t\tFileWriter fw = null;\n\t\ttry {\n\t\t\tFile file = new File(\"fileSave.txt\");\n\t\t\tif(!file.exists()) {\n\t\t\t\tfile.createNewFile();\n\t\t\t}\n\t\t\tfw = new FileWriter(file);\n\t\t\tbw = new BufferedWriter(fw);\n\t\t\t//string to hold text to write on new file\n\t\t\tString text = textArea.getText();\n\t\t\t//write file\n\t\t\tif (text != null) {\n\t\t\t\tbw.write(text);\n\t\t\t}\n\t\t}\n\t\tcatch (IOException ie) {\n\t\t\tie.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (bw != null) {\n\t\t\t\t\tbw.close();\n\t\t\t\t\tfw.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (IOException ie2) {\n\t\t\t\tie2.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void writeToEditorFile(String filePath, Document doc) {\n\n boolean success = true;\n try {\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n File file = new File(filePath);\n StreamResult result = new StreamResult(file);\n transformer.transform(source, result);\n\n } catch (TransformerException pce) {\n success = false;\n pce.printStackTrace();\n } finally {\n\n if (success) {\n FeedBackLogger.sendGoodMessage(\"File Saved Successfully!!!\");\n } else {\n FeedBackLogger.sendBadMessage(\"File Didn't Saved!!\");\n }\n\n }\n\n }", "public void save() {\n Path root = Paths.get(storagePath);\n try {\n Files.copy(file.getInputStream(), root.resolve(file.getOriginalFilename()),\n StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "void save(String fileName);", "void save(String fileName) throws IOException, TransformerConfigurationException, ParserConfigurationException;", "public void saveAs() {\n editorManager.currentFileManager().saveAs();\n mimaUI.fileChanged();\n }", "public void save(){\r\n\t\t//System.out.println(\"call save\");\r\n\t\tmodel.printDoc();\r\n\t}", "public void save() throws FileNotFoundException, IOException, ClassNotFoundException ;", "public boolean save() {\n\t\treturn save(_file);\n\t}", "public void saveToFile()\n\t{\t\n\t\tsetCourseToFileString(courseToFileString);\n\t\t\ttry \n\t {\n\t FileWriter fw = new FileWriter(fileName);\n\t fw.write (this.getCourseToFileString ( ));\n\t for(Student b : this.getStudents ( ))\t \t\n\t \tfw.write(b.toFileString ( ));\n\t \tfw.close ( );\n\t } \n\t catch (Exception ex) \n\t {\n\t ex.printStackTrace();\n\t }\n\t\t\tthis.saveNeed = false;\n\n\t}", "private static void writeDocumentToFile(XWPFDocument doc, DocumentPath documentPath) throws IOException {\n requireAllNonNull(doc, documentPath);\n assert DocumentPath.isValid(documentPath.toString());\n\n try {\n FileOutputStream out = new FileOutputStream(documentPath.toString());\n doc.write(out);\n out.close();\n doc.close();\n } catch (IOException e) {\n throw e;\n }\n }", "public void save(String fileName) throws IOException;", "private void saveFile() {\n\t\ttry {\n\t\t\tFile file = jfc.getSelectedFile();\n\t\t\tint c = -1;\n\t\t\tif(file==null)\n\t\t\t{\n\t\t\t\tc = jfc.showSaveDialog(this);\n\t\t\t}\n\t\t\t\n\n\t\t\tif(file!= null || c ==0)\n\t\t\t{\t\n\t\t\t\tFileWriter fw = new FileWriter(jfc.getSelectedFile());\n\t\t\t\tfw.write(jta.getText());\n\t\t\t\tfw.close();\n\t\t\t\tSystem.out.println(\"파일을 저장하였습니다\");\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t\n\t\t} catch (Exception e2) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.out.println(e2.getMessage());\n\t\t}\n\t}", "private void saveAs() {\n\t\tFileChooser fileChooser = new FileChooser();\n\n\t\t// Set extension filter\n\t\tFileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter(\n\t\t\t\t\"XML files (*.xml)\", \"*.xml\");\n\t\tfileChooser.getExtensionFilters().add(extFilter);\n\n\t\t// Show save file dialog\n\t\tFile file = fileChooser.showSaveDialog(mainApp.getPrimaryStage());\n\n\t\tif (file != null) {\n\t\t\t// Make sure it has the correct extension\n\t\t\tif (!file.getPath().endsWith(\".xml\")) {\n\t\t\t\tfile = new File(file.getPath() + \".xml\");\n\t\t\t}\n\t\t\tmainApp.saveFilmDataToFile(file);\n\t\t}\n\t}", "boolean saveDocument(String path, String documentContent, Charset charset, List <String> moduleList);", "public static void saveDocument(String path, String textToWrite, Configuration c){\n File f = new File(path);\n Writer out = null;\n try{\n if(f.exists()){\n //JOptionPane.showMessageDialog(null, \"You have overwritten the previous file. This message should be better prepared.\");\n if(!c.getOverWriteAll()){\n String[] options = new String[] {\"Rewrite all\", \"Yes\", \"No\"};\n int response = JOptionPane.showOptionDialog(null, \"The file \"+f.getName()+\" already exists. Do you want to overwrite it?\", \"Existing File!\",JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE,null, options, options[0]);\n //0 -> yes to all. 1 -> Yes. 2-> No\n if(response == 0)c.setOverwriteAll(true); \n if(response == 2)return; //else we continue rewriting the file.\n }\n }\n else{\n f.createNewFile();\n }\n out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(f), \"UTF-8\"));\n out.write(textToWrite);\n out.close();\n }catch(IOException e){\n System.err.println(\"Error while creating the file \"+e.getMessage()+\"\\n\"+f.getAbsolutePath());\n } \n \n }", "private void xmlSave() {\r\n FileDialog fd = new FileDialog(new Frame(), \r\n \"Save as a jMusic XML file...\", \r\n FileDialog.SAVE);\r\n fd.show();\r\n if (fd.getFile() != null) {\r\n jm.util.Write.xml(score, fd.getDirectory() + fd.getFile());\r\n }\r\n }", "public abstract boolean processSaveDocument(Document document);", "void saveAs() {\n writeFile.Export();\n }", "private void savePressed(){\n\t\t\n\t\tJFileChooser fileChooser = new JFileChooser(System.getProperty(\"user.dir\"));\n\t\tFileNameExtensionFilter extentions = new FileNameExtensionFilter(\"SuperCalcSave\", \"scalcsave\");\n\t\tfileChooser.setFileFilter(extentions);\n\t\tint retunedVal = fileChooser.showSaveDialog(this);\n\t\tFile file = null;\n\t\tif(retunedVal == JFileChooser.APPROVE_OPTION){\n\t\t\tfile = fileChooser.getSelectedFile();\n\t\t\t//make sure file has the right extention\n\t\t\tif(file.getAbsolutePath().contains(\".scalcsave\"))\n\t\t\t\tfile = new File(file.getAbsolutePath());\n\t\t\telse\n\t\t\t\tfile = new File(file.getAbsolutePath()+\".scalcsave\");\n\t\t}\n\t\t//only continue if a file is selected\n\t\tif(file != null){\t\n\t\t\ttry {\n\t\t\t\t//read in file\n\t\t\t\tObjectOutputStream output = new ObjectOutputStream(new FileOutputStream(file));\n\t\t\t\toutput.writeObject(SaveFile.getSaveFile());\n\t\t\t\toutput.close();\n\t\t\t\tSystem.out.println(\"Save Success\");\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public static void saveDocument(Document doc, File file) throws Exception {\r\n if (doc == null || file == null)\r\n return;\r\n\r\n TransformerFactory tFactory = TransformerFactory.newInstance();\r\n Transformer transformer = tFactory.newTransformer();\r\n\r\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n transformer.setOutputProperty(\r\n \"{http://xml.apache.org/xslt}indent-amount\", \"2\");\r\n\r\n DOMSource source = new DOMSource(doc);\r\n StreamResult result = new StreamResult(file);\r\n transformer.transform(source, result);\r\n }", "void save(File file);", "void save(XMLDocument document, XMLStreamWriter writer) throws XMLStreamException;", "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 write() throws IOException {\n\t\tfinal String timeLog = LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd_HH-mm-ss\"));\n\t\tfinal File file = new File(\"wordsaurier-document-\" + timeLog + \".txt\");\n\t\t\n\n\t\ttry (OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8)) {\n\t\t\t\n\n\t\t\t\n\t\t\twriter.write(\"Wordsaurier document\\r\\n\");\n\t\t\twriter.write(this.documentSpecification.toString() + \"\\r\\n\");\n\t\t\twriter.write(\"---------------------\\r\\n\");\n\t\t\twriter.write(this.document.getContent());\n\t\t\tLOG.info(\"document was written to {}\", file.getCanonicalPath());\n\t\t\t\n\t\t} catch (final IOException e) {\n\t\t\tthrow e;\n\t\t}\n\t}", "private void saveFile() {\n if (fileExisted == false) {\n JFileChooser fChoice = new JFileChooser();\n int choice = fChoice.showSaveDialog(this);\n if (choice == JFileChooser.APPROVE_OPTION) {\n File f = fChoice.getSelectedFile();\n //\n if(!f.getName().contains(\".txt\")){\n File fN=new File(f.getParent(), f.getName()+\".txt\");\n FileDAO.writeFile(fN, txtContent);\n fMain = fN;\n fileExisted = true;\n lastSave=true;\n this.setTitle(fN.getName());\n }\n else{\n \n FileDAO.writeFile(f, txtContent);\n fMain = f;\n fileExisted = true;\n lastSave=true;\n this.setTitle(f.getName());\n } \n \n }\n } else if (fileExisted == true) {\n FileDAO.writeFile(fMain, txtContent);\n lastSave=true;\n }\n\n }", "void save(String filename);", "private void save() throws FileNotFoundException {\n\t\tm.write(new FileOutputStream(OUTPUT), \"RDF/XML\");\n\t}", "void saveToFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile target = new File(directory, FILE_NAME);\n\t\t\tif (!target.exists()) {\n\t\t\t\ttarget.createNewFile();\n\t\t\t}\n\t\t\tJsonWriter writer = new JsonWriter(new FileWriter(target));\n\t\t\twriter.setIndent(\" \");\n\t\t\twriter.beginArray();\n\t\t\tfor (Scoreboard scoreboard : scoreboards.values()) {\n\t\t\t\twriteScoreboard(writer, scoreboard);\n\t\t\t}\n\t\t\twriter.endArray();\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}", "@Override\r\n\tpublic void doSaveAs() {\r\n\t\tSaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());\r\n\t\tsaveAsDialog.open();\r\n\t\tIPath path = saveAsDialog.getResult();\r\n\t\tif (path != null) {\r\n\t\t\tIFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);\r\n\t\t\tif (file != null) {\r\n\t\t\t\tdoSaveAs(URI.createPlatformResourceURI(file.getFullPath()\r\n\t\t\t\t\t\t.toString(), true), new FileEditorInput(file));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void saveDocumentAs( final URL url ) {\n\t\ttry {\n\t\t\tSystem.out.println( \"Saving to: \" + url );\n\t\t\tif ( _optics.save( this ) ) {\n\t\t\t\tsetHasChanges( false );\n\t\t\t\t// to do: really should make a logbook entry about this\n\t\t\t}\n\t\t\telse {\n\t\t\t\tJOptionPane.showMessageDialog( getMainWindow(), \"The save operation was cancelled.\", \"Save Cancelled\" , JOptionPane.WARNING_MESSAGE );\n\t\t\t}\n\t\t}\n\t\tcatch( Exception exception ) {\n\t\t\tdisplayError( \"Save Failed\", \"Exception while attempting to save changes\", exception );\n\t\t}\n\t}", "@FXML\n\tpublic void saveFile() {\n\t\tif (file == null) {\n\t\t\tFileChooser saveFileChooser = new FileChooser();\n\t\t\tsaveFileChooser.setInitialDirectory(userWorkspace);\n\t\t\tsaveFileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter(\"Text doc(*.txt)\", \"*.txt\"));\n\t\t\tfile = saveFileChooser.showSaveDialog(ap.getScene().getWindow());\n\t\t}\n\n\t\tif (file.getName().endsWith(\".txt\")) {\n\t\t\ttry {\n\t\t\t\tfilePath = file.getAbsolutePath();\n\t\t\t\tStage primStage = (Stage) ap.getScene().getWindow();\n\t\t\t\tprimStage.setTitle(filePath);\n\t\t\t\tTab tab = tabPane.getSelectionModel().getSelectedItem();\n\t\t\t\ttab.setId(filePath);\n\t\t\t\ttab.setText(file.getName());\n\n\t\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(file));\n\t\t\t\tPrintWriter output = new PrintWriter(writer);\n\t\t\t\toutput.write(userText.getText());\n\t\t\t\toutput.flush();\n\t\t\t\toutput.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(file.getName() + \" has no valid file-extenstion.\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "public void autoSave(){\n\t\ttry {\n\t\t\t//read in file\n\t\t\tFile file = new File(System.getProperty(\"user.dir\")+\"/Default.scalcsave\");\n\t\t\tObjectOutputStream output = new ObjectOutputStream(new FileOutputStream(file));\n\t\t\toutput.writeObject(SaveFile.getSaveFile());\n\t\t\toutput.close();\n\t\t\tSystem.out.println(\"Save Success\");\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void saveAs() {\n\t\tJFileChooser fc = new JFileChooser(\"./\");\n\t\tBufferedWriter bw = null;\n\t\tFileWriter fw = null;\n\t\tint returnValue = fc.showSaveDialog(contentPane);\n\t\t\n\t\tif(returnValue == JFileChooser.APPROVE_OPTION) {\n\t\t\ttry {\n\t\t\t\tString path = fc.getCurrentDirectory().getAbsolutePath();\n\t\t\t\tString name = fc.getSelectedFile().getName();\n\t\t\t\tif(!name.endsWith(\".txt\")) {\n\t\t\t\t\tname += \".txt\";\n\t\t\t\t}\n\t\t\t\tFile file = new File(path,name);\n\t\t\t\t\n\t\t\t\tfw = new FileWriter(file);\n\t\t\t\tbw = new BufferedWriter(fw);\n\t\t\t\t//string to hold each line to write on new file\n\t\t\t\tString text = textArea.getText();\n\t\t\t\t//write file\n\t\t\t\tif (text != null) {\n\t\t\t\t\tbw.write(text);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (IOException ie) {\n\t\t\t\tie.printStackTrace();\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\ttry {\n\t\t\t\t\tif (bw != null) {\n\t\t\t\t\t\tbw.close();\n\t\t\t\t\t\tfw.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (IOException ie2) {\n\t\t\t\t\tie2.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void save() throws IOException, ParserConfigurationException, TransformerConfigurationException;", "public void saveNewRollManager()\n\t{\n\t JFileChooser chooser = new JFileChooser(); //allows the user to choose a file\n\t chooser.setCurrentDirectory(new File(\"/home/me/Documents\"));\t//sets the directory of where to find the file\n\t int retrival = chooser.showSaveDialog(null);\n\t if (retrival == JFileChooser.APPROVE_OPTION) {\n\t try \n\t {\n\t FileWriter fw = new FileWriter(chooser.getSelectedFile()+\".txt\");\n\t fw.write (getCourseToFileString ( ));\n\t for(Student b : getStudents ( ))\t \t\n\t \tfw.write(b.toFileString ( ));\n\t \tfw.close ( );\n\t \t;\n\t } \n\t catch (Exception ex) \n\t {\n\t ex.printStackTrace();\n\t }\n\t\t\tthis.saveNeed = false;\n\n\t }\n\t \n\t}", "void saveFile() {\n\t\tJFileChooser fileChooser = new JFileChooser(desktopPath);\n\t\tint returnVal = fileChooser.showSaveDialog(null);\n\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile filePath = fileChooser.getSelectedFile();\n\t\t\ttry {\n\t\t\t\tPrintWriter writer = new PrintWriter(filePath);\n\t\t\t\tScanner out = new Scanner(textEditor.getText());\n\t\t\t\twhile(out.hasNextLine()) {\n\t\t\t\t\twriter.println(out.nextLine());\n\t\t\t\t}\n\t\t\t\tout.close();\n\t\t\t\twriter.close();\n\t\t\t\ttextAreaChanged =false;\n\t\t\t\tsavedFilePath = filePath.getPath();\n\t\t\t\terrorTextArea.setText(\"\");\n\t\t\t} catch (Exception ex) {\n\t\t\t\terrorTextArea.setForeground(Color.RED);\n\t\t\t\terrorTextArea.setText(\"Error saving file\");\n\t\t\t}\n\t\t}\n\t}", "private void writeXmlFile( Document doc, String file_path ) {\r\n\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tTransformerFactory tf = TransformerFactory.newInstance();\r\n\t\t\tTransformer transformer = tf.newTransformer();\r\n\t\t\tDOMSource source \t\t= new DOMSource( doc );\r\n\t\t\tStreamResult result \t= new StreamResult( new File( file_path ));\r\n\t\t\t\r\n\t\t\t// Output to console for testing\r\n\t\t\t// StreamResult result = new StreamResult(System.out);\r\n\r\n\t\t\ttransformer.transform( source, result );\r\n\t\t\tSystem.out.println( \"File saved!\" );\r\n\r\n\r\n\t\t} catch ( TransformerException e ) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "Saver() throws IOException\n\t\t{\n\t\t\tthis(new File(file.getParentFile(),\n\t\t\t\t\"#\" + file.getName() + \"#save#\"));\n\t\t}", "@Override\n\tpublic void save() {\n\t\t\n\t\tFile savingDirectory = new File(savingFolder());\n\t\t\n\t\tif( !savingDirectory.isDirectory() ) {\n\t\t\tsavingDirectory.mkdirs();\n\t\t}\n\t\t\n\t\t\n\t\t//Create the file if it's necessary. The file is based on the name of the item. two items in the same directory shouldn't have the same name.\n\t\t\n\t\tFile savingFile = new File(savingDirectory, getIdentifier());\n\t\t\n\t\tif( !savingFile.exists() ) {\n\t\t\t\n\t\t\ttry {\n\t\t\t\tsavingFile.createNewFile();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"the following item couldn't be saved: \" + getIdentifier());\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t}\n\n\t\t\n\t\t//generate the savingTextLine and print it in the savingFile. the previous content is erased when the PrintWriter is created.\n\t\t\n\t\tString text = generateSavingTextLine();\n\n\t\ttry {\n\t\t\tPrintWriter printer = new PrintWriter(savingFile);\n\t\t\tprinter.write(text);\t\t\t\n\t\t\tprinter.close();\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tsave();\n\t\t} \n\t}", "private void save()\n\t{\n\t\t//get the text\n\t\tString spssTxt = spssText.getText();\n\t\t//save it to a JS place where Java can find it\n\t\tsaveToJS(spssTxt);\n\t\t//make up a file name\n\t\tString fileName = form.getText().replace(\" \", \"_\").replace(\"\\\\\", \"\").replace(\"/\",\"\").replace(\"*\", \"\").replace(\"\\\"\", \"\")\n\t\t\t\t.replace(\"<\", \"\").replace(\">\", \"\").replace(\"#\", \"\").replace(\"'\", \"\") + \".spss\";\t\t\n\t\t\n\t\t\n\t\t\n\t\tappletHtml.setHTML(\"<APPLET codebase=\\\"fileioapplets/\\\"+\" +\n\t\t\t\t\" archive=\\\"kobo_fileIOApplets.jar, plugin.jar\\\" \"+\n\t\t\t\t\" code=\\\"org.oyrm.kobo.fileIOApplets.ui.FileSaveApplet.class\\\" \"+\n\t\t\t\t\" width=\\\"5\\\" HEIGHT=\\\"5\\\" MAYSCRIPT> \"+\n\t\t\t\t\"<param name=\\\"formName\\\" value=\\\"\"+fileName+\"\\\"/>\"+\n\t\t\t\t\"<param name=\\\"save\\\" value=\\\"\"+LocaleText.get(\"SaveSPSSFile\")+\"\\\"/>\"+\n\t\t\t\t\"</APPLET>\");\n\t}", "public void Save(){\n\tJFileChooser j = new JFileChooser(\"\"); \n\t// Invoke the showsSaveDialog function to show the save dialog \n\tint r = j.showSaveDialog(null);\n \n\tif (r == JFileChooser.APPROVE_OPTION) { \n\n\t// Set the label to the path of the selected directory \n File fi = new File(j.getSelectedFile().getAbsolutePath()); \n\n try { \n\t\t// Create a file writer \n\t\tFileWriter wr = new FileWriter(fi, false); \n\n\t\t// Create buffered writer to write \n\t\tBufferedWriter w = new BufferedWriter(wr); \n\n\t\t// Write\n\t\tw.write(t.getText()); \n\n\t\tw.flush(); \n\t\tw.close(); \n } \n catch (Exception evt) { \n\t\tJOptionPane.showMessageDialog(f, evt.getMessage()); \n } \n\t} \n\t// If the user cancelled the operation \n\telse\n JOptionPane.showMessageDialog(f, \"the user cancelled the operation\"); \n\t\t\n }", "public void doSaveAs() {\n\t\tif (activePage == 0 && introEditor.isUpdated() || introEditor.isDirty())\n\t\t\tupdateIntroEditor();\n\t\tif (activePage == 1 && (pageMainEditor.isUpdated() || pageMainEditor.isDirty()))\n\t\t\tupdateFile();\n\t\tIEditorPart editor = getTextEditor();\n\t\teditor.doSaveAs();\n\t\tsetPageText(getTextEditorIndex(), editor.getTitle());\n\t\tsetInput(editor.getEditorInput());\n\t}", "public void saveNewFile() {\n\t\tJFileChooser choose = new JFileChooser();\n\t\tif(choose.showSaveDialog(null) == JFileChooser.APPROVE_OPTION) {\n\t\ttry {\n\t\t\t\tdir=choose.getCurrentDirectory().toString();\n\t\t\t\tString fileName =dir+ \"\\\\\" + choose.getSelectedFile().getName();\n\t\t\t File file = new File(fileName);\n\t\t\t if(file.exists()) {\n\t\t\t \tint confirm = JOptionPane.showConfirmDialog(null, \n\t\t\t \t\t\t\"File already exists. Do you want to overwrite it?\",\n\t\t\t \t\t\t\"Choose one\",JOptionPane.YES_NO_OPTION);\n\t\t\t \tif(confirm == JOptionPane.NO_OPTION)return;\n\t\t\t }\n\t\t\t\tPrintWriter writer = new PrintWriter(file);\n\t\t\t\twriter.write(frame.textArea.getText());\n\t\t\t\twriter.close();\n\t\t\t\tframe.setTitle(choose.getSelectedFile().getName()+\"-Text Editor\");\n\t\t\t\tframe.originalText=frame.textArea.getText();\n\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void save() {\n File personFile = mainApp.getFilmFilePath();\n if (personFile != null) {\n mainApp.saveFilmDataToFile(personFile);\n } else {\n saveAs();\n }\n }", "public void save() {\n UTILS.write(FILE.getAbsolutePath(), data);\n }", "public void save() {\t\n\t\n\t\n\t}", "public void save()\n throws IOException\n {\n File file = new File(MainFrame.getConfig().getUserPath(), SNAPSHOTFILE);\n if(null != file.getParentFile())\n file.getParentFile().mkdirs();\n\n try(FileOutputStream ostream = new FileOutputStream(file)) {\n try(OutputStreamWriter fw = new OutputStreamWriter(ostream, StandardCharsets.UTF_8)) {\n PrintNode.printNode(m_snapshotDoc, \" \", fw);\n }\n }\n }", "@Override\n public void whenDone() {\n getDocumentController().setFile(fileToSaveTo);\n getDocumentController().setHasChanged(false);\n getDocumentController().notifyChange();\n }", "static String save() {\n JFileChooser fileChooser;\n String path = FileLoader.loadFile(\"path.txt\");\n if (path != null) {\n fileChooser = new JFileChooser(path);\n } else {\n fileChooser = new JFileChooser((FileSystemView.getFileSystemView().getHomeDirectory()));\n }\n\n fileChooser.setDialogTitle(\"Save text file\");\n fileChooser.setDialogType(JFileChooser.SAVE_DIALOG);\n\n if (fileChooser.showSaveDialog(null) == JFileChooser.APPROVE_OPTION) {\n FileLoader.saveFile(\"path.txt\", fileChooser.getSelectedFile().getParent(), false);\n return fileChooser.getSelectedFile().getAbsolutePath() + \".mytxt\" ;\n }\n return null;\n }", "public void save()\r\n {\r\n \tfc=new JFileChooser();\r\n\t fc.setCurrentDirectory(new File(\"\"));\r\n\t if(fc.showSaveDialog(this)==JFileChooser.APPROVE_OPTION)\r\n\t \t//Try-Catch Block\r\n\t try\r\n\t {\r\n\t pw=new PrintWriter(new FileWriter(fc.getSelectedFile()+\".txt\")); //Print to the user-selected file\r\n\t\t \tfor(Organism o: e.getTree()) //IN PROGESS\r\n\t\t \t{\r\n\t\t\t\t\tint[] genes=o.getGenes(); //Getting genes from \r\n\t\t\t\t\tfor(int i=0; i<genes.length; i++)\r\n\t\t\t\t\t\tpw.print(genes[i]+\" \"); //Print each gene value in a line\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tpw.println(); //Starts printing on a new line\r\n\t\t\t\t}\r\n\t\t\t\tpw.close(); //Closes the File\r\n\t }\r\n\t catch (Exception ex) //Catch Any Exception\r\n\t {\r\n\t ex.printStackTrace();\r\n\t }\r\n }", "void save_to_file() {\n\t\tthis.setAlwaysOnTop(false);\n\t\t\n\t\t/**\n\t\t * chose file with file selector \n\t\t */\n\t\t\n\t\tFileDialog fd = new FileDialog(this, \"Choose a save directory\", FileDialog.SAVE);\n\t\t\n\t\t//default path is current directory\n\t\tfd.setDirectory(System.getProperty(\"user.dir\"));\n\t\tfd.setFile(\"*.cmakro\");\n\t\tfd.setVisible(true);\n\t\t\n\t\t\n\t\tString filename = fd.getFile();\n\t\tString path = fd.getDirectory();\n\t\tString file_withpath = path + filename;\n\t\t\n\t\tif (filename != null) {\n\t\t\t System.out.println(\"save path: \" + file_withpath);\n\t\t\t \n\t\ttry {\n\t\t\tObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(file_withpath));\n\n\t\t\tout.writeObject(Key_Lists);\n\t\t\t\n\t\t\tout.close();\n\t\t\t\n\t\t\tinfo_label.setForeground(green);\n\t\t\tinfo_label.setText(\"file saved :D\");\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 (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tthis.setAlwaysOnTop(true);\n\t\t\n\t}", "public void save(String path){\t\r\n\t\t\t FMParser.save(this, path);\r\n\t\t\t}", "public final void saveToFile() {\n\t\tWrite.midi(getScore(), getName()+\".mid\"); \n\t}", "public synchronized void save() throws IOException {\n for (DocumentSection section : this.sections) {\n section.save();\n }\n }", "private void saveOutputFile() {\n FileChooser fileChooser = new FileChooser();\n if (textMergeScript.hasCurrentDirectory()) {\n fileChooser.setInitialDirectory (textMergeScript.getCurrentDirectory());\n }\n chosenOutputFile = fileChooser.showSaveDialog (ownerWindow);\n if (fileChooser != null) {\n writeOutput();\n openOutputDataName.setText (tabNameOutput);\n }\n }", "private void save() {\r\n\t\tif (Store.save()) {\r\n\t\t\tSystem.out.println(\" > The store has been successfully saved in the file StoreData.\\n\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\" > An error occurred during saving.\\n\");\r\n\t\t}\r\n\t}", "public void saveFile() {\t\n\t\tString fileloc = \"\";\n\t\tif(!prf.foldername.getText().equals(\"\"))\n\t\t\tfileloc += prf.foldername.getText()+\"/\";\n\t\tfileloc += ((MinLFile) tabbedPane.getSelectedComponent()).filename;;\t\t\n\t\tFile fl = new File(fileloc);\n\t\t\n\t\ttry {\n\t\t\tif(fl.exists()) {\n\t\t\t\tint option = JOptionPane.showConfirmDialog(null, \"The file with this name already exists, do you want to overwrite it?\", \"Save File\", JOptionPane.YES_NO_OPTION);\n\t\t\t\tif(option == 0) {\n\t\t\t\t\tFiles.delete(fl.toPath());\n\t\t\t\t\ttry {\n\t\t\t\t\t\t\n\t\t\t\t\t\tFileWriter fw = new FileWriter(fileloc);\n\t\t\t\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\t\t\t\tbw.write(((MinLFile) tabbedPane.getSelectedComponent()).CodeArea.getText());\n\t\t\t\t\t\tbw.close();\n\t\t\t\t\t\tfw.close();\n\t\t\t\t\t\t((MinLFile) tabbedPane.getSelectedComponent()).filechanged = false;\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\tFileWriter fw = new FileWriter(fileloc);\n\t\t\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\t\t\tbw.write(((MinLFile) tabbedPane.getSelectedComponent()).CodeArea.getText());\n\t\t\t\t\tbw.close();\n\t\t\t\t\tfw.close();\n\t\t\t\t\t((MinLFile) tabbedPane.getSelectedComponent()).filechanged = false;\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"The specified folder doesnt exist.\");\n\t\t\t\t\te1.printStackTrace();\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}", "public void saveFile() {\n\t\tPrintWriter output = null;\n\t\ttry {\n\t\t\toutput = new PrintWriter(\"/Users/katejeon/Documents/Spring_2020/CPSC_35339/avengers_project/game_result.txt\");\n\t\t\toutput.println(textArea.getText());\n\t\t\toutput.flush();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"File doesn't exist.\");\n\t\t} finally {\n\t\t\toutput.close();\n\t\t}\n\t}", "public void saveFile(){\n returnValue = this.showSaveDialog(null);\n if (returnValue == JFileChooser.APPROVE_OPTION) {\n new CustomerFileWriter(new File(this.getSelectedFile().getAbsolutePath())).saveCustomer(Bank.customer);\n }\n }", "public boolean save(String file);", "public void save(){\r\n if (inputValidation()) {\r\n if (modifyingPart) {\r\n saveExisting();\r\n } else {\r\n saveNew();\r\n }\r\n closeWindow();\r\n }\r\n\r\n }", "File getSaveFile();", "public void save() throws TransformerException {\n\t\tgenerator.saveToFile(saveLocation);\n\t}", "protected void save() {\n close();\n if(saveAction != null) {\n saveAction.accept(getObject());\n }\n }", "public static void save(Directory directory) {\n\t\tUtils.FileUtils.write(\n\t\t\t\tdirectory.getDocuments(), \n\t\t\t\tGlobal.Constants.DIRECTORY_LOCATION \n\t\t\t\t+ Global.Variables.session.getCurrentUser().getName() \n\t\t\t\t+ \"$\" + directory.getName()\n\t\t\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 saveNewFile() {\r\n JFileChooser fileChooser = new JFileChooser();\r\n\r\n int status = fileChooser.showSaveDialog(null);\r\n\r\n if (status == JFileChooser.APPROVE_OPTION) {\r\n\r\n fileName = fileChooser.getSelectedFile().toString();\r\n\r\n saveFile();\r\n }\r\n }", "public void save() {\n final JFileChooser fileChooser =\n new JFileChooser(System.getProperty(\"user.dir\"));\n try {\n fileChooser.setSelectedFile(new File(\"save.ser\"));\n int saveFile = fileChooser.showSaveDialog(GameFrame.this);\n\n if (saveFile == JFileChooser.APPROVE_OPTION) {\n File saveGame = fileChooser.getSelectedFile();\n FileOutputStream fileOut = new FileOutputStream(saveGame);\n ObjectOutputStream objOut = new ObjectOutputStream(fileOut);\n objOut.writeObject(world);\n objOut.close();\n fileOut.close();\n System.out.println(\"Game saved.\");\n } else {\n return;\n }\n } catch (IOException i) {\n i.printStackTrace();\n }\n\n }", "public void save() {\n // Convert the settings to a string\n String output = readSettings();\n \n try {\n // Make sure the file exists\n if (!settingsFile.exists()) {\n File parent = settingsFile.getParentFile();\n parent.mkdirs();\n settingsFile.createNewFile(); \n }\n \n // Write the data into the file\n BufferedWriter writer = new BufferedWriter(new FileWriter(settingsFile));\n writer.write(output);\n writer.close(); \n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "void saveToFile(String filename) throws IOException;", "protected static void save(String fileName) {\n\t\tif (curMIDI != null) {\n\t\t\ttry {\n\t\t\t\tMidiSystem.write(curMIDI, 1, new File(fileName));\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"Could not save file\");\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void save(Object o, String file) {\n\t\t\n\t}", "public void saveFile(MultipartFile file,Document document){\n document.setKey(UUID.randomUUID().toString());\n document.setLink(UUID.randomUUID().toString());\n\n }", "void save() {\n File file = new File(main.myPath + \"state.xml\");\n Framework.backup(main.myPath + \"state.xml\");\n Framework.transform(stateDoc, new StreamResult(file), null);\n setDirty(false);\n }", "File getSaveLocation();", "@Override\n\tpublic void save(String file_name) {\n\t\tserialize(file_name);\n\t}", "public void save(File file) {\n //new FileSystem().saveFile(addressBook, file);\n }", "public static void saveFile(State state) throws Exception{\n\n buildDoc();\n writePreferences(state.language, state.background, state.pastTurtles.size());\n\n writeTurtles(state.pastTurtles);\n writeLines(state.pastLines);\n\n createFile(STATE_FILE);\n\n }", "public static void save(){\n\t\tif(GUIReferences.currentFile != null) {\n\t\t\txml.XMLSaver.saveSensorList(GUIReferences.currentFile);\n\t\t\tGUIReferences.saveMenuItem.setEnabled(false);\n\t\t} else {\n\t\t\tsaveAs();\n\t\t}\n\t}", "private void saveFile(boolean showWindow) {\n\n\t\tFormDef form = controller.getSelectedForm();\n\t\tif(form == null)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tString xml = FormHandler.writeToXML(form);\n\n\t\t\n\t\titextWidget.loadItext(Context.getItextList());\n\n\t\txformsWidget.setXform(xml);\n\t\tif (showWindow) {\n\t\t\txformsWidget.showWindow();\n\t\t}\n\t}", "private void saveFile(File file){\r\n\t\ttry {\r\n\t\t\tlocal.saveFile(file);\r\n\t\t\topenFile = file;\r\n\t\t\tpopulateRecentMenu();\r\n\t\t\tframe.setTitle(openFile.getName());\r\n\t\t\tedit = false;\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void saveGame(File fileLocation);", "public void save(final String name) {\r\n\t\tsave(new File(name));\r\n\t}" ]
[ "0.7785644", "0.7500736", "0.72532284", "0.7189317", "0.6987403", "0.6870081", "0.6825149", "0.67732304", "0.6770426", "0.6640132", "0.6612119", "0.6583965", "0.6554745", "0.6546546", "0.6546546", "0.64671284", "0.64549047", "0.6423806", "0.6416626", "0.63801247", "0.6376281", "0.63673884", "0.6352984", "0.63285613", "0.6325137", "0.6301625", "0.629894", "0.62972593", "0.6296386", "0.6292279", "0.62877196", "0.6277829", "0.6273037", "0.62726533", "0.6264681", "0.62541425", "0.6253974", "0.6245019", "0.62449676", "0.6241732", "0.62361157", "0.6232096", "0.62314606", "0.6228372", "0.6210866", "0.6205551", "0.61835474", "0.6177737", "0.6150809", "0.6147536", "0.6137657", "0.6132335", "0.6132128", "0.61263686", "0.61145467", "0.61097986", "0.60783", "0.607125", "0.6067387", "0.6051029", "0.6033241", "0.6018197", "0.5997554", "0.59798414", "0.5974763", "0.5968272", "0.59659064", "0.5965312", "0.5962144", "0.59441614", "0.59363973", "0.5933587", "0.59330946", "0.5932825", "0.5931764", "0.59289414", "0.59281284", "0.5919436", "0.591711", "0.5916867", "0.5900294", "0.58729464", "0.5865492", "0.5859127", "0.58543044", "0.58509713", "0.5838952", "0.58341974", "0.58314455", "0.5823084", "0.5816583", "0.58151877", "0.5812439", "0.5807236", "0.580705", "0.58063865", "0.58024406", "0.579511", "0.5781001", "0.5777547" ]
0.70348555
4
writes string to writer, converting newline characters to systemspecific newlines.
public static void writeWithSystemNewlines (BufferedWriter writer, String string) throws IOException { for (int i=0; i<string.length(); i++) { char c = string.charAt(i); if (c == '\n') writer.newLine(); else writer.write(c); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String fixPrintWriterNewLine(String decodedString) {\n StringBuilder fixedString = new StringBuilder();\n for(int i = 0; i < decodedString.length(); i++) {\n\n if(decodedString.charAt(i) == '\\n' ) {\n fixedString.append(\"\\r\\n\");\n }\n else {\n fixedString.append(decodedString.charAt(i));\n }\n }\n return fixedString.toString();\n }", "private void writeLine(String s) throws IOException {\n\tfbuf.write(s, 0, s.length());\n\tfbuf.newLine();\n }", "public void write(String s) throws IOException {\n\t\tString logmsg = toString() + \".write(\" + s + \")\";\n\t\t_log.trace(logmsg);\n\n\t\ttry {\n\t\t\t_commandLine.write(s);\n\n\t\t\t// FIXME: Do we need both CR and LF ?\n\t\t\t_commandLine.write(Ascii.CR);\n\t\t\t_commandLine.write(Ascii.LF);\n\t\t}\n\t\tcatch(IOException ioe) {\n\t\t\t_log.error(logmsg,ioe);\n\t\t\tthrow(ioe);\n\t\t}\n\t}", "@Override\n public void write(String str) {\n BufferedWriter writer;\n try {\n String path = FileManager.getInstance().getPath();\n writer = new BufferedWriter(new FileWriter(path, true));\n writer.write(str);\n writer.newLine();\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void JstringTrans(String line, File outfile) {\n\n\ttry {\n\t PrintWriter writer = new PrintWriter(new FileOutputStream(outfile, true));\n\n\t String[] printStatement = line.split(\"\\\\(\"); // splits the printStatement after (\n\t char[] systemSt = printStatement[0].toCharArray(); // sets the first part of split to systemSt\n\t char[] printSt = printStatement[1].toCharArray(); // sets second part of split to printSt\n\t int sysLength = systemSt.length; // creates sysLength to get obtain the length of the first part of split\n\t boolean endl = false; // sets endl = to false\n\n // if the length of systemSt -2 is l and systemSt -1 is n it declares endl as true\n\t if (systemSt[sysLength - 2] == 'l' && systemSt[sysLength - 1] == 'n') {\n//\t\tendl = true;\n writer.print(\"Console.WriteLine\"); // writes cout << into new file\n writer.print(\"TEST\");\n\t }\n\n\t // writer.print(\"Console.WriteLine\"); // writes cout << into new file\n\n\t // loops as long as i is less than the length of printSt -2 and reads through each part of the character array\n\t for (int i = 0; i < (printSt.length - 2); i++) {\n\n\t\tif (printSt[i] == '+') { //if code finds a +, it will replace it with <<\n\t\t writer.print(\"printf\");\n\t\t} else { // otherwise it will continue\n\t\t writer.print(printSt[i]);\n\t\t}\n\t }\n\n\t if (endl) { // if endl is true, code will add << endl; to the end of the line.\n\t\twriter.print(\"<< endl\");\n\t }\n\n\t writer.println(\";\");\n\n\n\t writer.close(); // finishes with writting in new file\n\t} catch (Exception IOException) {\n\t System.out.println(\"Some sort of IO error here\");\n\t}\n }", "public void writeString(final String s) throws IOException {\n checkOpened();\n dos.writeUTF(s);\n flush();\n }", "private static void writeToFile(String writeString, String outputFileName){\n String[] substring = writeString.split(\"\\\\n\");\n writeToFile(substring, outputFileName);\n }", "public void write(String text) throws ShellIOException;", "protected final void write(String s) throws IOException {\n\t\toutput.write(s);\n\t}", "public void writeln(String text) throws ShellIOException;", "public void markNewLine() throws IOException {\n\t\tout.write(\"\\n\");\n\t\tout.flush();\n\t}", "public void write(String s){\n\t\tint length = s.length();\n\t\tchar[] chars = new char[length];\n\t\ts.getChars(0, length, chars, 0);\n\t\twrite(chars, 0, length);\n\t}", "private void linefeed() {\n try {\n out.write(lineSeparator);\n } catch (java.io.IOException ioe) {\n }\n ;\n }", "void writeUTF(String s) throws IOException;", "protected void writeln(String s)\n {\n out.println(s);\n }", "private void _writeString(String text)\n/* */ throws IOException\n/* */ {\n/* 908 */ int len = text.length();\n/* 909 */ if (len > this._outputEnd) {\n/* 910 */ _writeLongString(text);\n/* 911 */ return;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 916 */ if (this._outputTail + len > this._outputEnd) {\n/* 917 */ _flushBuffer();\n/* */ }\n/* 919 */ text.getChars(0, len, this._outputBuffer, this._outputTail);\n/* */ \n/* 921 */ if (this._characterEscapes != null) {\n/* 922 */ _writeStringCustom(len);\n/* 923 */ } else if (this._maximumNonEscapedChar != 0) {\n/* 924 */ _writeStringASCII(len, this._maximumNonEscapedChar);\n/* */ } else {\n/* 926 */ _writeString2(len);\n/* */ }\n/* */ }", "public void close() throws IOException {\n write(\"\\n\");\n writer.close();\n }", "public void write (String s) {\n pw.print(s);\n }", "void write(String text);", "public void write(String str) throws IOException {\n\t\toffset = dataBase.getFilePointer();\n\t\tdataBase.writeBytes(str + \"\\n\");\n\t}", "@Override\n public void write(String text) {\n }", "protected void writeLineBreaks(Writer writer, int count) throws IOException {\n for (int i = 0; i < count; i++) {\n writer.write(NL);\n }\n }", "public void writeLine(String s) throws IOException {\n raos.writeLine(s);\n }", "protected void writeLine(String line) throws IOException {\n writer.write(line);\n writer.write(EOL);\n }", "public static void writeln(OutputStream out, String s) throws IOException {\n write(out,s+nl);\n }", "static void write() {\n try {\n b.setLength(0); // clear the line buffer\n\n // this next section builds the output string while protecting\n // string literals. All extra spaces are removed from the output\n // string, except that string literals are left as is.\n ArrayList list = new ArrayList();\n String s = new String(\"\");\n for (int i = 0; i < a.size(); i++) {\n Object o = a.get(i);\n if (o instanceof Token) {\n Token token = (Token)o;\n if (token.kind == JavaParserConstants.STRING_LITERAL) {\n s = s.replaceAll(\"[ ]+\", \" \");\n list.add(s);\n s = new String(\"\");\n list.add(token.image);\n }\n else {\n s += ((Token)o).image;\n s = s.replaceAll(\"[ ]+\", \" \");\n }\n }\n else {\n s += (String)o;\n s = s.replaceAll(\"[ ]+\", \" \");\n }\n }\n for (int i = 0; i < list.size(); i++) {\n b.append((String)list.get(i));\n }\n\n b.append(s);\n s = b.toString();\n\n // check for blank line(s)\n String maybe_blank = new String(s);\n if (maybe_blank.trim().length() == 0) {\n // yep, it's a blank, so just print it out\n if (s.length() >= ls.length()) {\n s = s.substring(0, s.length() - ls.length());\n }\n outputBuffer.append(s);\n a.clear();\n return;\n }\n\n // indent --\n // most lines get indented, but there are a few special cases:\n // \"else\" gets put on the same line as the closing \"}\" for the \"if\",\n // so don't want to indent. Similarly with \"catch\" and \"finally\".\n // The \"while\" at the end of a \"do\" loop is marked as \"^while\" to\n // differentiate it from a regular \"while\" block. \"else if\" is also\n // a special case.\n if (!s.startsWith(\" else\")\n && !s.startsWith(\" catch\")\n && !s.startsWith(\" finally\")\n && !s.startsWith(\" ^while\")\n && !s.startsWith(\" {\")\n && (!endsWith(outputBuffer, \"else\") && !endsWith(outputBuffer, \"else \"))) {\n s = s.trim();\n for (int i = 0; i < level; i++) {\n s = indent + s;\n }\n }\n\n // maybe clean out the ^ from the specially marked \"while\" at the\n // end of a \"do\" loop\n if (s.startsWith(\" ^while\")) {\n b.deleteCharAt(1);\n s = b.toString();\n }\n\n // check if the output buffer does NOT end with a new line. If it\n // doesn't, remove any leading whitespace from this line\n if (!endsWith(outputBuffer, \"\\u005cn\") && !endsWith(outputBuffer, \"\\u005cr\")) {\n s = trimStart(s);\n }\n\n // check that there aren't extra spaces in the buffer already --\n // this handles the case where the output buffer ends with a space\n // and the new string starts with a space, don't want 2 spaces.\n if (s.startsWith(\" \") && endsWith(outputBuffer, \" \")) {\n s = s.substring(1);\n }\n\n // check that there is one space between the end of the output\n // buffer and this line -- this handles the case where the output\n // buffer does not end in a space and the new string does not start\n // with a space, want one space in between.\n if (!s.startsWith(\" \")\n && !endsWith(outputBuffer, \" \")\n && !endsWith(outputBuffer, \"\\u005cr\")\n && !endsWith(outputBuffer, \"\\u005cn\")\n && outputBuffer.length() > 0) {\n outputBuffer.append(\" \");\n }\n\n // by the Sun standard, there is no situation where '(' is followed\n // by a space or ')' is preceded with by a space\n s = s.replaceAll(\"[(][ ]\", \"(\");\n s = s.replaceAll(\"[ ][)]\", \")\");\n\n // there should be no situation where a comma is preceded by a space,\n // although that seems to happen when formatting string arrays.\n s = s.replaceAll(\"\\u005c\\u005cs+[,]\", \",\");\n\n // finally! add the string to the output buffer\n // check for line length, may need to wrap. Sun says to avoid lines\n // longer than 80 characters. This doesn't work well yet, so I've \n // commented out the wrapping code. Still need to clean out the\n // wrapping markers.\n //s = s.replaceAll(\"[\u001c]\", \"\");\n outputBuffer.append(s);\n /*\n int wrap_sep_count = countWrapSep(s);\n if (s.length() - wrap_sep_count > 80) {\n String[] lines = wrapLines(s);\n if ( lines != null ) {\n for (int i = 0; i < lines.length; i++) {\n outputBuffer.append(lines[i]).append(ls);\n }\n }\n else {\n // whack any remaining \u001c characters\n s = s.replaceAll(\"[\u001c]\", \"\");\n outputBuffer.append(s);\n }\n }\n else {\n // whack any remaining \u001c characters\n s = s.replaceAll(\"[\u001c]\", \"\");\n outputBuffer.append(s);\n }\n */\n // clear the accumulator for the next line\n a.clear();\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }", "private void _writeString(char[] text, int offset, int len)\n/* */ throws IOException\n/* */ {\n/* 1049 */ if (this._characterEscapes != null) {\n/* 1050 */ _writeStringCustom(text, offset, len);\n/* 1051 */ return;\n/* */ }\n/* 1053 */ if (this._maximumNonEscapedChar != 0) {\n/* 1054 */ _writeStringASCII(text, offset, len, this._maximumNonEscapedChar);\n/* 1055 */ return;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1062 */ len += offset;\n/* 1063 */ int[] escCodes = this._outputEscapes;\n/* 1064 */ int escLen = escCodes.length;\n/* 1065 */ while (offset < len) {\n/* 1066 */ int start = offset;\n/* */ for (;;)\n/* */ {\n/* 1069 */ char c = text[offset];\n/* 1070 */ if ((c < escLen) && (escCodes[c] != 0)) {\n/* */ break;\n/* */ }\n/* 1073 */ offset++; if (offset >= len) {\n/* */ break;\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 1079 */ int newAmount = offset - start;\n/* 1080 */ if (newAmount < 32)\n/* */ {\n/* 1082 */ if (this._outputTail + newAmount > this._outputEnd) {\n/* 1083 */ _flushBuffer();\n/* */ }\n/* 1085 */ if (newAmount > 0) {\n/* 1086 */ System.arraycopy(text, start, this._outputBuffer, this._outputTail, newAmount);\n/* 1087 */ this._outputTail += newAmount;\n/* */ }\n/* */ } else {\n/* 1090 */ _flushBuffer();\n/* 1091 */ this._writer.write(text, start, newAmount);\n/* */ }\n/* */ \n/* 1094 */ if (offset >= len) {\n/* */ break;\n/* */ }\n/* */ \n/* 1098 */ char c = text[(offset++)];\n/* 1099 */ _appendCharacterEscape(c, escCodes[c]);\n/* */ }\n/* */ }", "protected void newline(Writer out) throws IOException {\r\n if (currentFormat.newlines) {\r\n out.write(currentFormat.lineSeparator);\r\n }\r\n }", "void writeChars(String s) throws IOException;", "@Override\n public void write (final String s, final int off, final int len)\n {\n if (text != null)\n {\n text.append (s.substring (off, off + len));\n if ((col += len) > wrap)\n println ();\n }\n else\n {\n super.write (s, off, len);\n flush ();\n }\n }", "void write (String s, int offset);", "private void write(String s) {\n _writer.print(s);\n _writer.flush(); // This is need to actually write the data.\n\n _index += s.length();\n }", "public SourceGenerator forceNewline(){\r\n\t\tm_writer.append(m_newline);\r\n\t\treturn this;\r\n\t}", "void writeString(final String result) throws WriterException;", "private static void escape(CharSequence s, Appendable out) throws IOException {\n for (int i = 0; i < s.length(); i++) {\n char ch = s.charAt(i);\n switch (ch) {\n case '\"':\n out.append(\"\\\\\\\"\");\n break;\n case '\\\\':\n out.append(\"\\\\\\\\\");\n break;\n case '\\b':\n out.append(\"\\\\b\");\n break;\n case '\\f':\n out.append(\"\\\\f\");\n break;\n case '\\n':\n out.append(\"\\\\n\");\n break;\n case '\\r':\n out.append(\"\\\\r\");\n break;\n case '\\t':\n out.append(\"\\\\t\");\n break;\n case '/':\n out.append(\"\\\\/\");\n break;\n default:\n // Reference: http://www.unicode.org/versions/Unicode5.1.0/\n if ((ch >= '\\u0000' && ch <= '\\u001F')\n || (ch >= '\\u007F' && ch <= '\\u009F')\n || (ch >= '\\u2000' && ch <= '\\u20FF')) {\n String ss = Ascii.toUpperCase(Integer.toHexString(ch));\n out.append(\"\\\\u\");\n out.append(Strings.padStart(ss, 4, '0'));\n } else {\n out.append(ch);\n }\n }\n }\n }", "public void writeString(String s) throws Exception {\r\n\tout.write(s.getBytes());\r\n}", "public void write_line(String string)\n {\n String[] current = read();\n\n try\n {\n dir = new File(contextRef.getFilesDir(), filename);\n PrintWriter writer = new PrintWriter(dir);\n\n for (int i = 0; i < current.length; i++)\n {\n String line = current[i];\n if (line != null)\n {\n writer.println(line);\n }\n }\n writer.println(string);\n writer.close();\n }catch (Exception ex)\n {\n debug = \"test write failure\";\n }\n }", "public void writeln (String s) {\n pw.println(s);\n }", "public void writeString(String text)\n/* */ throws IOException\n/* */ {\n/* 357 */ _verifyValueWrite(\"write a string\");\n/* 358 */ if (text == null) {\n/* 359 */ _writeNull();\n/* 360 */ return;\n/* */ }\n/* 362 */ if (this._outputTail >= this._outputEnd) {\n/* 363 */ _flushBuffer();\n/* */ }\n/* 365 */ this._outputBuffer[(this._outputTail++)] = this._quoteChar;\n/* 366 */ _writeString(text);\n/* */ \n/* 368 */ if (this._outputTail >= this._outputEnd) {\n/* 369 */ _flushBuffer();\n/* */ }\n/* 371 */ this._outputBuffer[(this._outputTail++)] = this._quoteChar;\n/* */ }", "private void write(String s) {\n\n try {\n // Add the delimiter\n s += DELIMITER;\n\n // Convert to bytes and write\n outStream.write(s.getBytes());\n Log.i(TAG, \"[SENT] \" + s);\n\n } catch (Exception e) {\n Log.e(TAG, \"Write failed!\", e);\n }\n }", "public void writeRaw(String text)\n/* */ throws IOException\n/* */ {\n/* 442 */ int len = text.length();\n/* 443 */ int room = this._outputEnd - this._outputTail;\n/* */ \n/* 445 */ if (room == 0) {\n/* 446 */ _flushBuffer();\n/* 447 */ room = this._outputEnd - this._outputTail;\n/* */ }\n/* */ \n/* 450 */ if (room >= len) {\n/* 451 */ text.getChars(0, len, this._outputBuffer, this._outputTail);\n/* 452 */ this._outputTail += len;\n/* */ } else {\n/* 454 */ writeRawLong(text);\n/* */ }\n/* */ }", "public static void writeLine(String string) {\n\t\t \n\t\tif (tinObject.length() == 0) {\n\t\t\ttinObject.append(firstString);\n\t\t}\n\t\ttinObject.append(string);\n\t}", "public void write(String text) throws IOException {\r\n writer.write(text);\r\n writer.flush();\r\n }", "public void write(String s) {\n String s_t_txt = s + \".txt\";\n try {\n PrintWriter writer = new PrintWriter(s_t_txt, \"UTF-8\");\n writer.print(s + \"\\n\");\n writer.print(toString());\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void newline() {}", "public SourceGenerator writeNewline(){\r\n\t\tif (m_style == CodeStyle.PRETTY){\r\n\t\t\tm_writer.append(m_newline);\r\n\t\t}\r\n\t\treturn this;\r\n\t}", "private static Appendable writeString(Appendable buffer, String s, char quote) {\n append(buffer, quote);\n int len = s.length();\n for (int i = 0; i < len; i++) {\n char c = s.charAt(i);\n escapeCharacter(buffer, c, quote);\n }\n return append(buffer, quote);\n }", "protected static String br() {\n return \"\\r\\n\";\n }", "public static void nl(String nl) {\n Formatting.nl = nl;\n Formatting.dnl = nl + nl;\n }", "private void writeEscaped(String in)\n\t\tthrows IOException\n\t{\n\t\tfor(int i=0, n=in.length(); i<n; i++)\n\t\t{\n\t\t\tchar c = in.charAt(i);\n\t\t\tif(c == '\"' || c == '\\\\')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t\telse if(c == '\\r')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('r');\n\t\t\t}\n\t\t\telse if(c == '\\n')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('n');\n\t\t\t}\n\t\t\telse if(c == '\\t')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('t');\n\t\t\t}\n\t\t\telse if(c == '\\b')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('b');\n\t\t\t}\n\t\t\telse if(c == '\\f')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('f');\n\t\t\t}\n\t\t\telse if(c <= 0x1F)\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('u');\n\n\t\t\t\tint v = c;\n\t\t\t\tint pos = 4;\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\tencoded[--pos] = DIGITS[v & HEX_MASK];\n\t\t\t\t\tv >>>= 4;\n\t\t\t\t}\n\t\t\t\twhile (v != 0);\n\n\t\t\t\tfor(int j=0; j<pos; j++) writer.write('0');\n\t\t\t\twriter.write(encoded, pos, 4 - pos);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t}\n\t}", "public void newLine() {\n text.append(\"\\n\");\n }", "protected void printString(String str, Writer out) throws IOException {\r\n if (currentFormat.textNormalize) {\r\n str = Text.normalizeString( str);\r\n }\r\n else if (currentFormat.textTrim) {\r\n str = str.trim();\r\n }\r\n out.write( escapeElementEntities( str));\r\n }", "static void sendString(BufferedWriter bw, String str) throws IOException{\n bw.write(str + \"\\r\\n\");\n bw.flush();\n }", "public int WriteLine(String message) {\n\tWrite(message);\n\tchildStdin.AddCharacters(\"\\n\");\n\treturn message.length() + 1;\n }", "public void newLine()\n\t{\n\t\toutput.append(\"\\n\");\n\t}", "private void _writeLongString(String text)\n/* */ throws IOException\n/* */ {\n/* 974 */ _flushBuffer();\n/* */ \n/* */ \n/* 977 */ int textLen = text.length();\n/* 978 */ int offset = 0;\n/* */ do {\n/* 980 */ int max = this._outputEnd;\n/* 981 */ int segmentLen = offset + max > textLen ? textLen - offset : max;\n/* */ \n/* 983 */ text.getChars(offset, offset + segmentLen, this._outputBuffer, 0);\n/* 984 */ if (this._characterEscapes != null) {\n/* 985 */ _writeSegmentCustom(segmentLen);\n/* 986 */ } else if (this._maximumNonEscapedChar != 0) {\n/* 987 */ _writeSegmentASCII(segmentLen, this._maximumNonEscapedChar);\n/* */ } else {\n/* 989 */ _writeSegment(segmentLen);\n/* */ }\n/* 991 */ offset += segmentLen;\n/* 992 */ } while (offset < textLen);\n/* */ }", "public void write(String s) throws IOException {\n\t\tif (s != null && s.length() > 0) {\n\t\t\tfos.write(s.getBytes());\n\t\t}\n\t}", "private String getLineSeparator(String givenStr) {\n if (givenStr.indexOf(\"\\r\\n\") == -1) {\n return \"\\n\";\n } else {\n return \"\\r\\n\";\n }\n }", "private void writeOutputLine(String textLine) {\n String outputText = Calendar.getInstance().getTime().toString();\n if (textLine != null) {\n outputText = outputText + \" : \" + textLine;\n }\n try {\n this.bufferedWriter.write(outputText);\n this.bufferedWriter.newLine();\n this.bufferedWriter.flush();\n } catch (IOException e) {\n LOG.error(\"Can not write text line.\", e);\n }\n }", "void write(String s)\n\t\t{\n\t\t\tfor(int i = 0; i < sp; i++)\n\t\t\t\tXMLStream.print(\" \");\n\t\t\tXMLStream.println(\"<\" + s + \"/>\");\n\t\t}", "public void writeString(String message);", "public static String convertLineBreak(String input) {\n return input.replace(\"\\r\\n\", \"\\n\").replace('\\r', '\\n').replaceAll(\"[\\000-\\010\\013\\014\\016-\\037]\", \" \");\n }", "@Override\n\tpublic void write(int b) throws IOException {\n\tchar a=(char) b;\n\tString s=String.valueOf(a);\n\t//add new output at the end of previous text\n text.append(s);\n\t//keeps reaching at the end of text area\n text.setCaretPosition(text.getDocument().getLength());\n\t}", "protected void openWriteFile(Path filePath, String s) throws IOException{\n\t\tBufferedWriter writer = Files.newBufferedWriter(filePath, ENCODING);\n\t\twriter.write(s, 0, s.length());\n\t\twriter.close();\n\t}", "public void writeText(String text) throws IOException {\n markEndAttributes(false);\n write(encode(text));\n }", "public static String newline() {\n return System.getProperty(JavaSystemProperty.LINE_SEPARATOR);\n }", "public void write(String str) {\n Log.d(TAG, \"-> \"+str);\n mmOutStream.println(str);\n mmOutStream.flush();\n }", "static void writeEndOfLineComment(String s) {\n String line = s.trim();\n for (int j = 0; j < level; j++) {\n line = \" \" + line; // 4 spaces\n }\n outputBuffer.append(line).append(ls);\n }", "private void _writeStringASCII(int len, int maxNonEscaped)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1117 */ int end = this._outputTail + len;\n/* 1118 */ int[] escCodes = this._outputEscapes;\n/* 1119 */ int escLimit = Math.min(escCodes.length, maxNonEscaped + 1);\n/* 1120 */ int escCode = 0;\n/* */ \n/* */ \n/* 1123 */ while (this._outputTail < end)\n/* */ {\n/* */ char c;\n/* */ do\n/* */ {\n/* 1128 */ c = this._outputBuffer[this._outputTail];\n/* 1129 */ if (c < escLimit) {\n/* 1130 */ escCode = escCodes[c];\n/* 1131 */ if (escCode != 0) {\n/* */ break;\n/* */ }\n/* 1134 */ } else if (c > maxNonEscaped) {\n/* 1135 */ escCode = -1;\n/* 1136 */ break;\n/* */ }\n/* 1138 */ } while (++this._outputTail < end);\n/* 1139 */ break;\n/* */ \n/* */ \n/* 1142 */ int flushLen = this._outputTail - this._outputHead;\n/* 1143 */ if (flushLen > 0) {\n/* 1144 */ this._writer.write(this._outputBuffer, this._outputHead, flushLen);\n/* */ }\n/* 1146 */ this._outputTail += 1;\n/* 1147 */ _prependOrWriteCharacterEscape(c, escCode);\n/* */ }\n/* */ }", "void writeString(String value);", "private void writeEndOfLine(final BufferedWriter file) throws IOException {\n file.write(\"\\\\\\\\\");\n file.newLine();\n }", "public void writeTextFile(String s) {\n\t\ttry {\n\t\t\twriter = new PrintWriter(new BufferedWriter(new FileWriter(filename,true)));\n\t\t\twriter.println(s);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not write to\\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}", "public static long writeAll(String filename, String content) throws Err {\n final FileOutputStream fos;\n try {\n fos = new FileOutputStream(filename);\n } catch (IOException ex) {\n throw new ErrorFatal(\"Cannot write to the file \" + filename);\n }\n // Convert the line break into the UNIX line break, and remove ^L, ^F...\n // and other characters that confuse JTextArea\n content = convertLineBreak(content);\n // If the last line does not have a LINEBREAK, add it\n if (content.length() > 0 && content.charAt(content.length() - 1) != '\\n')\n content = content + \"\\n\";\n // Now, convert the line break into the local platform's line break,\n // then write it to the file\n try {\n final String NL = System.getProperty(\"line.separator\");\n byte[] array = content.replace(\"\\n\", NL).getBytes(\"UTF-8\");\n fos.write(array);\n fos.close();\n return array.length;\n } catch (IOException ex) {\n close(fos);\n throw new ErrorFatal(\"Cannot write to the file \" + filename, ex);\n }\n }", "private void _writeStringCustom(int len)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1261 */ int end = this._outputTail + len;\n/* 1262 */ int[] escCodes = this._outputEscapes;\n/* 1263 */ int maxNonEscaped = this._maximumNonEscapedChar < 1 ? 65535 : this._maximumNonEscapedChar;\n/* 1264 */ int escLimit = Math.min(escCodes.length, maxNonEscaped + 1);\n/* 1265 */ int escCode = 0;\n/* 1266 */ CharacterEscapes customEscapes = this._characterEscapes;\n/* */ \n/* */ \n/* 1269 */ while (this._outputTail < end)\n/* */ {\n/* */ char c;\n/* */ do\n/* */ {\n/* 1274 */ c = this._outputBuffer[this._outputTail];\n/* 1275 */ if (c < escLimit) {\n/* 1276 */ escCode = escCodes[c];\n/* 1277 */ if (escCode != 0)\n/* */ break;\n/* */ } else {\n/* 1280 */ if (c > maxNonEscaped) {\n/* 1281 */ escCode = -1;\n/* 1282 */ break;\n/* */ }\n/* 1284 */ if ((this._currentEscape = customEscapes.getEscapeSequence(c)) != null) {\n/* 1285 */ escCode = -2;\n/* 1286 */ break;\n/* */ }\n/* */ }\n/* 1289 */ } while (++this._outputTail < end);\n/* 1290 */ break;\n/* */ \n/* */ \n/* 1293 */ int flushLen = this._outputTail - this._outputHead;\n/* 1294 */ if (flushLen > 0) {\n/* 1295 */ this._writer.write(this._outputBuffer, this._outputHead, flushLen);\n/* */ }\n/* 1297 */ this._outputTail += 1;\n/* 1298 */ _prependOrWriteCharacterEscape(c, escCode);\n/* */ }\n/* */ }", "public void textSaver(BufferedWriter writer)throws IOException{\r\n\t\tfor(int i=0;i<getColumn();i++)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<getRow();j++)\r\n\t\t\t\twriter.write(warehouse[i][j].getChar());\r\n\t\twriter.newLine();\r\n\r\n\t\t}\r\n\t\t\r\n\t}", "public static String convertString(String string) {\n return string.replaceAll(\"\\n\", \"<br>\");\n }", "private void writeQuotedAndEscaped(CharSequence string) {\n if (string != null && string.length() != 0) {\n int len = string.length();\n writer.write('\\\"');\n\n for (int i = 0; i < len; ++i) {\n char cp = string.charAt(i);\n if ((cp < 0x7f &&\n cp >= 0x20 &&\n cp != '\\\"' &&\n cp != '\\\\') ||\n (cp > 0x7f &&\n isConsolePrintable(cp) &&\n !isSurrogate(cp))) {\n // quick bypass for direct printable chars.\n writer.write(cp);\n } else {\n switch (cp) {\n case '\\b':\n writer.write(\"\\\\b\");\n break;\n case '\\t':\n writer.write(\"\\\\t\");\n break;\n case '\\n':\n writer.write(\"\\\\n\");\n break;\n case '\\f':\n writer.write(\"\\\\f\");\n break;\n case '\\r':\n writer.write(\"\\\\r\");\n break;\n case '\\\"':\n case '\\\\':\n writer.write('\\\\');\n writer.write(cp);\n break;\n default:\n if (isSurrogate(cp) && (i + 1) < len) {\n char c2 = string.charAt(i + 1);\n writer.format(\"\\\\u%04x\", (int) cp);\n writer.format(\"\\\\u%04x\", (int) c2);\n ++i;\n } else {\n writer.format(\"\\\\u%04x\", (int) cp);\n }\n break;\n }\n }\n }\n\n writer.write('\\\"');\n } else {\n writer.write(\"\\\"\\\"\");\n }\n }", "public void write(char[] b, int off, int len) throws IOException {\n\t\t\tif (!initialized) {\n\t\t\t\tarea.setText(\"\");\n\t\t\t\tinitialized = true;\n\t\t\t}\n\t\t\tString str = new String(b, off, len);\n\t\t\tStringBuffer sb = new StringBuffer(len);\n\t\t\twhile (str != null && str.length() > 0) {\n\t\t\t\tif (lastCR && str.charAt(0) == '\\n')\n\t\t\t\t\tstr = str.substring(1);\n\t\t\t\tint crIndex = str.indexOf('\\r');\n\t\t\t\tif (crIndex >= 0) {\n\t\t\t\t\tsb.append(str.substring(0, crIndex));\n\t\t\t\t\tsb.append(\"\\n\");\n\t\t\t\t\tstr = str.substring(crIndex + 1);\n\t\t\t\t\tlastCR = true;\n\t\t\t\t} else {\n\t\t\t\t\tsb.append(str);\n\t\t\t\t\tstr = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tarea.append(sb.toString());\n\t\t}", "private void writeCodeLine(String rCode){\n\t\tCodeCount++;{\n\t\ttry {\n\t\t\tcodes.write(CodeCount+\" \"+rCode+'\\n');;\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"FileWriter Error on \"+CodeCount);\n\t\t}\n\t\treturn;\n\t\t}\n\t}", "public void sequenceWriter(String sequence) {\n try {\n Files.write(file, ((sequence + \"\\r\\n\")).getBytes(), StandardOpenOption.APPEND);\n } catch (IOException e) {\n System.out.println(\"Error:\" + e);\n }\n }", "public void SaveLevel(Level level,String LevelName)\r\n\t{\r\n\t\tString LevelString;\r\n\t\tint i=0;\r\n\t\tLevelString = new String();\r\n\t\tLevelString=level.toString();\r\n\t\tBufferedWriter writer= null;\r\n\t\ttry{\r\n\t\t\twriter = new BufferedWriter(new FileWriter(LevelName.toString()));\r\n\t\t while(LevelString.length()!=i)\r\n\t\t {\r\n\t\t\t for(i=0;i<LevelString.length();i++)\r\n\t\t\t {\r\n\t\t\t\t if(LevelString.charAt(i)!=10)\r\n\t\t\t\t {\r\n\t\t\t\t\t writer.write(LevelString.charAt(i));\r\n\t\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t\t writer.newLine();\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t }\r\n\t\t writer.close();\r\n\t}\r\n\t\tcatch (IOException e)\r\n\t{\r\n\t\te.printStackTrace();\r\n\t}\r\n\r\n\r\n}", "private static void write(String s, Style style) {\r\n\t\ttry {\r\n\t\t\tdoc.insertString(doc.getLength(), s, style);\r\n\t\t} catch (BadLocationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private static String normalizeLineEndings(String input) {\n return NON_UNIX_LINE_ENDING.matcher(input).replaceAll(\"\\n\");\n }", "public static void main(String[] args) {\ntry\r\n{\r\n\tFileWriter fw= new FileWriter(\"D:/abc.txt\");\r\n\tString s=\"india \\t is my country\";\r\n\tfw.write(s);\r\n\tfw.flush();\r\n\tfw.close();\r\n}\r\ncatch(IOException e)\r\n{\r\n\tSystem.out.println(e);\r\n}\r\n\t}", "public void send(String text) {\r\n try {\r\n outputStream.write((text + CRLF).getBytes());\r\n outputStream.flush();\r\n } catch (IOException ex) {\r\n notifyObservers(ex);\r\n }\r\n }", "private static void writeToFile(String string){\n try {\n buffer.write(string);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void output (String s)\n\t{\n\t\toutputArea.append (s + \"\\n\");\n\t\toutputArea.setCaretPosition (outputArea.getDocument().getLength());\n\t}", "public void send(String text) {\n try {\n outputStream.write((text + CRLF).getBytes());\n outputStream.flush();\n } catch (IOException ex) {\n notifyObservers(ex);\n }\n }", "public static String createBreaks(String input) {\r\n char[] chars = input.toCharArray();\r\n int len = chars.length;\r\n StringBuffer buf = new StringBuffer(len);\r\n int count = 0;\r\n int cur = 0; \r\n for (int i = 0; i < len; i++) { \r\n if (chars[i] == '\\n') {\r\n buf.append(chars, cur, i - cur).append(BR_TAG);\r\n cur = i + 1;\r\n } \r\n else if (chars[i] == '\\r' && i < len - 1 && chars[i + 1] == '\\n') {\r\n buf.append(chars, cur, i - cur).append(BR_TAG);\r\n i++;\r\n cur = i + 1;\r\n }\r\n\r\n count++;\r\n } \r\n buf.append(chars, cur, len - cur);\r\n return buf.toString();\r\n }", "private void writeFile(String string) {\n\t\ttry {\n\t\t\tFormatter fileWriter = new Formatter(new File( System.getProperty(\"user.dir\") + \"\\\\highscores.txt\"));\n\t\t\t\n\t\t\tfileWriter.format(string);\n\t\t\t\n\t\t\tfileWriter.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.print(\"ERROR: Line 132: Unable to write file\");\n\t\t\t//e.printStackTrace();\n\t\t}\n\t}", "private void newline() {\n if (enableSplitting) {\n if (out.length() != 0) {\n out.append(System.lineSeparator());\n }\n out.append(\" \".repeat(depth)); // two spaces indent is sufficient\n } else {\n out.append(\" \"); // just a separator between two tokens\n }\n }", "protected void print(Object s) throws IOException {\n out.write(Convert.escapeUnicode(s.toString()));\n }", "private void writeData(String data) throws IOException\n {\n this.writer.println(data);\n this.writer.flush();\n }", "public int writeString(String src) {\n // Convert the argument strings to ASCII\n byte[] srcAsBytes;\n src += \"\\r\";\n try {\n srcAsBytes = src.getBytes(\"US-ASCII\");\n } catch (UnsupportedEncodingException e) {\n // Very very unlikely in the near-scope of the project.\n return -1;\n }\n print(\"Wrote :\" + src + \":\");\n return write(srcAsBytes);\n }", "public void writeLine(String theString, int color)\r\n\t{\r\n\t\t/*\r\n\t\t * 0 = system! 1 = User Input 2 = Socket Input 3 = Other\r\n\t\t */\r\n\t\tStyleContext context = new StyleContext();\r\n\t\tstyle = context.getStyle(StyleContext.DEFAULT_STYLE);\r\n\t\tStyleConstants.setFontSize(style, 14);\r\n\t\tStyleConstants.setSpaceAbove(style, 4);\r\n\t\tStyleConstants.setSpaceBelow(style, 4);\r\n\r\n\t\tswitch (color)\r\n\t\t{\r\n\t\tcase 0:\r\n\t\t\tStyleConstants.setForeground(style, Color.GRAY);\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tStyleConstants.setForeground(style, Color.BLACK);\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tStyleConstants.setForeground(style, Color.BLUE);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tStyleConstants.setForeground(style, Color.RED);\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\ttheString = theString + \"\\n\";\r\n\r\n\t\ttry\r\n\t\t{\r\n\r\n\t\t\tdoc.insertString(doc.getLength(), theString, style);\r\n\r\n\t\t}\r\n\t\tcatch (BadLocationException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\t// scroll to the bottom\r\n\t\ttxtDisplayArea.setCaretPosition(txtDisplayArea.getDocument()\r\n\t\t\t\t.getLength());\r\n\r\n\t}", "public void newLine()\n {\n rst += NEW_LINE;\n }", "private void normalizeNewlines(StringBuffer sb) {\n\n\t\t// State machine states\n\t\tfinal int START = 0;\n\t\tfinal int SEEN_CR = 1;\n\n\t\tint state = START;\n\t\tint i = 0;\n\t\twhile (i < sb.length()) {\n\t\t\t// No simple 'for' here, since we may delete chars\n\n\t\t\tchar c = sb.charAt(i);\n\n\t\t\tswitch (state) {\n\t\t\tcase START:\n\t\t\t\tif (c == '\\r') {\n\t\t\t\t\tstate = SEEN_CR;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t\tbreak;\n\n\t\t\tcase SEEN_CR:\n\t\t\t\tif (c == '\\n') {\n\t\t\t\t\t// CR-LF, just delete the previous CR\n\t\t\t\t\tsb.deleteCharAt(i - 1);\n\t\t\t\t\tstate = START;\n\t\t\t\t\t// no need to advance i, since it's done implicitly\n\t\t\t\t} else if (c == '\\r') {\n\t\t\t\t\t// CR line ending followed by another\n\t\t\t\t\t// Replace the first with a newline...\n\t\t\t\t\tsb.setCharAt(i - 1, '\\n');\n\t\t\t\t\ti++;\n\t\t\t\t\t// ...and stay in the SEEN_CR state\n\t\t\t\t} else {\n\t\t\t\t\t// CR line ending, replace it with a newline\n\t\t\t\t\tsb.setCharAt(i - 1, '\\n');\n\t\t\t\t\ti++;\n\t\t\t\t\tstate = START;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (state == SEEN_CR) {\n\t\t\t// CR line ending, replace it with a newline\n\t\t}\n\t}", "@Override\n public void writeSpace(String text)\n throws XMLStreamException\n {\n writeRaw(text);\n }", "public abstract void newLine();", "private void addLineToCSV(String str) throws IOException\r\n {\r\n csvOutput.write(str.getBytes());\r\n csvOutput.write('\\n');\r\n }" ]
[ "0.6490562", "0.61570555", "0.5985104", "0.58966947", "0.5896445", "0.5862302", "0.58512527", "0.5847158", "0.5748721", "0.5731886", "0.5688443", "0.5671021", "0.56487036", "0.5632012", "0.5626333", "0.5625066", "0.561963", "0.5613481", "0.56125784", "0.558689", "0.5572617", "0.55587053", "0.55535764", "0.5544489", "0.5531895", "0.55190086", "0.55047435", "0.54645365", "0.54531175", "0.5441077", "0.5397306", "0.5381233", "0.53782237", "0.5361272", "0.5351865", "0.53406674", "0.5332735", "0.53237", "0.531101", "0.5303844", "0.5285071", "0.5281115", "0.52562", "0.5246974", "0.5211462", "0.5208644", "0.5207867", "0.520376", "0.5203093", "0.51625663", "0.5133008", "0.51323515", "0.5107849", "0.51029706", "0.51009655", "0.50977045", "0.5084862", "0.5084201", "0.5082622", "0.5079582", "0.50779086", "0.50758684", "0.50246894", "0.50172853", "0.50153136", "0.5001579", "0.4990766", "0.49787506", "0.4976651", "0.4969434", "0.49515128", "0.4948597", "0.49483466", "0.49403784", "0.493412", "0.49259058", "0.49192953", "0.49184424", "0.49164987", "0.49150056", "0.49126083", "0.48808622", "0.48758197", "0.48560974", "0.4854195", "0.48528433", "0.4839205", "0.48243493", "0.48239434", "0.48212183", "0.4812311", "0.4808659", "0.4796149", "0.47946963", "0.47941113", "0.4775896", "0.4758498", "0.47574574", "0.47542572", "0.47490796" ]
0.80077374
0
saves the Document to the originally specified fileName in directory 'directory'.
public void saveIn (String directory) { this.directory = directory; save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveAs (String directory, String fileName) {\n\t\tthis.directory = directory;\n\t\tthis.fileName = fileName;\n\t\tsave();\n\t}", "public static void save(Directory directory) {\n\t\tUtils.FileUtils.write(\n\t\t\t\tdirectory.getDocuments(), \n\t\t\t\tGlobal.Constants.DIRECTORY_LOCATION \n\t\t\t\t+ Global.Variables.session.getCurrentUser().getName() \n\t\t\t\t+ \"$\" + directory.getName()\n\t\t\t\t);\n\t}", "void save(String fileName);", "@Override\n\tpublic void saveDocument(String path, String name) {\n\t\t\n\t}", "public void save(String fileName) throws IOException;", "void save(String filename);", "public void saveDocument() throws IOException;", "public void saveCompanyDirectory(String fileName) {\r\n\t\ttry {\r\n\t\t\tCompanyRecordIO.writeCompanyRecords(fileName, companyDirectory);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new IllegalArgumentException(\"Unable to write to file \" + fileName);\r\n\t\t}\r\n\t}", "void save(String fileName) throws IOException, TransformerConfigurationException, ParserConfigurationException;", "public void save(String fileName)\r\n\t{\r\n\t\ttry {\r\n\t\t\tFileWriter fw = new FileWriter(fileName);\r\n\t\t\tsave(fw);\r\n\t\t} catch (Exception e) {\r\n\t\t\torg.apache.commons.logging.LogFactory.getLog(this.getClass()).error(e);\r\n\t\t}\r\n\t}", "void saveDocument(SingleDocumentModel model, Path newPath);", "public void saveFile() {\r\n File savedFile = new File(fileName);\r\n\r\n try (FileWriter fw = new FileWriter(savedFile)) {\r\n fw.write(workSpace.getText());\r\n\r\n fw.close();\r\n } catch (IOException ex) {\r\n JOptionPane.showMessageDialog(null, \"There was an error saving the file\");\r\n }\r\n }", "private void saveAs ()\n {\n\tJFileChooser chooser = new JFileChooser ();\n\tchooser.setFileSelectionMode (chooser.FILES_ONLY);\n\tint result = chooser.showSaveDialog (this);\n\tif (result == chooser.CANCEL_OPTION)\n\t{\n\t return;\n\t}\n\n\tFile f = chooser.getSelectedFile ();\n\tif (f.exists ())\n\t{\n\t try\n\t {\n\t\tresult = \n\t\t JOptionPane.showConfirmDialog (\n this,\n\t\t\t\"Overwrite existing file \\\"\" + f.getCanonicalPath () + \n\t\t\t\"\\\"?\",\n\t\t\t\"File Exists\",\n\t\t\tJOptionPane.YES_NO_OPTION);\n\n\t\tif (result != JOptionPane.YES_OPTION)\n\t\t{\n\t\t return;\n\t\t}\n\n\t\tf.delete ();\n\t }\n\t catch (IOException ex)\n\t {\n\t\tthrow new ShouldntHappenException (ex);\n\t }\n\t}\n\n\tString text;\n\tsynchronized (myDocument)\n\t{\n\t int len = myDocument.getLength ();\n\t try\n\t {\n\t\ttext = myDocument.getText (0, len);\n\t }\n\t catch (BadLocationException ex)\n\t {\n\t\tthrow new ShouldntHappenException (ex);\n\t }\n\t}\n\n\ttry\n\t{\n\t FileWriter fw = new FileWriter (f);\n\t fw.write (text);\n\t fw.flush ();\n\t fw.close ();\n\t}\n\tcatch (IOException ex)\n\t{\n\t JOptionPane.showMessageDialog (null,\n\t\t\t\t\t ex.getMessage (),\n\t\t\t\t\t \"Write Error\",\n\t\t\t\t\t JOptionPane.ERROR_MESSAGE);\n\t}\n }", "protected static void save(String fileName) {\n\t\tif (curMIDI != null) {\n\t\t\ttry {\n\t\t\t\tMidiSystem.write(curMIDI, 1, new File(fileName));\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"Could not save file\");\n\t\t\t}\n\t\t}\n\t}", "void saveToFile(String filename) throws IOException;", "void save(File file);", "public static void saveDocument( Document doc, String path ) {\n\t\ttry {\n\t\t\tFormat format = Format.getPrettyFormat();\n\t\t\tXMLOutputter fmt = new XMLOutputter( format );\n\t\t\tFile file = new File( path );\n\t\t\tOutputStream stream = new FileOutputStream( file );\n\t\t\tfmt.output( doc, stream );\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new RuntimeException( \"No se encontro el archivo: \" + path, e );\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException( \"Error al guardar el archivo: \" + path, e );\n\t\t}\n\t}", "public boolean save(String file);", "@Override\n public void saveFile(String fileString, String filename) throws IOException {\n }", "public void saveFacultyDirectory(String filename) {\r\n\t\ttry {\r\n\t\t\tFacultyRecordIO.writeFacultyRecords(filename, facultyDirectory);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new IllegalArgumentException(\"Unable to write to file \" + filename);\r\n\t\t}\r\n\t}", "public static native boolean saveDocument(String doc, String toFile);", "public void save () {\n\t\tif (!open) {\n\t\t\tSystem.out.println (\"ExternalDocument.save: attempt to save unopened document \" + fileName);\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tif (format.equals(\"sgml\")) {\n\t\t\t\tString tagToWrite;\n\t\t\t\tif (allTags)\n\t\t\t\t\ttagToWrite = null;\n\t\t\t\telse if (SGMLtags.length == 0)\n\t\t\t\t\ttagToWrite = \"***\"; // unused annotation type\n\t\t\t\telse if (SGMLtags.length == 1)\n\t\t\t\t\ttagToWrite = SGMLtags[0];\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println (\"ExternalDocument.save: cannot write more than 1 annotation type\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tString string = writeSGML(tagToWrite).toString();\n\t\t\t\tFile file = new File(fullFileName());\n\t\t\t\tBufferedWriter writer = new BufferedWriter (\n\t\t\t\t\t\tnew OutputStreamWriter (new FileOutputStream(file), JetTest.encoding));\n\t\t\t\twriteWithSystemNewlines (writer, string);\n\t\t\t\twriter.close();\n\t\t\t} else {\n\t\t\t\t\tSystem.out.println (\"Error saving document \" + fileName);\n\t\t\t\t\tSystem.out.println (\"Unknown document format.\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println (\"Error opening document \" + fileName);\n\t\t\t\tSystem.out.println (e);\n\t\t}\n\t}", "public FileSaver(Path directory) {\n this.directory = directory;\n }", "public static void save() {\n Game.save(UI.askNgetString(\"Filename for this save file?\")+\".xml\");\n }", "public void saveFile(String name) throws CDFException, IOException,\n\t\t\t\t\t InterruptedException {\n\t// Update the hidden global attributes\n\n\t// Save the current variable if any\n\tvariablePanel.saveVariableChanges();\n\n\t// Make sure that the selectedVar is now a variable.\n\n\tif (name != null) {\n\t filename = name;\n\t theFile = new File(filename);\n\t if (name.toLowerCase().indexOf(\".cdf\") != -1) {\n\t rootfilename = name.substring(0, name.length() - 4);\n\t ext = name.toLowerCase().substring(name.length() - 4);\n\t } else {\n\t rootfilename = name;\n\t ext = \".cdf\";\n\t }\n\n\t // Set the title to display the filename\n\t getFrame().setTitle(\"MYEditor: \"+theFile.getName());\n\t}\n\n\t// commit changes to working file\n\ttheCDF.save();\n\tif (!rootfilename.equals(cdfspec)) \n\t copyFile(cdfspec+\".cdf\", rootfilename+\".cdf\"); \n\n\tsave.setEnabled(true);\n\n\tsaveAsOnClose = false;\n\n }", "private void save() throws FileNotFoundException {\n\t\tm.write(new FileOutputStream(OUTPUT), \"RDF/XML\");\n\t}", "private void saveFile() {\n if (fileExisted == false) {\n JFileChooser fChoice = new JFileChooser();\n int choice = fChoice.showSaveDialog(this);\n if (choice == JFileChooser.APPROVE_OPTION) {\n File f = fChoice.getSelectedFile();\n //\n if(!f.getName().contains(\".txt\")){\n File fN=new File(f.getParent(), f.getName()+\".txt\");\n FileDAO.writeFile(fN, txtContent);\n fMain = fN;\n fileExisted = true;\n lastSave=true;\n this.setTitle(fN.getName());\n }\n else{\n \n FileDAO.writeFile(f, txtContent);\n fMain = f;\n fileExisted = true;\n lastSave=true;\n this.setTitle(f.getName());\n } \n \n }\n } else if (fileExisted == true) {\n FileDAO.writeFile(fMain, txtContent);\n lastSave=true;\n }\n\n }", "public void saveFile(){\n\t\t// the files name\n\t\tString fileName = nameOfFile.getText();\n\t\tString folderName = saveTo.getText();\n\t\tString pattern = \"^[a-zA-Z0-9_]*$\";\n\t\tString seperator = System.getProperty(\"file.separator\");\n\t\t\t\t\t\n\t\t//checks if file name is valid\n\t\tif (!fileName.matches(pattern)){\n\t\t\tif (mf != null){\n\t\t\t\tmf.dispose();\n\t\t\t}\n\t\t\tmf = new MessageFrame(getX()+368,getY()-150,\"Error\", \"ERROR 7:\", \"Invalid Name!\");\n\t\t\tmf.setVisible(true);\n\t\t\treturn;\n\t\t}else if (fileName.equals(\"\")){\n\t\t\tif (mf != null){\n\t\t\t\tmf.dispose();\n\t\t\t}\n\t\t\tmf = new MessageFrame(getX()+368,getY()-150,\"Error\", \"ERROR 1:\", \"Please enter name for new file!\");\n\t\t\tmf.setVisible(true);\n\t\t\treturn;\n\t\t}\n\t\t// makes sure the file is a .mp3 file\n\t\tfileName = fileName + \".mp3\";\n\t\t\t\t\t\n\t\tif(!folderName.equals(\"\")){\n\t\t\tfileName = folderName + seperator + fileName;\n\t\t}\n\t\t// used to check if the file exists\n\t\t\t\t\t\n\t\tFile tmpFile = new File(fileName);\n\t\tFile tmpDir = new File(folderName);\n\t\t\t\t\t\n\t\t// checks if file already exists or file is a directory\n\t\tif (tmpFile.exists() && !tmpFile.isDirectory()){\n\t\t\tif(mf != null){\n\t\t\t\tmf.dispose();\n\t\t\t}\n\t\t\tMessageFrame mf = new MessageFrame(getX()+368,getY()-150,\"Error\", \"ERROR 3:\", \"File Already Exists!\");\n\t\t\tmf.setVisible(true);\n\t\t\treturn;\n\t\t}else if (!tmpDir.exists()){\n\t\t\tif(mf != null){\n\t\t\t\tmf.dispose();\n\t\t\t}\n\t\t\tMessageFrame mf = new MessageFrame(getX()+368,getY()-150,\"Error\", \"ERROR 4\", \"Folder does not Exists!\");\n\t\t\tmf.setVisible(true);\n\t\t\treturn;\n\t\t}\n\t\t\t\t\t\n\t\t// Creates the wave file the user requests\n\t\tSaveSpeech ss = new SaveSpeech(message, fileName,statuslbl,progressBar, voice, rate, pitchStart, pitchEnd);\n\t\tss.execute();\n\t\tthisFrame.dispose();\n\t}", "public void saveNewFile() {\n\t\tJFileChooser choose = new JFileChooser();\n\t\tif(choose.showSaveDialog(null) == JFileChooser.APPROVE_OPTION) {\n\t\ttry {\n\t\t\t\tdir=choose.getCurrentDirectory().toString();\n\t\t\t\tString fileName =dir+ \"\\\\\" + choose.getSelectedFile().getName();\n\t\t\t File file = new File(fileName);\n\t\t\t if(file.exists()) {\n\t\t\t \tint confirm = JOptionPane.showConfirmDialog(null, \n\t\t\t \t\t\t\"File already exists. Do you want to overwrite it?\",\n\t\t\t \t\t\t\"Choose one\",JOptionPane.YES_NO_OPTION);\n\t\t\t \tif(confirm == JOptionPane.NO_OPTION)return;\n\t\t\t }\n\t\t\t\tPrintWriter writer = new PrintWriter(file);\n\t\t\t\twriter.write(frame.textArea.getText());\n\t\t\t\twriter.close();\n\t\t\t\tframe.setTitle(choose.getSelectedFile().getName()+\"-Text Editor\");\n\t\t\t\tframe.originalText=frame.textArea.getText();\n\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void saveUserDirectory(String fileName) {\n\t\ttry {\n\t\t\tUserRecordIO.writeUserRecords(fileName, users);\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalArgumentException(\"Unable to write to file \" + fileName);\n\t\t}\n\t}", "public void saveFile() {\t\n\t\tString fileloc = \"\";\n\t\tif(!prf.foldername.getText().equals(\"\"))\n\t\t\tfileloc += prf.foldername.getText()+\"/\";\n\t\tfileloc += ((MinLFile) tabbedPane.getSelectedComponent()).filename;;\t\t\n\t\tFile fl = new File(fileloc);\n\t\t\n\t\ttry {\n\t\t\tif(fl.exists()) {\n\t\t\t\tint option = JOptionPane.showConfirmDialog(null, \"The file with this name already exists, do you want to overwrite it?\", \"Save File\", JOptionPane.YES_NO_OPTION);\n\t\t\t\tif(option == 0) {\n\t\t\t\t\tFiles.delete(fl.toPath());\n\t\t\t\t\ttry {\n\t\t\t\t\t\t\n\t\t\t\t\t\tFileWriter fw = new FileWriter(fileloc);\n\t\t\t\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\t\t\t\tbw.write(((MinLFile) tabbedPane.getSelectedComponent()).CodeArea.getText());\n\t\t\t\t\t\tbw.close();\n\t\t\t\t\t\tfw.close();\n\t\t\t\t\t\t((MinLFile) tabbedPane.getSelectedComponent()).filechanged = false;\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\tFileWriter fw = new FileWriter(fileloc);\n\t\t\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\t\t\tbw.write(((MinLFile) tabbedPane.getSelectedComponent()).CodeArea.getText());\n\t\t\t\t\tbw.close();\n\t\t\t\t\tfw.close();\n\t\t\t\t\t((MinLFile) tabbedPane.getSelectedComponent()).filechanged = false;\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"The specified folder doesnt exist.\");\n\t\t\t\t\te1.printStackTrace();\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}", "public void saveWorkflow(String filename);", "public static void save(String text, String fileName) {\n //check the directory has been created\n File dir = new File(path);\n if(!dir.exists()){\n boolean success = dir.mkdir();\n if(! success){\n Log.e(\"walter's tag\", \"In Saver.java, setup() failed to create directory\");\n return;\n }\n }\n\n //save the text file in the directory\n File file = new File(path + \"/\" + fileName);\n Save(file, text);\n }", "private void xmlSave() {\r\n FileDialog fd = new FileDialog(new Frame(), \r\n \"Save as a jMusic XML file...\", \r\n FileDialog.SAVE);\r\n fd.show();\r\n if (fd.getFile() != null) {\r\n jm.util.Write.xml(score, fd.getDirectory() + fd.getFile());\r\n }\r\n }", "public void saveEPILine(String directory)\r\n\t{\r\n\t\tsaveEPILine(new File(directory));\r\n\t}", "@Override\n\tpublic void domove(String filename) {\n\n\t\tFile starfile = new File(\"D://FileRec/\" + filename);\n\n\t\tFile endDirection = new File(\"D://FileRec//docx\");\n\t\tif (!endDirection.exists()) {\n\t\t\tendDirection.mkdirs();\n\t\t}\n\n\t\tFile endfile = new File(endDirection + File.separator + starfile.getName());\n\n\t\ttry {\n\t\t\tif (starfile.renameTo(endfile)) {\n\t\t\t\tSystem.out.println(\"转移成功\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"转移失败,或许是重名\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"文件移动出现异常\");\n\t\t}\n\t}", "public void Save(){\n\tJFileChooser j = new JFileChooser(\"\"); \n\t// Invoke the showsSaveDialog function to show the save dialog \n\tint r = j.showSaveDialog(null);\n \n\tif (r == JFileChooser.APPROVE_OPTION) { \n\n\t// Set the label to the path of the selected directory \n File fi = new File(j.getSelectedFile().getAbsolutePath()); \n\n try { \n\t\t// Create a file writer \n\t\tFileWriter wr = new FileWriter(fi, false); \n\n\t\t// Create buffered writer to write \n\t\tBufferedWriter w = new BufferedWriter(wr); \n\n\t\t// Write\n\t\tw.write(t.getText()); \n\n\t\tw.flush(); \n\t\tw.close(); \n } \n catch (Exception evt) { \n\t\tJOptionPane.showMessageDialog(f, evt.getMessage()); \n } \n\t} \n\t// If the user cancelled the operation \n\telse\n JOptionPane.showMessageDialog(f, \"the user cancelled the operation\"); \n\t\t\n }", "public void saveChanges() throws TransformerException {\n\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\r\n\t\tTransformer transformer = transformerFactory.newTransformer();\r\n\t\tDOMSource source = new DOMSource(document);\r\n\t\tStreamResult result = new StreamResult(new File(path));\r\n\t\ttransformer.transform(source, result);\r\n\t}", "public void saveNewFile() {\r\n JFileChooser fileChooser = new JFileChooser();\r\n\r\n int status = fileChooser.showSaveDialog(null);\r\n\r\n if (status == JFileChooser.APPROVE_OPTION) {\r\n\r\n fileName = fileChooser.getSelectedFile().toString();\r\n\r\n saveFile();\r\n }\r\n }", "@FXML\n\tpublic void saveFile() {\n\t\tif (file == null) {\n\t\t\tFileChooser saveFileChooser = new FileChooser();\n\t\t\tsaveFileChooser.setInitialDirectory(userWorkspace);\n\t\t\tsaveFileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter(\"Text doc(*.txt)\", \"*.txt\"));\n\t\t\tfile = saveFileChooser.showSaveDialog(ap.getScene().getWindow());\n\t\t}\n\n\t\tif (file.getName().endsWith(\".txt\")) {\n\t\t\ttry {\n\t\t\t\tfilePath = file.getAbsolutePath();\n\t\t\t\tStage primStage = (Stage) ap.getScene().getWindow();\n\t\t\t\tprimStage.setTitle(filePath);\n\t\t\t\tTab tab = tabPane.getSelectionModel().getSelectedItem();\n\t\t\t\ttab.setId(filePath);\n\t\t\t\ttab.setText(file.getName());\n\n\t\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(file));\n\t\t\t\tPrintWriter output = new PrintWriter(writer);\n\t\t\t\toutput.write(userText.getText());\n\t\t\t\toutput.flush();\n\t\t\t\toutput.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(file.getName() + \" has no valid file-extenstion.\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "private void saveFile() {\n\t\ttry {\n\t\t\tFile file = jfc.getSelectedFile();\n\t\t\tint c = -1;\n\t\t\tif(file==null)\n\t\t\t{\n\t\t\t\tc = jfc.showSaveDialog(this);\n\t\t\t}\n\t\t\t\n\n\t\t\tif(file!= null || c ==0)\n\t\t\t{\t\n\t\t\t\tFileWriter fw = new FileWriter(jfc.getSelectedFile());\n\t\t\t\tfw.write(jta.getText());\n\t\t\t\tfw.close();\n\t\t\t\tSystem.out.println(\"파일을 저장하였습니다\");\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t\n\t\t} catch (Exception e2) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.out.println(e2.getMessage());\n\t\t}\n\t}", "public void save(String filename) throws IOException\n {\n DataOutputStream output;\n\n try\n {\n output = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(new File(filename))));\n }\n catch (Exception e)\n {\n throw new IOException(\"Cannot open output file \" + filename + \":\" + e.getMessage());\n }\n save(output);\n output.flush();\n output.close();\n }", "default void save(String file) {\n save(new File(file));\n }", "public void save() {\n JAXB.marshal(this, new File(fileName));\n }", "public void save() {\n Path root = Paths.get(storagePath);\n try {\n Files.copy(file.getInputStream(), root.resolve(file.getOriginalFilename()),\n StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void save(final String name) {\r\n\t\tsave(new File(name));\r\n\t}", "public void saveAs() {\n editorManager.currentFileManager().saveAs();\n mimaUI.fileChanged();\n }", "public static void saveDocument(String path, String textToWrite, Configuration c){\n File f = new File(path);\n Writer out = null;\n try{\n if(f.exists()){\n //JOptionPane.showMessageDialog(null, \"You have overwritten the previous file. This message should be better prepared.\");\n if(!c.getOverWriteAll()){\n String[] options = new String[] {\"Rewrite all\", \"Yes\", \"No\"};\n int response = JOptionPane.showOptionDialog(null, \"The file \"+f.getName()+\" already exists. Do you want to overwrite it?\", \"Existing File!\",JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE,null, options, options[0]);\n //0 -> yes to all. 1 -> Yes. 2-> No\n if(response == 0)c.setOverwriteAll(true); \n if(response == 2)return; //else we continue rewriting the file.\n }\n }\n else{\n f.createNewFile();\n }\n out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(f), \"UTF-8\"));\n out.write(textToWrite);\n out.close();\n }catch(IOException e){\n System.err.println(\"Error while creating the file \"+e.getMessage()+\"\\n\"+f.getAbsolutePath());\n } \n \n }", "private void savePressed(){\n\t\t\n\t\tJFileChooser fileChooser = new JFileChooser(System.getProperty(\"user.dir\"));\n\t\tFileNameExtensionFilter extentions = new FileNameExtensionFilter(\"SuperCalcSave\", \"scalcsave\");\n\t\tfileChooser.setFileFilter(extentions);\n\t\tint retunedVal = fileChooser.showSaveDialog(this);\n\t\tFile file = null;\n\t\tif(retunedVal == JFileChooser.APPROVE_OPTION){\n\t\t\tfile = fileChooser.getSelectedFile();\n\t\t\t//make sure file has the right extention\n\t\t\tif(file.getAbsolutePath().contains(\".scalcsave\"))\n\t\t\t\tfile = new File(file.getAbsolutePath());\n\t\t\telse\n\t\t\t\tfile = new File(file.getAbsolutePath()+\".scalcsave\");\n\t\t}\n\t\t//only continue if a file is selected\n\t\tif(file != null){\t\n\t\t\ttry {\n\t\t\t\t//read in file\n\t\t\t\tObjectOutputStream output = new ObjectOutputStream(new FileOutputStream(file));\n\t\t\t\toutput.writeObject(SaveFile.getSaveFile());\n\t\t\t\toutput.close();\n\t\t\t\tSystem.out.println(\"Save Success\");\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public void writeToFile(String fileName, String xml) {\n\t\ttry {\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(fileName));\n\t\t\tbw.write(xml);\n\t\t\tbw.close();\n\t\t} catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void save() throws FileNotFoundException, IOException, ClassNotFoundException ;", "void saveToFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile target = new File(directory, FILE_NAME);\n\t\t\tif (!target.exists()) {\n\t\t\t\ttarget.createNewFile();\n\t\t\t}\n\t\t\tJsonWriter writer = new JsonWriter(new FileWriter(target));\n\t\t\twriter.setIndent(\" \");\n\t\t\twriter.beginArray();\n\t\t\tfor (Scoreboard scoreboard : scoreboards.values()) {\n\t\t\t\twriteScoreboard(writer, scoreboard);\n\t\t\t}\n\t\t\twriter.endArray();\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}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tsaveFile();\n\t\t\t}", "public void saveNewRollManager()\n\t{\n\t JFileChooser chooser = new JFileChooser(); //allows the user to choose a file\n\t chooser.setCurrentDirectory(new File(\"/home/me/Documents\"));\t//sets the directory of where to find the file\n\t int retrival = chooser.showSaveDialog(null);\n\t if (retrival == JFileChooser.APPROVE_OPTION) {\n\t try \n\t {\n\t FileWriter fw = new FileWriter(chooser.getSelectedFile()+\".txt\");\n\t fw.write (getCourseToFileString ( ));\n\t for(Student b : getStudents ( ))\t \t\n\t \tfw.write(b.toFileString ( ));\n\t \tfw.close ( );\n\t \t;\n\t } \n\t catch (Exception ex) \n\t {\n\t ex.printStackTrace();\n\t }\n\t\t\tthis.saveNeed = false;\n\n\t }\n\t \n\t}", "public void setSaveDirectory(String dir) {\r\n\t\tEmailServiceEJB.saveDirectory = dir;\r\n\t}", "@Override\n public String saveFile(MultipartFile file, String rootDirectory ) {\n String path = null;\n try {\n if (file != null && !file.isEmpty()) {\n java.util.Date date = new java.util.Date();\n int i = (int) (date.getTime() / 1000);\n String extention = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(\".\")+1);\n String fileName =file.getOriginalFilename().substring(0, file.getOriginalFilename().lastIndexOf(\".\"));\n path = rootDirectory + fileName + \"-\" + i + \".\"+ extention;\n\n File finalFilePath = new File(path);\n //create all path directories if not exist\n finalFilePath.getParentFile().mkdirs();\n file.transferTo(new File(path));\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n return path;\n }", "public void saveRecordedFile() {\n\t\tFileChooser fileChooser = new FileChooser();\n\t\tExtensionFilter filter = new ExtensionFilter(\"WAV files (*.wav)\", \".wav\");\n\t\tfileChooser.getExtensionFilters().add(filter);\n\t\tFile file = fileChooser.showSaveDialog(mainContainer.getScene().getWindow());\n\t\tString fullPath;\n\t\ttry {\n\t\t\tfullPath = file.getAbsolutePath();\n\t\t\tif (!fullPath.endsWith(\".wav\")) {\n\t\t\t\tfullPath = fullPath + \".wav\";\n\t\t\t}\n\t\t\tcontroller.saveAudioFile(fullPath);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void save(){\n\tif(currentFile == null){\n\t // TODO: add popup to select where to save file and file name\n\t // currentFile = new TextFile(os, title, null);\n\t}else{\n\t currentFile.setBody(textArea.getText());\n\t}\n }", "public void writeToEditorFile(String filePath, Document doc) {\n\n boolean success = true;\n try {\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n File file = new File(filePath);\n StreamResult result = new StreamResult(file);\n transformer.transform(source, result);\n\n } catch (TransformerException pce) {\n success = false;\n pce.printStackTrace();\n } finally {\n\n if (success) {\n FeedBackLogger.sendGoodMessage(\"File Saved Successfully!!!\");\n } else {\n FeedBackLogger.sendBadMessage(\"File Didn't Saved!!\");\n }\n\n }\n\n }", "public synchronized void saveFileIDInfo(String projectName, String viewName, int fileID, String appendedPath, String shortFilename, int directoryID) {\n store.saveFileIDInfo(projectName, viewName, fileID, appendedPath, shortFilename, directoryID);\n scheduleSaveOfFileIdStore();\n }", "public void saveDocumentAs( final URL url ) {\n\t\ttry {\n\t\t\tSystem.out.println( \"Saving to: \" + url );\n\t\t\tif ( _optics.save( this ) ) {\n\t\t\t\tsetHasChanges( false );\n\t\t\t\t// to do: really should make a logbook entry about this\n\t\t\t}\n\t\t\telse {\n\t\t\t\tJOptionPane.showMessageDialog( getMainWindow(), \"The save operation was cancelled.\", \"Save Cancelled\" , JOptionPane.WARNING_MESSAGE );\n\t\t\t}\n\t\t}\n\t\tcatch( Exception exception ) {\n\t\t\tdisplayError( \"Save Failed\", \"Exception while attempting to save changes\", exception );\n\t\t}\n\t}", "public void saveAs() {\n\t\tJFileChooser fc = new JFileChooser(\"./\");\n\t\tBufferedWriter bw = null;\n\t\tFileWriter fw = null;\n\t\tint returnValue = fc.showSaveDialog(contentPane);\n\t\t\n\t\tif(returnValue == JFileChooser.APPROVE_OPTION) {\n\t\t\ttry {\n\t\t\t\tString path = fc.getCurrentDirectory().getAbsolutePath();\n\t\t\t\tString name = fc.getSelectedFile().getName();\n\t\t\t\tif(!name.endsWith(\".txt\")) {\n\t\t\t\t\tname += \".txt\";\n\t\t\t\t}\n\t\t\t\tFile file = new File(path,name);\n\t\t\t\t\n\t\t\t\tfw = new FileWriter(file);\n\t\t\t\tbw = new BufferedWriter(fw);\n\t\t\t\t//string to hold each line to write on new file\n\t\t\t\tString text = textArea.getText();\n\t\t\t\t//write file\n\t\t\t\tif (text != null) {\n\t\t\t\t\tbw.write(text);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (IOException ie) {\n\t\t\t\tie.printStackTrace();\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\ttry {\n\t\t\t\t\tif (bw != null) {\n\t\t\t\t\t\tbw.close();\n\t\t\t\t\t\tfw.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (IOException ie2) {\n\t\t\t\t\tie2.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void fileSaved(OpenDefinitionsDocument doc) { }", "public void fileSaved(OpenDefinitionsDocument doc) { }", "void save(XMLDocument document, XMLStreamWriter writer) throws XMLStreamException;", "public void save() {\n\t\tBufferedWriter bw = null;\n\t\tFileWriter fw = null;\n\t\ttry {\n\t\t\tFile file = new File(\"fileSave.txt\");\n\t\t\tif(!file.exists()) {\n\t\t\t\tfile.createNewFile();\n\t\t\t}\n\t\t\tfw = new FileWriter(file);\n\t\t\tbw = new BufferedWriter(fw);\n\t\t\t//string to hold text to write on new file\n\t\t\tString text = textArea.getText();\n\t\t\t//write file\n\t\t\tif (text != null) {\n\t\t\t\tbw.write(text);\n\t\t\t}\n\t\t}\n\t\tcatch (IOException ie) {\n\t\t\tie.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (bw != null) {\n\t\t\t\t\tbw.close();\n\t\t\t\t\tfw.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (IOException ie2) {\n\t\t\t\tie2.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void save(String folderName, String fileName) {\n try {\n File directory = new File(BASE_FOLDER_NAME + File.separator + folderName);\n directory.mkdir();\n FileWriter writer = new FileWriter(BASE_FOLDER_NAME + File.separator + folderName\n + File.separator + fileName + FILE_EXTENSION);\n writer.write(width + \"\\n\");\n writer.write(height + \"\\n\");\n for (int j = 0; j < height; j++) {\n for (int i = 0; i < width; i++) {\n writer.write(SEPERATOR_SYMBOL);\n writer.write(entries[j][i]);\n }\n writer.write(\"\\n\");\n }\n writer.close();\n } catch (IOException e) {\n System.out.println(\"Oops, the file writer took in a directory for some reason!\");\n }\n }", "public void onSaveButtonClick(ActionEvent e){\n\t\tsaveFile(false);\n\t}", "public static void writeWord(XWPFDocument document, String fileName) throws IOException {\n\t\tFileOutputStream out = new FileOutputStream(new File(fileName));\n\t\tdocument.write(out);\n\t\tout.close();\n\t}", "public void save(File file) {\n //new FileSystem().saveFile(addressBook, file);\n }", "public abstract boolean processSaveDocument(Document document);", "public void saveToFile()\n\t{\t\n\t\tsetCourseToFileString(courseToFileString);\n\t\t\ttry \n\t {\n\t FileWriter fw = new FileWriter(fileName);\n\t fw.write (this.getCourseToFileString ( ));\n\t for(Student b : this.getStudents ( ))\t \t\n\t \tfw.write(b.toFileString ( ));\n\t \tfw.close ( );\n\t } \n\t catch (Exception ex) \n\t {\n\t ex.printStackTrace();\n\t }\n\t\t\tthis.saveNeed = false;\n\n\t}", "private void saveAs() {\n\t\tFileChooser fileChooser = new FileChooser();\n\n\t\t// Set extension filter\n\t\tFileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter(\n\t\t\t\t\"XML files (*.xml)\", \"*.xml\");\n\t\tfileChooser.getExtensionFilters().add(extFilter);\n\n\t\t// Show save file dialog\n\t\tFile file = fileChooser.showSaveDialog(mainApp.getPrimaryStage());\n\n\t\tif (file != null) {\n\t\t\t// Make sure it has the correct extension\n\t\t\tif (!file.getPath().endsWith(\".xml\")) {\n\t\t\t\tfile = new File(file.getPath() + \".xml\");\n\t\t\t}\n\t\t\tmainApp.saveFilmDataToFile(file);\n\t\t}\n\t}", "public void saveFile() {\n\t\tPrintWriter output = null;\n\t\ttry {\n\t\t\toutput = new PrintWriter(\"/Users/katejeon/Documents/Spring_2020/CPSC_35339/avengers_project/game_result.txt\");\n\t\t\toutput.println(textArea.getText());\n\t\t\toutput.flush();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"File doesn't exist.\");\n\t\t} finally {\n\t\t\toutput.close();\n\t\t}\n\t}", "public void saveFile(){\n returnValue = this.showSaveDialog(null);\n if (returnValue == JFileChooser.APPROVE_OPTION) {\n new CustomerFileWriter(new File(this.getSelectedFile().getAbsolutePath())).saveCustomer(Bank.customer);\n }\n }", "public void saveGame(File fileLocation);", "public void saveFile(MultipartFile file,Document document){\n document.setKey(UUID.randomUUID().toString());\n document.setLink(UUID.randomUUID().toString());\n\n }", "void SaveBook(String fileName)\r\n\t\t{\r\n\t\t\tFile f = new File(fileName);\r\n\t\t\t\r\n\t\t\tFileWriter writer;\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\twriter = new FileWriter(f);\r\n\t\t\t\tfor(int i = 0; i < this.size(); i++)\r\n\t\t\t\t{\r\n\t\t\t\twriter.write(this.get(i).getContactName());\r\n\t\t\t\twriter.write(\",\");\r\n\t\t\t\twriter.write(Integer.toString(this.get(i).getContactNumber()));\r\n\t\t\t\twriter.write(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t\twriter.flush();\r\n\t\t\t\twriter.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "@Override\n public void whenDone() {\n getDocumentController().setFile(fileToSaveTo);\n getDocumentController().setHasChanged(false);\n getDocumentController().notifyChange();\n }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfile.save();\r\n\t\t\t\tclose();\r\n//\t\t\t\tfile.de = true;\r\n\r\n\t\t\t}", "private void saveFile(File file){\r\n\t\ttry {\r\n\t\t\tlocal.saveFile(file);\r\n\t\t\topenFile = file;\r\n\t\t\tpopulateRecentMenu();\r\n\t\t\tframe.setTitle(openFile.getName());\r\n\t\t\tedit = false;\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "void saveAs() {\n writeFile.Export();\n }", "public void saveArchive() throws FileNotFoundException {\n jsonWriter.open();\n Archive archive = new Archive(cameraCollection, filmCollection);\n jsonWriter.write(archive);\n jsonWriter.close();\n }", "public static void writeSave(String filepath, ISaveConfiguration scores) {\n try {\n Element root = Writer.buildDocumentWithRoot(DATA_TYPE);\n Document document = root.getOwnerDocument();\n\n addSaves(document, root, scores);\n\n Writer.writeOutput(document, filepath);\n } catch (TransformerException e) {\n throw new XMLException(e, Factory.UNKNOWN_ERROR);\n }\n }", "private void saveFile() {\r\n\t\tJFileChooser fileChooser = new JFileChooser();\r\n\t\tFileFilter wavFilter = new FileFilter() {\r\n\t\t\t@Override\r\n\t\t\tpublic String getDescription() {\r\n\t\t\t\treturn \"Sound file (*.WAV)\";\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic boolean accept(File file) {\r\n\t\t\t\tif (file.isDirectory()) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn file.getName().toLowerCase().endsWith(\".wav\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfileChooser.setFileFilter(wavFilter);\r\n\t\tfileChooser.setAcceptAllFileFilterUsed(false);\r\n\r\n\t\tint userChoice = fileChooser.showSaveDialog(this);\r\n\t\tif (userChoice == JFileChooser.APPROVE_OPTION) {\r\n\t\t\tsaveFilePath = fileChooser.getSelectedFile().getAbsolutePath();\r\n\t\t\tif (!saveFilePath.toLowerCase().endsWith(\".wav\")) {\r\n\t\t\t\tsaveFilePath += \".wav\";\r\n\t\t\t}\r\n\r\n\t\t\tFile wavFile = new File(saveFilePath);\r\n\r\n\t\t\ttry {\r\n\t\t\t\trecorder.save(wavFile);\r\n\r\n\t\t\t\tJOptionPane.showMessageDialog(SwingSoundRecorder.this,\r\n\t\t\t\t\t\t\"Saved recorded sound to:\\n\" + saveFilePath);\r\n\r\n\t\t\t\tbuttonPlay.setEnabled(true);\r\n\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tJOptionPane.showMessageDialog(SwingSoundRecorder.this, \"Error\",\r\n\t\t\t\t\t\t\"Error saving to sound file!\",\r\n\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void save(String file_name) {\n\t\tserialize(file_name);\n\t}", "void saveFile() {\n\t\tJFileChooser fileChooser = new JFileChooser(desktopPath);\n\t\tint returnVal = fileChooser.showSaveDialog(null);\n\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile filePath = fileChooser.getSelectedFile();\n\t\t\ttry {\n\t\t\t\tPrintWriter writer = new PrintWriter(filePath);\n\t\t\t\tScanner out = new Scanner(textEditor.getText());\n\t\t\t\twhile(out.hasNextLine()) {\n\t\t\t\t\twriter.println(out.nextLine());\n\t\t\t\t}\n\t\t\t\tout.close();\n\t\t\t\twriter.close();\n\t\t\t\ttextAreaChanged =false;\n\t\t\t\tsavedFilePath = filePath.getPath();\n\t\t\t\terrorTextArea.setText(\"\");\n\t\t\t} catch (Exception ex) {\n\t\t\t\terrorTextArea.setForeground(Color.RED);\n\t\t\t\terrorTextArea.setText(\"Error saving file\");\n\t\t\t}\n\t\t}\n\t}", "public final void saveToFile() {\n\t\tWrite.midi(getScore(), getName()+\".mid\"); \n\t}", "public void save() {\n\t\tWriteFile data = new WriteFile( this.name + \".txt\" );\n\t\ttry {\n\t\t\t data.writeToFile(this.toString());\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(\"Couldn't print to file\");\n\t\t}\n\t}", "public void saveAsFile(String path)\n {\n call(\"SaveAsFile\", path);\n }", "private void writeXmlFile( Document doc, String file_path ) {\r\n\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tTransformerFactory tf = TransformerFactory.newInstance();\r\n\t\t\tTransformer transformer = tf.newTransformer();\r\n\t\t\tDOMSource source \t\t= new DOMSource( doc );\r\n\t\t\tStreamResult result \t= new StreamResult( new File( file_path ));\r\n\t\t\t\r\n\t\t\t// Output to console for testing\r\n\t\t\t// StreamResult result = new StreamResult(System.out);\r\n\r\n\t\t\ttransformer.transform( source, result );\r\n\t\t\tSystem.out.println( \"File saved!\" );\r\n\r\n\r\n\t\t} catch ( TransformerException e ) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void save()\r\n {\r\n \tfc=new JFileChooser();\r\n\t fc.setCurrentDirectory(new File(\"\"));\r\n\t if(fc.showSaveDialog(this)==JFileChooser.APPROVE_OPTION)\r\n\t \t//Try-Catch Block\r\n\t try\r\n\t {\r\n\t pw=new PrintWriter(new FileWriter(fc.getSelectedFile()+\".txt\")); //Print to the user-selected file\r\n\t\t \tfor(Organism o: e.getTree()) //IN PROGESS\r\n\t\t \t{\r\n\t\t\t\t\tint[] genes=o.getGenes(); //Getting genes from \r\n\t\t\t\t\tfor(int i=0; i<genes.length; i++)\r\n\t\t\t\t\t\tpw.print(genes[i]+\" \"); //Print each gene value in a line\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tpw.println(); //Starts printing on a new line\r\n\t\t\t\t}\r\n\t\t\t\tpw.close(); //Closes the File\r\n\t }\r\n\t catch (Exception ex) //Catch Any Exception\r\n\t {\r\n\t ex.printStackTrace();\r\n\t }\r\n }", "public void store (String fileName) throws IOException {\n\t\tBufferedWriter out = new BufferedWriter\n\t\t\t(new OutputStreamWriter\n\t\t\t (new FileOutputStream(fileName), JetTest.encoding));\n\t\tannotator.writeTagTable (out);\n\t\tout.write (\"endtags\");\n\t\tout.newLine ();\n\t\tmene.store (out);\n\t}", "boolean saveDocument(String path, String documentContent, Charset charset, List <String> moduleList);", "public void saveTree(String filename) {\r\n\t\ttry { // Try saving tree\r\n\t\t\tsaveTree(new File(filename));\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// Exit if there is an exception\r\n\t\t\tSystem.err.println(\"Could not save to file: \" + filename);\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t}", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\tString fileName=JOptionPane.showInputDialog(\"Enter the File name without any extension\");\r\n\t\t\ttheGame.save(fileName);\r\n\t\t}", "public void saveDatabase() {\r\n\t\ttry {\r\n\t\t\tFile databaseDirectory = new File (System.getProperty(\"user.home\")\r\n\t\t\t\t\t+ File.separator + \"Documents\" + File.separator + \"DatabaseUniverse\"\r\n\t\t\t\t\t+ File.separator + name);\r\n\t\t\tdatabaseDirectory.mkdirs();\r\n\t\t\tFile[] files = databaseDirectory.listFiles();\r\n\t\t\tSystem.gc();\r\n\t\t\tfor (File file : files) {\r\n\t\t\t\tFiles.delete(file.toPath());\r\n\t\t\t}\r\n\t\t\tfor (Table table : tables) {\r\n\t\t\t\ttable.saveTable(databaseDirectory.getPath());\r\n\t\t\t}\r\n\t\t} catch (SecurityException e) {\r\n\t\t\tSystem.out.println(\"Access Denied in Documents folder. Please check your security settings\"\r\n\t\t\t\t\t+ \"to enable file saving\");\r\n\t\t} catch (NullPointerException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\tSystem.err.print(e);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(e);\r\n\t\t}\r\n\t}", "private void saveButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_saveButtonMouseClicked\n \n FileDialog dialog = new FileDialog(this, \"Ssuvegarder le fichier dictionnaire\", FileDialog.SAVE);\n dialog.setFile(loadedDictionaryFilename);\n dialog.setVisible(true);\n \n String filename = dialog.getFile();\n if(filename != null) // if user selected a file\n {\n // add .txt extension if user didn't add it\n if(!filename.substring(filename.length() - 4).equals(\".txt\"))\n filename = filename + \".txt\";\n \n // add full path of the filename\n filename = dialog.getDirectory() + filename;\n \n // get all WordDefinition in an arraylist \n ArrayList<WordDefinition> allWordDefinitionList = new ArrayList<>();\n for(int i = 0 ; i < lexiNodeTrees.size() ; i++)\n {\n ArrayList<WordDefinition> allWordsInTree = lexiNodeTrees.get(i).getAllWordsFromTree();\n \n for(int j = 0 ; j < allWordsInTree.size() ; j++)\n {\n allWordDefinitionList.add(allWordsInTree.get(j));\n }\n }\n \n // sort the list of word definition in alphabetical order\n Collections.sort(allWordDefinitionList, new WordDefinitionComparator());\n \n // save to file\n if(DictioFileOperations.saveListToFile(filename, allWordDefinitionList))\n {\n loadedDictionaryFilename = filename; // save new name in case user wants to save again\n JOptionPane.showMessageDialog(this, \"La list des mots a été \"\n + \"sauvegardé dans le fichier\\n\" + filename + \".\\n\\n\", \"INFORMATION\", \n JOptionPane.INFORMATION_MESSAGE);\n }\n\n else // if there was a problem saving the file\n JOptionPane.showMessageDialog(this, \"ERREUR: Impossible de \"\n + \"sauvegarder dans le fichier.\\n\\n\", \"ERREUR\", \n JOptionPane.ERROR_MESSAGE);\n }\n }", "@Override\n\tpublic void save() {\n\t\t\n\t\tFile savingDirectory = new File(savingFolder());\n\t\t\n\t\tif( !savingDirectory.isDirectory() ) {\n\t\t\tsavingDirectory.mkdirs();\n\t\t}\n\t\t\n\t\t\n\t\t//Create the file if it's necessary. The file is based on the name of the item. two items in the same directory shouldn't have the same name.\n\t\t\n\t\tFile savingFile = new File(savingDirectory, getIdentifier());\n\t\t\n\t\tif( !savingFile.exists() ) {\n\t\t\t\n\t\t\ttry {\n\t\t\t\tsavingFile.createNewFile();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"the following item couldn't be saved: \" + getIdentifier());\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t}\n\n\t\t\n\t\t//generate the savingTextLine and print it in the savingFile. the previous content is erased when the PrintWriter is created.\n\t\t\n\t\tString text = generateSavingTextLine();\n\n\t\ttry {\n\t\t\tPrintWriter printer = new PrintWriter(savingFile);\n\t\t\tprinter.write(text);\t\t\t\n\t\t\tprinter.close();\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tsave();\n\t\t} \n\t}", "void saveFile () {\r\n\r\n\t\ttry {\r\n\t\t\tFileOutputStream fos = new FileOutputStream (\"Bank.dat\", true);\r\n\t\t\tDataOutputStream dos = new DataOutputStream (fos);\r\n\t\t\tdos.writeUTF (saves[count][0]);\r\n\t\t\tdos.writeUTF (saves[count][1]);\r\n\t\t\tdos.writeUTF (saves[count][2]);\r\n\t\t\tdos.writeUTF (saves[count][3]);\r\n\t\t\tdos.writeUTF (saves[count][4]);\r\n\t\t\tdos.writeUTF (saves[count][5]);\r\n\t\t\tJOptionPane.showMessageDialog (this, \"The Record has been Saved Successfully\",\r\n\t\t\t\t\t\t\"BankSystem - Record Saved\", JOptionPane.PLAIN_MESSAGE);\r\n\t\t\ttxtClear ();\r\n\t\t\tdos.close();\r\n\t\t\tfos.close();\r\n\t\t}\r\n\t\tcatch (IOException ioe) {\r\n\t\t\tJOptionPane.showMessageDialog (this, \"There are Some Problem with File\",\r\n\t\t\t\t\t\t\"BankSystem - Problem\", JOptionPane.PLAIN_MESSAGE);\r\n\t\t}\r\n\r\n\t}" ]
[ "0.7466497", "0.7303484", "0.64381456", "0.6425712", "0.63505584", "0.6113318", "0.6107013", "0.6076471", "0.60455024", "0.60008025", "0.59457403", "0.5902409", "0.58240664", "0.57808673", "0.5725216", "0.5680151", "0.56738687", "0.5645665", "0.56391585", "0.5635468", "0.56041485", "0.55753917", "0.55489445", "0.5523403", "0.55167663", "0.5484316", "0.543968", "0.5436549", "0.5426838", "0.54233867", "0.5421133", "0.5415911", "0.54101765", "0.53997326", "0.5397143", "0.5380269", "0.5368877", "0.53654003", "0.5363603", "0.53472173", "0.53457326", "0.5322745", "0.5320465", "0.5319056", "0.5311353", "0.5304512", "0.52994215", "0.5281481", "0.527917", "0.52700156", "0.5265471", "0.5254365", "0.5240387", "0.5230355", "0.5225629", "0.52139837", "0.52093995", "0.5209357", "0.5202678", "0.520253", "0.52005327", "0.5195414", "0.5193742", "0.5193742", "0.5189778", "0.5189583", "0.51874036", "0.51800054", "0.517932", "0.5165994", "0.51591754", "0.51492", "0.514702", "0.5146213", "0.5145032", "0.51434684", "0.51432246", "0.5136103", "0.5129568", "0.5129346", "0.51249903", "0.5121995", "0.51116705", "0.5103906", "0.5103024", "0.5102874", "0.508838", "0.5087684", "0.5082972", "0.5079771", "0.5077708", "0.50602984", "0.50575495", "0.50546885", "0.5054168", "0.5052451", "0.50318116", "0.50300395", "0.5023179", "0.5021877" ]
0.6685364
2
saves the Document to file 'fileName' in directory 'directory'.
public void saveAs (String directory, String fileName) { this.directory = directory; this.fileName = fileName; save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void save(Directory directory) {\n\t\tUtils.FileUtils.write(\n\t\t\t\tdirectory.getDocuments(), \n\t\t\t\tGlobal.Constants.DIRECTORY_LOCATION \n\t\t\t\t+ Global.Variables.session.getCurrentUser().getName() \n\t\t\t\t+ \"$\" + directory.getName()\n\t\t\t\t);\n\t}", "public void save(String fileName) throws IOException;", "void save(String fileName);", "@Override\n\tpublic void saveDocument(String path, String name) {\n\t\t\n\t}", "public void save(String fileName)\r\n\t{\r\n\t\ttry {\r\n\t\t\tFileWriter fw = new FileWriter(fileName);\r\n\t\t\tsave(fw);\r\n\t\t} catch (Exception e) {\r\n\t\t\torg.apache.commons.logging.LogFactory.getLog(this.getClass()).error(e);\r\n\t\t}\r\n\t}", "public void saveIn (String directory) {\n\t\tthis.directory = directory;\n\t\tsave();\n\t}", "public void saveDocument() throws IOException;", "void save(String fileName) throws IOException, TransformerConfigurationException, ParserConfigurationException;", "public void saveCompanyDirectory(String fileName) {\r\n\t\ttry {\r\n\t\t\tCompanyRecordIO.writeCompanyRecords(fileName, companyDirectory);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new IllegalArgumentException(\"Unable to write to file \" + fileName);\r\n\t\t}\r\n\t}", "public void saveFile() {\r\n File savedFile = new File(fileName);\r\n\r\n try (FileWriter fw = new FileWriter(savedFile)) {\r\n fw.write(workSpace.getText());\r\n\r\n fw.close();\r\n } catch (IOException ex) {\r\n JOptionPane.showMessageDialog(null, \"There was an error saving the file\");\r\n }\r\n }", "void save(String filename);", "protected static void save(String fileName) {\n\t\tif (curMIDI != null) {\n\t\t\ttry {\n\t\t\t\tMidiSystem.write(curMIDI, 1, new File(fileName));\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"Could not save file\");\n\t\t\t}\n\t\t}\n\t}", "private void saveAs ()\n {\n\tJFileChooser chooser = new JFileChooser ();\n\tchooser.setFileSelectionMode (chooser.FILES_ONLY);\n\tint result = chooser.showSaveDialog (this);\n\tif (result == chooser.CANCEL_OPTION)\n\t{\n\t return;\n\t}\n\n\tFile f = chooser.getSelectedFile ();\n\tif (f.exists ())\n\t{\n\t try\n\t {\n\t\tresult = \n\t\t JOptionPane.showConfirmDialog (\n this,\n\t\t\t\"Overwrite existing file \\\"\" + f.getCanonicalPath () + \n\t\t\t\"\\\"?\",\n\t\t\t\"File Exists\",\n\t\t\tJOptionPane.YES_NO_OPTION);\n\n\t\tif (result != JOptionPane.YES_OPTION)\n\t\t{\n\t\t return;\n\t\t}\n\n\t\tf.delete ();\n\t }\n\t catch (IOException ex)\n\t {\n\t\tthrow new ShouldntHappenException (ex);\n\t }\n\t}\n\n\tString text;\n\tsynchronized (myDocument)\n\t{\n\t int len = myDocument.getLength ();\n\t try\n\t {\n\t\ttext = myDocument.getText (0, len);\n\t }\n\t catch (BadLocationException ex)\n\t {\n\t\tthrow new ShouldntHappenException (ex);\n\t }\n\t}\n\n\ttry\n\t{\n\t FileWriter fw = new FileWriter (f);\n\t fw.write (text);\n\t fw.flush ();\n\t fw.close ();\n\t}\n\tcatch (IOException ex)\n\t{\n\t JOptionPane.showMessageDialog (null,\n\t\t\t\t\t ex.getMessage (),\n\t\t\t\t\t \"Write Error\",\n\t\t\t\t\t JOptionPane.ERROR_MESSAGE);\n\t}\n }", "void save(File file);", "void saveToFile(String filename) throws IOException;", "void saveDocument(SingleDocumentModel model, Path newPath);", "public static void saveDocument( Document doc, String path ) {\n\t\ttry {\n\t\t\tFormat format = Format.getPrettyFormat();\n\t\t\tXMLOutputter fmt = new XMLOutputter( format );\n\t\t\tFile file = new File( path );\n\t\t\tOutputStream stream = new FileOutputStream( file );\n\t\t\tfmt.output( doc, stream );\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new RuntimeException( \"No se encontro el archivo: \" + path, e );\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException( \"Error al guardar el archivo: \" + path, e );\n\t\t}\n\t}", "private void save() throws FileNotFoundException {\n\t\tm.write(new FileOutputStream(OUTPUT), \"RDF/XML\");\n\t}", "public boolean save(String file);", "public static native boolean saveDocument(String doc, String toFile);", "public void save () {\n\t\tif (!open) {\n\t\t\tSystem.out.println (\"ExternalDocument.save: attempt to save unopened document \" + fileName);\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tif (format.equals(\"sgml\")) {\n\t\t\t\tString tagToWrite;\n\t\t\t\tif (allTags)\n\t\t\t\t\ttagToWrite = null;\n\t\t\t\telse if (SGMLtags.length == 0)\n\t\t\t\t\ttagToWrite = \"***\"; // unused annotation type\n\t\t\t\telse if (SGMLtags.length == 1)\n\t\t\t\t\ttagToWrite = SGMLtags[0];\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println (\"ExternalDocument.save: cannot write more than 1 annotation type\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tString string = writeSGML(tagToWrite).toString();\n\t\t\t\tFile file = new File(fullFileName());\n\t\t\t\tBufferedWriter writer = new BufferedWriter (\n\t\t\t\t\t\tnew OutputStreamWriter (new FileOutputStream(file), JetTest.encoding));\n\t\t\t\twriteWithSystemNewlines (writer, string);\n\t\t\t\twriter.close();\n\t\t\t} else {\n\t\t\t\t\tSystem.out.println (\"Error saving document \" + fileName);\n\t\t\t\t\tSystem.out.println (\"Unknown document format.\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println (\"Error opening document \" + fileName);\n\t\t\t\tSystem.out.println (e);\n\t\t}\n\t}", "public static void save(String text, String fileName) {\n //check the directory has been created\n File dir = new File(path);\n if(!dir.exists()){\n boolean success = dir.mkdir();\n if(! success){\n Log.e(\"walter's tag\", \"In Saver.java, setup() failed to create directory\");\n return;\n }\n }\n\n //save the text file in the directory\n File file = new File(path + \"/\" + fileName);\n Save(file, text);\n }", "public static void save() {\n Game.save(UI.askNgetString(\"Filename for this save file?\")+\".xml\");\n }", "public void saveUserDirectory(String fileName) {\n\t\ttry {\n\t\t\tUserRecordIO.writeUserRecords(fileName, users);\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalArgumentException(\"Unable to write to file \" + fileName);\n\t\t}\n\t}", "public void saveFacultyDirectory(String filename) {\r\n\t\ttry {\r\n\t\t\tFacultyRecordIO.writeFacultyRecords(filename, facultyDirectory);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new IllegalArgumentException(\"Unable to write to file \" + filename);\r\n\t\t}\r\n\t}", "public void save() {\n\t\tBufferedWriter bw = null;\n\t\tFileWriter fw = null;\n\t\ttry {\n\t\t\tFile file = new File(\"fileSave.txt\");\n\t\t\tif(!file.exists()) {\n\t\t\t\tfile.createNewFile();\n\t\t\t}\n\t\t\tfw = new FileWriter(file);\n\t\t\tbw = new BufferedWriter(fw);\n\t\t\t//string to hold text to write on new file\n\t\t\tString text = textArea.getText();\n\t\t\t//write file\n\t\t\tif (text != null) {\n\t\t\t\tbw.write(text);\n\t\t\t}\n\t\t}\n\t\tcatch (IOException ie) {\n\t\t\tie.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (bw != null) {\n\t\t\t\t\tbw.close();\n\t\t\t\t\tfw.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (IOException ie2) {\n\t\t\t\tie2.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void saveFile(String fileString, String filename) throws IOException {\n }", "public static void writeWord(XWPFDocument document, String fileName) throws IOException {\n\t\tFileOutputStream out = new FileOutputStream(new File(fileName));\n\t\tdocument.write(out);\n\t\tout.close();\n\t}", "public void writeToFile(String fileName, String xml) {\n\t\ttry {\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(fileName));\n\t\t\tbw.write(xml);\n\t\t\tbw.close();\n\t\t} catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void save(String filename) throws IOException\n {\n DataOutputStream output;\n\n try\n {\n output = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(new File(filename))));\n }\n catch (Exception e)\n {\n throw new IOException(\"Cannot open output file \" + filename + \":\" + e.getMessage());\n }\n save(output);\n output.flush();\n output.close();\n }", "public void saveFile(String name) throws CDFException, IOException,\n\t\t\t\t\t InterruptedException {\n\t// Update the hidden global attributes\n\n\t// Save the current variable if any\n\tvariablePanel.saveVariableChanges();\n\n\t// Make sure that the selectedVar is now a variable.\n\n\tif (name != null) {\n\t filename = name;\n\t theFile = new File(filename);\n\t if (name.toLowerCase().indexOf(\".cdf\") != -1) {\n\t rootfilename = name.substring(0, name.length() - 4);\n\t ext = name.toLowerCase().substring(name.length() - 4);\n\t } else {\n\t rootfilename = name;\n\t ext = \".cdf\";\n\t }\n\n\t // Set the title to display the filename\n\t getFrame().setTitle(\"MYEditor: \"+theFile.getName());\n\t}\n\n\t// commit changes to working file\n\ttheCDF.save();\n\tif (!rootfilename.equals(cdfspec)) \n\t copyFile(cdfspec+\".cdf\", rootfilename+\".cdf\"); \n\n\tsave.setEnabled(true);\n\n\tsaveAsOnClose = false;\n\n }", "void saveToFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile target = new File(directory, FILE_NAME);\n\t\t\tif (!target.exists()) {\n\t\t\t\ttarget.createNewFile();\n\t\t\t}\n\t\t\tJsonWriter writer = new JsonWriter(new FileWriter(target));\n\t\t\twriter.setIndent(\" \");\n\t\t\twriter.beginArray();\n\t\t\tfor (Scoreboard scoreboard : scoreboards.values()) {\n\t\t\t\twriteScoreboard(writer, scoreboard);\n\t\t\t}\n\t\t\twriter.endArray();\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}", "public void saveAs() {\n\t\tJFileChooser fc = new JFileChooser(\"./\");\n\t\tBufferedWriter bw = null;\n\t\tFileWriter fw = null;\n\t\tint returnValue = fc.showSaveDialog(contentPane);\n\t\t\n\t\tif(returnValue == JFileChooser.APPROVE_OPTION) {\n\t\t\ttry {\n\t\t\t\tString path = fc.getCurrentDirectory().getAbsolutePath();\n\t\t\t\tString name = fc.getSelectedFile().getName();\n\t\t\t\tif(!name.endsWith(\".txt\")) {\n\t\t\t\t\tname += \".txt\";\n\t\t\t\t}\n\t\t\t\tFile file = new File(path,name);\n\t\t\t\t\n\t\t\t\tfw = new FileWriter(file);\n\t\t\t\tbw = new BufferedWriter(fw);\n\t\t\t\t//string to hold each line to write on new file\n\t\t\t\tString text = textArea.getText();\n\t\t\t\t//write file\n\t\t\t\tif (text != null) {\n\t\t\t\t\tbw.write(text);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (IOException ie) {\n\t\t\t\tie.printStackTrace();\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\ttry {\n\t\t\t\t\tif (bw != null) {\n\t\t\t\t\t\tbw.close();\n\t\t\t\t\t\tfw.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (IOException ie2) {\n\t\t\t\t\tie2.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void saveChanges() throws TransformerException {\n\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\r\n\t\tTransformer transformer = transformerFactory.newTransformer();\r\n\t\tDOMSource source = new DOMSource(document);\r\n\t\tStreamResult result = new StreamResult(new File(path));\r\n\t\ttransformer.transform(source, result);\r\n\t}", "public void saveNewFile() {\n\t\tJFileChooser choose = new JFileChooser();\n\t\tif(choose.showSaveDialog(null) == JFileChooser.APPROVE_OPTION) {\n\t\ttry {\n\t\t\t\tdir=choose.getCurrentDirectory().toString();\n\t\t\t\tString fileName =dir+ \"\\\\\" + choose.getSelectedFile().getName();\n\t\t\t File file = new File(fileName);\n\t\t\t if(file.exists()) {\n\t\t\t \tint confirm = JOptionPane.showConfirmDialog(null, \n\t\t\t \t\t\t\"File already exists. Do you want to overwrite it?\",\n\t\t\t \t\t\t\"Choose one\",JOptionPane.YES_NO_OPTION);\n\t\t\t \tif(confirm == JOptionPane.NO_OPTION)return;\n\t\t\t }\n\t\t\t\tPrintWriter writer = new PrintWriter(file);\n\t\t\t\twriter.write(frame.textArea.getText());\n\t\t\t\twriter.close();\n\t\t\t\tframe.setTitle(choose.getSelectedFile().getName()+\"-Text Editor\");\n\t\t\t\tframe.originalText=frame.textArea.getText();\n\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void saveFile() {\n\t\tPrintWriter output = null;\n\t\ttry {\n\t\t\toutput = new PrintWriter(\"/Users/katejeon/Documents/Spring_2020/CPSC_35339/avengers_project/game_result.txt\");\n\t\t\toutput.println(textArea.getText());\n\t\t\toutput.flush();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"File doesn't exist.\");\n\t\t} finally {\n\t\t\toutput.close();\n\t\t}\n\t}", "private void saveFile() {\n if (fileExisted == false) {\n JFileChooser fChoice = new JFileChooser();\n int choice = fChoice.showSaveDialog(this);\n if (choice == JFileChooser.APPROVE_OPTION) {\n File f = fChoice.getSelectedFile();\n //\n if(!f.getName().contains(\".txt\")){\n File fN=new File(f.getParent(), f.getName()+\".txt\");\n FileDAO.writeFile(fN, txtContent);\n fMain = fN;\n fileExisted = true;\n lastSave=true;\n this.setTitle(fN.getName());\n }\n else{\n \n FileDAO.writeFile(f, txtContent);\n fMain = f;\n fileExisted = true;\n lastSave=true;\n this.setTitle(f.getName());\n } \n \n }\n } else if (fileExisted == true) {\n FileDAO.writeFile(fMain, txtContent);\n lastSave=true;\n }\n\n }", "private void xmlSave() {\r\n FileDialog fd = new FileDialog(new Frame(), \r\n \"Save as a jMusic XML file...\", \r\n FileDialog.SAVE);\r\n fd.show();\r\n if (fd.getFile() != null) {\r\n jm.util.Write.xml(score, fd.getDirectory() + fd.getFile());\r\n }\r\n }", "@FXML\n\tpublic void saveFile() {\n\t\tif (file == null) {\n\t\t\tFileChooser saveFileChooser = new FileChooser();\n\t\t\tsaveFileChooser.setInitialDirectory(userWorkspace);\n\t\t\tsaveFileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter(\"Text doc(*.txt)\", \"*.txt\"));\n\t\t\tfile = saveFileChooser.showSaveDialog(ap.getScene().getWindow());\n\t\t}\n\n\t\tif (file.getName().endsWith(\".txt\")) {\n\t\t\ttry {\n\t\t\t\tfilePath = file.getAbsolutePath();\n\t\t\t\tStage primStage = (Stage) ap.getScene().getWindow();\n\t\t\t\tprimStage.setTitle(filePath);\n\t\t\t\tTab tab = tabPane.getSelectionModel().getSelectedItem();\n\t\t\t\ttab.setId(filePath);\n\t\t\t\ttab.setText(file.getName());\n\n\t\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(file));\n\t\t\t\tPrintWriter output = new PrintWriter(writer);\n\t\t\t\toutput.write(userText.getText());\n\t\t\t\toutput.flush();\n\t\t\t\toutput.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(file.getName() + \" has no valid file-extenstion.\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "public void writeToEditorFile(String filePath, Document doc) {\n\n boolean success = true;\n try {\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n File file = new File(filePath);\n StreamResult result = new StreamResult(file);\n transformer.transform(source, result);\n\n } catch (TransformerException pce) {\n success = false;\n pce.printStackTrace();\n } finally {\n\n if (success) {\n FeedBackLogger.sendGoodMessage(\"File Saved Successfully!!!\");\n } else {\n FeedBackLogger.sendBadMessage(\"File Didn't Saved!!\");\n }\n\n }\n\n }", "public void saveAs() {\n editorManager.currentFileManager().saveAs();\n mimaUI.fileChanged();\n }", "public void saveFile(){\n\t\t// the files name\n\t\tString fileName = nameOfFile.getText();\n\t\tString folderName = saveTo.getText();\n\t\tString pattern = \"^[a-zA-Z0-9_]*$\";\n\t\tString seperator = System.getProperty(\"file.separator\");\n\t\t\t\t\t\n\t\t//checks if file name is valid\n\t\tif (!fileName.matches(pattern)){\n\t\t\tif (mf != null){\n\t\t\t\tmf.dispose();\n\t\t\t}\n\t\t\tmf = new MessageFrame(getX()+368,getY()-150,\"Error\", \"ERROR 7:\", \"Invalid Name!\");\n\t\t\tmf.setVisible(true);\n\t\t\treturn;\n\t\t}else if (fileName.equals(\"\")){\n\t\t\tif (mf != null){\n\t\t\t\tmf.dispose();\n\t\t\t}\n\t\t\tmf = new MessageFrame(getX()+368,getY()-150,\"Error\", \"ERROR 1:\", \"Please enter name for new file!\");\n\t\t\tmf.setVisible(true);\n\t\t\treturn;\n\t\t}\n\t\t// makes sure the file is a .mp3 file\n\t\tfileName = fileName + \".mp3\";\n\t\t\t\t\t\n\t\tif(!folderName.equals(\"\")){\n\t\t\tfileName = folderName + seperator + fileName;\n\t\t}\n\t\t// used to check if the file exists\n\t\t\t\t\t\n\t\tFile tmpFile = new File(fileName);\n\t\tFile tmpDir = new File(folderName);\n\t\t\t\t\t\n\t\t// checks if file already exists or file is a directory\n\t\tif (tmpFile.exists() && !tmpFile.isDirectory()){\n\t\t\tif(mf != null){\n\t\t\t\tmf.dispose();\n\t\t\t}\n\t\t\tMessageFrame mf = new MessageFrame(getX()+368,getY()-150,\"Error\", \"ERROR 3:\", \"File Already Exists!\");\n\t\t\tmf.setVisible(true);\n\t\t\treturn;\n\t\t}else if (!tmpDir.exists()){\n\t\t\tif(mf != null){\n\t\t\t\tmf.dispose();\n\t\t\t}\n\t\t\tMessageFrame mf = new MessageFrame(getX()+368,getY()-150,\"Error\", \"ERROR 4\", \"Folder does not Exists!\");\n\t\t\tmf.setVisible(true);\n\t\t\treturn;\n\t\t}\n\t\t\t\t\t\n\t\t// Creates the wave file the user requests\n\t\tSaveSpeech ss = new SaveSpeech(message, fileName,statuslbl,progressBar, voice, rate, pitchStart, pitchEnd);\n\t\tss.execute();\n\t\tthisFrame.dispose();\n\t}", "private void saveFile() {\n\t\ttry {\n\t\t\tFile file = jfc.getSelectedFile();\n\t\t\tint c = -1;\n\t\t\tif(file==null)\n\t\t\t{\n\t\t\t\tc = jfc.showSaveDialog(this);\n\t\t\t}\n\t\t\t\n\n\t\t\tif(file!= null || c ==0)\n\t\t\t{\t\n\t\t\t\tFileWriter fw = new FileWriter(jfc.getSelectedFile());\n\t\t\t\tfw.write(jta.getText());\n\t\t\t\tfw.close();\n\t\t\t\tSystem.out.println(\"파일을 저장하였습니다\");\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t\n\t\t} catch (Exception e2) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.out.println(e2.getMessage());\n\t\t}\n\t}", "public void save() {\n JAXB.marshal(this, new File(fileName));\n }", "void SaveBook(String fileName)\r\n\t\t{\r\n\t\t\tFile f = new File(fileName);\r\n\t\t\t\r\n\t\t\tFileWriter writer;\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\twriter = new FileWriter(f);\r\n\t\t\t\tfor(int i = 0; i < this.size(); i++)\r\n\t\t\t\t{\r\n\t\t\t\twriter.write(this.get(i).getContactName());\r\n\t\t\t\twriter.write(\",\");\r\n\t\t\t\twriter.write(Integer.toString(this.get(i).getContactNumber()));\r\n\t\t\t\twriter.write(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t\twriter.flush();\r\n\t\t\t\twriter.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "public void saveFile() {\t\n\t\tString fileloc = \"\";\n\t\tif(!prf.foldername.getText().equals(\"\"))\n\t\t\tfileloc += prf.foldername.getText()+\"/\";\n\t\tfileloc += ((MinLFile) tabbedPane.getSelectedComponent()).filename;;\t\t\n\t\tFile fl = new File(fileloc);\n\t\t\n\t\ttry {\n\t\t\tif(fl.exists()) {\n\t\t\t\tint option = JOptionPane.showConfirmDialog(null, \"The file with this name already exists, do you want to overwrite it?\", \"Save File\", JOptionPane.YES_NO_OPTION);\n\t\t\t\tif(option == 0) {\n\t\t\t\t\tFiles.delete(fl.toPath());\n\t\t\t\t\ttry {\n\t\t\t\t\t\t\n\t\t\t\t\t\tFileWriter fw = new FileWriter(fileloc);\n\t\t\t\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\t\t\t\tbw.write(((MinLFile) tabbedPane.getSelectedComponent()).CodeArea.getText());\n\t\t\t\t\t\tbw.close();\n\t\t\t\t\t\tfw.close();\n\t\t\t\t\t\t((MinLFile) tabbedPane.getSelectedComponent()).filechanged = false;\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\tFileWriter fw = new FileWriter(fileloc);\n\t\t\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\t\t\tbw.write(((MinLFile) tabbedPane.getSelectedComponent()).CodeArea.getText());\n\t\t\t\t\tbw.close();\n\t\t\t\t\tfw.close();\n\t\t\t\t\t((MinLFile) tabbedPane.getSelectedComponent()).filechanged = false;\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"The specified folder doesnt exist.\");\n\t\t\t\t\te1.printStackTrace();\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}", "public void save(String folderName, String fileName) {\n try {\n File directory = new File(BASE_FOLDER_NAME + File.separator + folderName);\n directory.mkdir();\n FileWriter writer = new FileWriter(BASE_FOLDER_NAME + File.separator + folderName\n + File.separator + fileName + FILE_EXTENSION);\n writer.write(width + \"\\n\");\n writer.write(height + \"\\n\");\n for (int j = 0; j < height; j++) {\n for (int i = 0; i < width; i++) {\n writer.write(SEPERATOR_SYMBOL);\n writer.write(entries[j][i]);\n }\n writer.write(\"\\n\");\n }\n writer.close();\n } catch (IOException e) {\n System.out.println(\"Oops, the file writer took in a directory for some reason!\");\n }\n }", "public void save(){\n\tif(currentFile == null){\n\t // TODO: add popup to select where to save file and file name\n\t // currentFile = new TextFile(os, title, null);\n\t}else{\n\t currentFile.setBody(textArea.getText());\n\t}\n }", "public static void saveDocument(String path, String textToWrite, Configuration c){\n File f = new File(path);\n Writer out = null;\n try{\n if(f.exists()){\n //JOptionPane.showMessageDialog(null, \"You have overwritten the previous file. This message should be better prepared.\");\n if(!c.getOverWriteAll()){\n String[] options = new String[] {\"Rewrite all\", \"Yes\", \"No\"};\n int response = JOptionPane.showOptionDialog(null, \"The file \"+f.getName()+\" already exists. Do you want to overwrite it?\", \"Existing File!\",JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE,null, options, options[0]);\n //0 -> yes to all. 1 -> Yes. 2-> No\n if(response == 0)c.setOverwriteAll(true); \n if(response == 2)return; //else we continue rewriting the file.\n }\n }\n else{\n f.createNewFile();\n }\n out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(f), \"UTF-8\"));\n out.write(textToWrite);\n out.close();\n }catch(IOException e){\n System.err.println(\"Error while creating the file \"+e.getMessage()+\"\\n\"+f.getAbsolutePath());\n } \n \n }", "public FileSaver(Path directory) {\n this.directory = directory;\n }", "public void save() {\n\t\tWriteFile data = new WriteFile( this.name + \".txt\" );\n\t\ttry {\n\t\t\t data.writeToFile(this.toString());\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(\"Couldn't print to file\");\n\t\t}\n\t}", "private void writeXmlFile( Document doc, String file_path ) {\r\n\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tTransformerFactory tf = TransformerFactory.newInstance();\r\n\t\t\tTransformer transformer = tf.newTransformer();\r\n\t\t\tDOMSource source \t\t= new DOMSource( doc );\r\n\t\t\tStreamResult result \t= new StreamResult( new File( file_path ));\r\n\t\t\t\r\n\t\t\t// Output to console for testing\r\n\t\t\t// StreamResult result = new StreamResult(System.out);\r\n\r\n\t\t\ttransformer.transform( source, result );\r\n\t\t\tSystem.out.println( \"File saved!\" );\r\n\r\n\r\n\t\t} catch ( TransformerException e ) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void save(final String name) {\r\n\t\tsave(new File(name));\r\n\t}", "public void Save(){\n\tJFileChooser j = new JFileChooser(\"\"); \n\t// Invoke the showsSaveDialog function to show the save dialog \n\tint r = j.showSaveDialog(null);\n \n\tif (r == JFileChooser.APPROVE_OPTION) { \n\n\t// Set the label to the path of the selected directory \n File fi = new File(j.getSelectedFile().getAbsolutePath()); \n\n try { \n\t\t// Create a file writer \n\t\tFileWriter wr = new FileWriter(fi, false); \n\n\t\t// Create buffered writer to write \n\t\tBufferedWriter w = new BufferedWriter(wr); \n\n\t\t// Write\n\t\tw.write(t.getText()); \n\n\t\tw.flush(); \n\t\tw.close(); \n } \n catch (Exception evt) { \n\t\tJOptionPane.showMessageDialog(f, evt.getMessage()); \n } \n\t} \n\t// If the user cancelled the operation \n\telse\n JOptionPane.showMessageDialog(f, \"the user cancelled the operation\"); \n\t\t\n }", "public void saveWorkflow(String filename);", "public void store (String fileName) throws IOException {\n\t\tBufferedWriter out = new BufferedWriter\n\t\t\t(new OutputStreamWriter\n\t\t\t (new FileOutputStream(fileName), JetTest.encoding));\n\t\tannotator.writeTagTable (out);\n\t\tout.write (\"endtags\");\n\t\tout.newLine ();\n\t\tmene.store (out);\n\t}", "public static void writeSave(String filepath, ISaveConfiguration scores) {\n try {\n Element root = Writer.buildDocumentWithRoot(DATA_TYPE);\n Document document = root.getOwnerDocument();\n\n addSaves(document, root, scores);\n\n Writer.writeOutput(document, filepath);\n } catch (TransformerException e) {\n throw new XMLException(e, Factory.UNKNOWN_ERROR);\n }\n }", "default void save(String file) {\n save(new File(file));\n }", "@Override\n\tpublic void domove(String filename) {\n\n\t\tFile starfile = new File(\"D://FileRec/\" + filename);\n\n\t\tFile endDirection = new File(\"D://FileRec//docx\");\n\t\tif (!endDirection.exists()) {\n\t\t\tendDirection.mkdirs();\n\t\t}\n\n\t\tFile endfile = new File(endDirection + File.separator + starfile.getName());\n\n\t\ttry {\n\t\t\tif (starfile.renameTo(endfile)) {\n\t\t\t\tSystem.out.println(\"转移成功\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"转移失败,或许是重名\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"文件移动出现异常\");\n\t\t}\n\t}", "public final void saveToFile() {\n\t\tWrite.midi(getScore(), getName()+\".mid\"); \n\t}", "void saveFile() {\n\t\tJFileChooser fileChooser = new JFileChooser(desktopPath);\n\t\tint returnVal = fileChooser.showSaveDialog(null);\n\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile filePath = fileChooser.getSelectedFile();\n\t\t\ttry {\n\t\t\t\tPrintWriter writer = new PrintWriter(filePath);\n\t\t\t\tScanner out = new Scanner(textEditor.getText());\n\t\t\t\twhile(out.hasNextLine()) {\n\t\t\t\t\twriter.println(out.nextLine());\n\t\t\t\t}\n\t\t\t\tout.close();\n\t\t\t\twriter.close();\n\t\t\t\ttextAreaChanged =false;\n\t\t\t\tsavedFilePath = filePath.getPath();\n\t\t\t\terrorTextArea.setText(\"\");\n\t\t\t} catch (Exception ex) {\n\t\t\t\terrorTextArea.setForeground(Color.RED);\n\t\t\t\terrorTextArea.setText(\"Error saving file\");\n\t\t\t}\n\t\t}\n\t}", "public void save() {\n Path root = Paths.get(storagePath);\n try {\n Files.copy(file.getInputStream(), root.resolve(file.getOriginalFilename()),\n StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void saveToFile()\n\t{\t\n\t\tsetCourseToFileString(courseToFileString);\n\t\t\ttry \n\t {\n\t FileWriter fw = new FileWriter(fileName);\n\t fw.write (this.getCourseToFileString ( ));\n\t for(Student b : this.getStudents ( ))\t \t\n\t \tfw.write(b.toFileString ( ));\n\t \tfw.close ( );\n\t } \n\t catch (Exception ex) \n\t {\n\t ex.printStackTrace();\n\t }\n\t\t\tthis.saveNeed = false;\n\n\t}", "public void save(File file) {\n //new FileSystem().saveFile(addressBook, file);\n }", "void saveAs() {\n writeFile.Export();\n }", "public void save(String savePath) throws IOException {\n try (FileWriter fw = new FileWriter(savePath)) {\n fw.write(reportDoc.toString());\n }\n }", "public void save() throws FileNotFoundException, IOException, ClassNotFoundException ;", "public void saveGame(File fileLocation);", "@Override\n\tpublic void save() {\n\t\t\n\t\tFile savingDirectory = new File(savingFolder());\n\t\t\n\t\tif( !savingDirectory.isDirectory() ) {\n\t\t\tsavingDirectory.mkdirs();\n\t\t}\n\t\t\n\t\t\n\t\t//Create the file if it's necessary. The file is based on the name of the item. two items in the same directory shouldn't have the same name.\n\t\t\n\t\tFile savingFile = new File(savingDirectory, getIdentifier());\n\t\t\n\t\tif( !savingFile.exists() ) {\n\t\t\t\n\t\t\ttry {\n\t\t\t\tsavingFile.createNewFile();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"the following item couldn't be saved: \" + getIdentifier());\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t}\n\n\t\t\n\t\t//generate the savingTextLine and print it in the savingFile. the previous content is erased when the PrintWriter is created.\n\t\t\n\t\tString text = generateSavingTextLine();\n\n\t\ttry {\n\t\t\tPrintWriter printer = new PrintWriter(savingFile);\n\t\t\tprinter.write(text);\t\t\t\n\t\t\tprinter.close();\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tsave();\n\t\t} \n\t}", "void save(XMLDocument document, XMLStreamWriter writer) throws XMLStreamException;", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tsaveFile();\n\t\t\t}", "boolean saveDocument(String path, String documentContent, Charset charset, List <String> moduleList);", "public void saveFile(){\n returnValue = this.showSaveDialog(null);\n if (returnValue == JFileChooser.APPROVE_OPTION) {\n new CustomerFileWriter(new File(this.getSelectedFile().getAbsolutePath())).saveCustomer(Bank.customer);\n }\n }", "public void saveNewFile() {\r\n JFileChooser fileChooser = new JFileChooser();\r\n\r\n int status = fileChooser.showSaveDialog(null);\r\n\r\n if (status == JFileChooser.APPROVE_OPTION) {\r\n\r\n fileName = fileChooser.getSelectedFile().toString();\r\n\r\n saveFile();\r\n }\r\n }", "private void savePressed(){\n\t\t\n\t\tJFileChooser fileChooser = new JFileChooser(System.getProperty(\"user.dir\"));\n\t\tFileNameExtensionFilter extentions = new FileNameExtensionFilter(\"SuperCalcSave\", \"scalcsave\");\n\t\tfileChooser.setFileFilter(extentions);\n\t\tint retunedVal = fileChooser.showSaveDialog(this);\n\t\tFile file = null;\n\t\tif(retunedVal == JFileChooser.APPROVE_OPTION){\n\t\t\tfile = fileChooser.getSelectedFile();\n\t\t\t//make sure file has the right extention\n\t\t\tif(file.getAbsolutePath().contains(\".scalcsave\"))\n\t\t\t\tfile = new File(file.getAbsolutePath());\n\t\t\telse\n\t\t\t\tfile = new File(file.getAbsolutePath()+\".scalcsave\");\n\t\t}\n\t\t//only continue if a file is selected\n\t\tif(file != null){\t\n\t\t\ttry {\n\t\t\t\t//read in file\n\t\t\t\tObjectOutputStream output = new ObjectOutputStream(new FileOutputStream(file));\n\t\t\t\toutput.writeObject(SaveFile.getSaveFile());\n\t\t\t\toutput.close();\n\t\t\t\tSystem.out.println(\"Save Success\");\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public void write() throws IOException {\n\t\tfinal String timeLog = LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd_HH-mm-ss\"));\n\t\tfinal File file = new File(\"wordsaurier-document-\" + timeLog + \".txt\");\n\t\t\n\n\t\ttry (OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8)) {\n\t\t\t\n\n\t\t\t\n\t\t\twriter.write(\"Wordsaurier document\\r\\n\");\n\t\t\twriter.write(this.documentSpecification.toString() + \"\\r\\n\");\n\t\t\twriter.write(\"---------------------\\r\\n\");\n\t\t\twriter.write(this.document.getContent());\n\t\t\tLOG.info(\"document was written to {}\", file.getCanonicalPath());\n\t\t\t\n\t\t} catch (final IOException e) {\n\t\t\tthrow e;\n\t\t}\n\t}", "public void saveDatabase() {\r\n\t\ttry {\r\n\t\t\tFile databaseDirectory = new File (System.getProperty(\"user.home\")\r\n\t\t\t\t\t+ File.separator + \"Documents\" + File.separator + \"DatabaseUniverse\"\r\n\t\t\t\t\t+ File.separator + name);\r\n\t\t\tdatabaseDirectory.mkdirs();\r\n\t\t\tFile[] files = databaseDirectory.listFiles();\r\n\t\t\tSystem.gc();\r\n\t\t\tfor (File file : files) {\r\n\t\t\t\tFiles.delete(file.toPath());\r\n\t\t\t}\r\n\t\t\tfor (Table table : tables) {\r\n\t\t\t\ttable.saveTable(databaseDirectory.getPath());\r\n\t\t\t}\r\n\t\t} catch (SecurityException e) {\r\n\t\t\tSystem.out.println(\"Access Denied in Documents folder. Please check your security settings\"\r\n\t\t\t\t\t+ \"to enable file saving\");\r\n\t\t} catch (NullPointerException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\tSystem.err.print(e);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(e);\r\n\t\t}\r\n\t}", "public void saveEPILine(String directory)\r\n\t{\r\n\t\tsaveEPILine(new File(directory));\r\n\t}", "public void saveTree(String filename) {\r\n\t\ttry { // Try saving tree\r\n\t\t\tsaveTree(new File(filename));\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// Exit if there is an exception\r\n\t\t\tSystem.err.println(\"Could not save to file: \" + filename);\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t}", "public void saveNewRollManager()\n\t{\n\t JFileChooser chooser = new JFileChooser(); //allows the user to choose a file\n\t chooser.setCurrentDirectory(new File(\"/home/me/Documents\"));\t//sets the directory of where to find the file\n\t int retrival = chooser.showSaveDialog(null);\n\t if (retrival == JFileChooser.APPROVE_OPTION) {\n\t try \n\t {\n\t FileWriter fw = new FileWriter(chooser.getSelectedFile()+\".txt\");\n\t fw.write (getCourseToFileString ( ));\n\t for(Student b : getStudents ( ))\t \t\n\t \tfw.write(b.toFileString ( ));\n\t \tfw.close ( );\n\t \t;\n\t } \n\t catch (Exception ex) \n\t {\n\t ex.printStackTrace();\n\t }\n\t\t\tthis.saveNeed = false;\n\n\t }\n\t \n\t}", "void saveFile () {\r\n\r\n\t\ttry {\r\n\t\t\tFileOutputStream fos = new FileOutputStream (\"Bank.dat\", true);\r\n\t\t\tDataOutputStream dos = new DataOutputStream (fos);\r\n\t\t\tdos.writeUTF (saves[count][0]);\r\n\t\t\tdos.writeUTF (saves[count][1]);\r\n\t\t\tdos.writeUTF (saves[count][2]);\r\n\t\t\tdos.writeUTF (saves[count][3]);\r\n\t\t\tdos.writeUTF (saves[count][4]);\r\n\t\t\tdos.writeUTF (saves[count][5]);\r\n\t\t\tJOptionPane.showMessageDialog (this, \"The Record has been Saved Successfully\",\r\n\t\t\t\t\t\t\"BankSystem - Record Saved\", JOptionPane.PLAIN_MESSAGE);\r\n\t\t\ttxtClear ();\r\n\t\t\tdos.close();\r\n\t\t\tfos.close();\r\n\t\t}\r\n\t\tcatch (IOException ioe) {\r\n\t\t\tJOptionPane.showMessageDialog (this, \"There are Some Problem with File\",\r\n\t\t\t\t\t\t\"BankSystem - Problem\", JOptionPane.PLAIN_MESSAGE);\r\n\t\t}\r\n\r\n\t}", "public void saveArchive() throws FileNotFoundException {\n jsonWriter.open();\n Archive archive = new Archive(cameraCollection, filmCollection);\n jsonWriter.write(archive);\n jsonWriter.close();\n }", "public void save()\r\n {\r\n \tfc=new JFileChooser();\r\n\t fc.setCurrentDirectory(new File(\"\"));\r\n\t if(fc.showSaveDialog(this)==JFileChooser.APPROVE_OPTION)\r\n\t \t//Try-Catch Block\r\n\t try\r\n\t {\r\n\t pw=new PrintWriter(new FileWriter(fc.getSelectedFile()+\".txt\")); //Print to the user-selected file\r\n\t\t \tfor(Organism o: e.getTree()) //IN PROGESS\r\n\t\t \t{\r\n\t\t\t\t\tint[] genes=o.getGenes(); //Getting genes from \r\n\t\t\t\t\tfor(int i=0; i<genes.length; i++)\r\n\t\t\t\t\t\tpw.print(genes[i]+\" \"); //Print each gene value in a line\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tpw.println(); //Starts printing on a new line\r\n\t\t\t\t}\r\n\t\t\t\tpw.close(); //Closes the File\r\n\t }\r\n\t catch (Exception ex) //Catch Any Exception\r\n\t {\r\n\t ex.printStackTrace();\r\n\t }\r\n }", "public void fileSaved(OpenDefinitionsDocument doc) { }", "public void fileSaved(OpenDefinitionsDocument doc) { }", "@Override\n public void whenDone() {\n getDocumentController().setFile(fileToSaveTo);\n getDocumentController().setHasChanged(false);\n getDocumentController().notifyChange();\n }", "public abstract boolean processSaveDocument(Document document);", "@Override\n\tpublic void save(String file_name) {\n\t\tserialize(file_name);\n\t}", "public void onSaveButtonClick(ActionEvent e){\n\t\tsaveFile(false);\n\t}", "public static void writeFile(String fileName, String destinationFolder,\n\t\t\tString fileContents) {\n\t\tPrintWriter writer = null;\n\t\ttry {\n\t\t\ttry {\n\t\t\t\tFile destinationFolderStructure = new File(destinationFolder);\n\t\t\t\tif (!destinationFolderStructure.exists())\n\t\t\t\t\tFileUtils.forceMkdir(destinationFolderStructure);\n\t\t\t\twriter = new PrintWriter(destinationFolder + File.separator\n\t\t\t\t\t\t+ fileName, \"UTF-8\");\n\t\t\t\twriter.print(fileContents);\n\t\t\t} catch (IOException e) {\n\t\t\t\tSimpleLogger\n\t\t\t\t\t\t.error(\"Error while saving file: \" + e.getMessage());\n\t\t\t}\n\t\t} finally {\n\t\t\tif (writer != null)\n\t\t\t\twriter.close();\n\t\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 }", "private void saveAs() {\n\t\tFileChooser fileChooser = new FileChooser();\n\n\t\t// Set extension filter\n\t\tFileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter(\n\t\t\t\t\"XML files (*.xml)\", \"*.xml\");\n\t\tfileChooser.getExtensionFilters().add(extFilter);\n\n\t\t// Show save file dialog\n\t\tFile file = fileChooser.showSaveDialog(mainApp.getPrimaryStage());\n\n\t\tif (file != null) {\n\t\t\t// Make sure it has the correct extension\n\t\t\tif (!file.getPath().endsWith(\".xml\")) {\n\t\t\t\tfile = new File(file.getPath() + \".xml\");\n\t\t\t}\n\t\t\tmainApp.saveFilmDataToFile(file);\n\t\t}\n\t}", "private void saveFile() {\r\n\t\tJFileChooser fileChooser = new JFileChooser();\r\n\t\tFileFilter wavFilter = new FileFilter() {\r\n\t\t\t@Override\r\n\t\t\tpublic String getDescription() {\r\n\t\t\t\treturn \"Sound file (*.WAV)\";\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic boolean accept(File file) {\r\n\t\t\t\tif (file.isDirectory()) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn file.getName().toLowerCase().endsWith(\".wav\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfileChooser.setFileFilter(wavFilter);\r\n\t\tfileChooser.setAcceptAllFileFilterUsed(false);\r\n\r\n\t\tint userChoice = fileChooser.showSaveDialog(this);\r\n\t\tif (userChoice == JFileChooser.APPROVE_OPTION) {\r\n\t\t\tsaveFilePath = fileChooser.getSelectedFile().getAbsolutePath();\r\n\t\t\tif (!saveFilePath.toLowerCase().endsWith(\".wav\")) {\r\n\t\t\t\tsaveFilePath += \".wav\";\r\n\t\t\t}\r\n\r\n\t\t\tFile wavFile = new File(saveFilePath);\r\n\r\n\t\t\ttry {\r\n\t\t\t\trecorder.save(wavFile);\r\n\r\n\t\t\t\tJOptionPane.showMessageDialog(SwingSoundRecorder.this,\r\n\t\t\t\t\t\t\"Saved recorded sound to:\\n\" + saveFilePath);\r\n\r\n\t\t\t\tbuttonPlay.setEnabled(true);\r\n\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tJOptionPane.showMessageDialog(SwingSoundRecorder.this, \"Error\",\r\n\t\t\t\t\t\t\"Error saving to sound file!\",\r\n\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void saveDocumentAs( final URL url ) {\n\t\ttry {\n\t\t\tSystem.out.println( \"Saving to: \" + url );\n\t\t\tif ( _optics.save( this ) ) {\n\t\t\t\tsetHasChanges( false );\n\t\t\t\t// to do: really should make a logbook entry about this\n\t\t\t}\n\t\t\telse {\n\t\t\t\tJOptionPane.showMessageDialog( getMainWindow(), \"The save operation was cancelled.\", \"Save Cancelled\" , JOptionPane.WARNING_MESSAGE );\n\t\t\t}\n\t\t}\n\t\tcatch( Exception exception ) {\n\t\t\tdisplayError( \"Save Failed\", \"Exception while attempting to save changes\", exception );\n\t\t}\n\t}", "public void save() {\n\t\tlog.log(\"Attempting to save...\");\n\t\tPath spath = Paths.get(getFullSavePath());\n\t\tPath cpath = Paths.get(getFullSavePath() + \"units/\");\n\t\ttry {\n\t\t\tif(!Files.exists(spath))\n\t\t\t\tFiles.createDirectory(spath);\n\t\t\tif(!Files.exists(cpath))\n\t\t\t\tFiles.createDirectory(cpath);\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tlog.log(\"Save failed.\");\n\t\t\treturn;\n\t\t}\n\n\t\tFile[] files = new File(cpath.toString()).listFiles();\n\t\tfor(File f : files) {\n\t\t\tf.delete();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tBufferedWriter mfestWriter = new BufferedWriter(new FileWriter(getFullSavePath() + \"progress.txt\"));\n\t\t\tmfestWriter.write(name);\n\t\t\tmfestWriter.close();\n\t\t\tfor(MapCharacter mc : getFriendlies()) {\n\t\t\t\tBufferedWriter charWriter = new BufferedWriter(new FileWriter(getFullSavePath() + \"units/\"\n\t\t\t\t\t\t+ mc.getEnclosed().getDirName()));\n\t\t\t\tcharWriter.write(mc.getEnclosed().save());\n\t\t\t\tcharWriter.close();\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tlog.log(\"Save failed.\");\n\t\t\treturn;\n\t\t}\n\t\tlog.log(\"Game saved.\");\n\t}", "public void saveRecordedFile() {\n\t\tFileChooser fileChooser = new FileChooser();\n\t\tExtensionFilter filter = new ExtensionFilter(\"WAV files (*.wav)\", \".wav\");\n\t\tfileChooser.getExtensionFilters().add(filter);\n\t\tFile file = fileChooser.showSaveDialog(mainContainer.getScene().getWindow());\n\t\tString fullPath;\n\t\ttry {\n\t\t\tfullPath = file.getAbsolutePath();\n\t\t\tif (!fullPath.endsWith(\".wav\")) {\n\t\t\t\tfullPath = fullPath + \".wav\";\n\t\t\t}\n\t\t\tcontroller.saveAudioFile(fullPath);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void saveXmlTree(String fileName) {\n try {\n String tree = this.client.driver.getPageSource();\n PrintWriter out = new PrintWriter(this.settings.baseLogDir + File.separator + fileName);\n out.println(tree);\n out.close();\n } catch (Exception e) {\n this.error(\"Failed to get and save current visual tree.\");\n }\n }", "public boolean save() {\n\t\treturn save(_file);\n\t}", "public void saveAsFile(String path)\n {\n call(\"SaveAsFile\", path);\n }", "private void saveFile(File file){\r\n\t\ttry {\r\n\t\t\tlocal.saveFile(file);\r\n\t\t\topenFile = file;\r\n\t\t\tpopulateRecentMenu();\r\n\t\t\tframe.setTitle(openFile.getName());\r\n\t\t\tedit = false;\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}" ]
[ "0.6978136", "0.64132714", "0.63494825", "0.6309204", "0.6260036", "0.6225841", "0.6180804", "0.61547333", "0.6134192", "0.60622287", "0.5986781", "0.58972377", "0.58246547", "0.5762408", "0.57607466", "0.5750357", "0.5656457", "0.5647763", "0.56367683", "0.5622777", "0.560422", "0.5599425", "0.5565816", "0.55537164", "0.5532728", "0.5517334", "0.55104023", "0.5494823", "0.5488317", "0.54763246", "0.54588276", "0.5415435", "0.54031056", "0.53979874", "0.53808933", "0.5375244", "0.5362346", "0.5355801", "0.5348161", "0.534392", "0.53305405", "0.53274167", "0.5302419", "0.5300484", "0.5290817", "0.5283326", "0.52788734", "0.5269807", "0.5269756", "0.5263126", "0.5262487", "0.5249715", "0.5245999", "0.52456874", "0.52306813", "0.5218333", "0.52071565", "0.5206954", "0.52059686", "0.52043325", "0.5201647", "0.5201415", "0.51966125", "0.5185429", "0.51833177", "0.5175482", "0.5171909", "0.5158378", "0.5157808", "0.5143588", "0.5141053", "0.5129917", "0.5127663", "0.5125703", "0.5108986", "0.51079875", "0.51065373", "0.50886744", "0.5085044", "0.50658834", "0.5054065", "0.50530875", "0.50497437", "0.50485504", "0.50485504", "0.504548", "0.50384384", "0.50358", "0.50349", "0.502323", "0.50161713", "0.50132346", "0.50128543", "0.50032", "0.49942327", "0.49932477", "0.49924704", "0.4992461", "0.4988802", "0.49781334" ]
0.72875905
0
returns 'true' if the file has been opened.
public boolean isOpen () { return open; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isFileOpened() {\r\n \t\tif (curFile == null)\r\n \t\t\treturn false;\r\n \t\telse\r\n \t\t\treturn true;\r\n \t}", "public boolean open() {\n try {\n fileStream = new FileReader( this.fileName );\n scanner = new Scanner( fileStream );\n this.found = true;\n } catch ( FileNotFoundException error ) {\n this.found = false;\n System.out.println(error.toString());\n }\n\n return this.found;\n }", "public synchronized boolean isOpen() {\n return randomAccessFile != null;\n }", "boolean isOpened() throws Exception;", "public boolean isOpen()\r\n\t{\r\n\t return (fd != null);\r\n\t}", "public boolean isOpened() {\r\n return opened != null;\r\n }", "public boolean isOpened()\n {\n \n boolean retVal = isOpened_0(nativeObj);\n \n return retVal;\n }", "private boolean open() {\r\n\t\tfor ( int i = 0; i < _headerObject._filenames.length; ++i) {\r\n\t\t\tFileObject fileObject = ( FileObject)_headerObject._fileObjectMap.get( _headerObject._filenames[ i]);\r\n\t\t\tif ( null == fileObject)\r\n\t\t\t\treturn false;\r\n\r\n\t\t\tif ( !fileObject.open())\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "boolean isOpened();", "@Override\n\tpublic boolean isFileOpen(String fileName) \n\t{\n\t\treturn false;\n\t}", "public boolean isOpened() {\n return opened;\n }", "@Override\n public boolean isopen( )\n {\n return logfile != null && out != null;\n }", "public boolean isOpened() {\n return opened;\n }", "public boolean fileIsReady()\n\t{\n\t\ttry\n\t\t{\n\t\t\tif(notFound)\n\t\t\t{\n\t\t\t\tisReady = false;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tisReady = reader.ready();\n\t\t\t}\n\t\t\t\n\t\t} catch (IOException ioe)\n\t\t{\n\t\t\t//\n\t\t}\n\n\t\treturn isReady;\n\t}", "public boolean exists() {\n try {\n return open() != null;\n } catch (IOException e) {\n return false;\n }\n }", "public boolean isOpened() {\n\t\treturn mCurrentState == STATE.OPENED;\n\t}", "public boolean isOpened() {\r\n\t\treturn this.opened;\r\n\t}", "private boolean canRead() {\n\t\treturn fileStatus;\n\t}", "public boolean hasLoadedFile() {\n return isSuccessfulFileLoad;\n }", "boolean hasCompleteFile();", "public boolean open() {\n\t\treturn open(false);\n\t}", "public boolean fExists(){\n \n try(ObjectInputStream ois = new ObjectInputStream(new FileInputStream(file))){\n \n }\n catch (FileNotFoundException e){\n System.out.println(\"File not found\");\n return false;\n }\n catch (IOException e){\n System.out.println(\"Another exception\");\n return false;\n }\n\n return true;\n }", "public boolean getOpen()\n\t{\n\t\treturn getBooleanIOValue(\"Open\", true);\n\t}", "boolean isFileEnded();", "public boolean exists() {\n return _file.exists();\n }", "public synchronized boolean isReadingFromFile(){\n\t\treturn isReadingFromFile;\n\t}", "public boolean isOpened() {\n return false;\n }", "public boolean close() {\n boolean operation = false;\n try {\n fileStream.close();\n operation = true;\n } catch ( Exception error ) {\n System.out.println(error.toString());\n }\n return operation;\n }", "public boolean fileFound(){\n\n try{\n\n m_CSVReader = new CSVReader(new FileReader(m_FileName));\n\n } catch (FileNotFoundException e){\n\n System.out.println(\"Input file not found.\");\n\n return false;\n }\n return true;\n }", "public final boolean isAlive() {\n\t\tboolean isAlive = (new File(getFileNamePath())).isFile();\n\n\t\tif (isAlive) {\n\t\t\ttry (Socket socket = new Socket()) {\n\t\t\t\t// this will throw an exception if the socket is in use/unavailable.\n\t\t\t\tsocket.bind(\n\t\t\t\t\t\tnew InetSocketAddress(InetAddress.getLoopbackAddress().getHostAddress(), getPublisherPort()));\n\t\t\t\tisAlive = false;\n\t\t\t} catch (IOException e) {\n\t\t\t\tisAlive = true;\n\t\t\t} catch (Exception e) {\n\t\t\t\tif (SystemUtils.isInDebugMode()) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!isAlive) {\n\t\t\t// we should try to delete the file; this may be left over from a crashed\n\t\t\t// process..\n\t\t\tFileUtils.safeDeleteFile(getFileNamePath());\n\t\t}\n\n\t\treturn isAlive;\n\t}", "boolean open();", "public boolean open(String filename)\n {\n \n boolean retVal = open_0(nativeObj, filename);\n \n return retVal;\n }", "public boolean closeFile() \r\n\t{\r\n\t\tboolean result = true;\r\n\t\t// Close the input file\r\n\t\ttry \r\n\t\t{\r\n\t\t\tinFile.close();\r\n\t\t} // try\r\n\t\tcatch (Exception Error) \r\n\t\t{\r\n\t\t\tresult = false;\r\n\t\t} // catch\r\n\r\n\t\treturn (result);\r\n\t}", "public boolean exists() {\r\n\t\t// Try file existence: can we find the file in the file system?\r\n\t\ttry {\r\n\t\t\treturn getFile().exists();\r\n\t\t}\r\n\t\tcatch (IOException ex) {\r\n\t\t\t// Fall back to stream existence: can we open the stream?\r\n\t\t\ttry {\r\n\t\t\t\tInputStream is = getInputStream();\r\n\t\t\t\tis.close();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tcatch (Throwable isEx) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean isProjectOpen() {\n\t\treturn (projectFileIO != null);\n\t}", "public boolean hasFileAttached()\n throws OculusException;", "public boolean open() {\n\n return true;\n }", "private boolean isOpened() {\n if (mIpcChannel != null && mIpcChannel.isOpened()) {\n return true;\n }\n\n return false;\n }", "public boolean isSetFile() {\n return this.File != null;\n }", "public boolean isOpen() {\n return myOpen.get();\n }", "public boolean isOpened() {\n\t\treturn windowOpened;\n\t}", "boolean open() {\n if (handle != 0) {\n throw new InternalError(\"Native library \" + name + \" has been loaded\");\n }\n return load0(this, name);\n }", "public boolean isOpen() {\r\n\t\treturn open;\r\n\t}", "public boolean isOpen() {\n\t\treturn open;\n\t}", "boolean hasFileLocation();", "public final boolean fileExists() {\n\t if ( m_fileStatus == FileStatus.FileExists || m_fileStatus == FileStatus.DirectoryExists)\n\t return true;\n\t return false;\n\t}", "public boolean isOpen() {\n if (this.open) {\n return false;\n } else {\n return true;\n }\n }", "protected boolean connectionOpened() {\n\t\treturn connectionOpened;\n\t}", "boolean hasFileLoc();", "public boolean isOpen() {\n\treturn open;\n }", "public boolean open()\n {\n this.fileChooser.setFileFilter(this.fileFilterASM);\n final File file = this.fileChooser.showOpenFile();\n\n if(file == null)\n {\n return false;\n }\n\n return this.openFile(file);\n }", "public boolean isOpen() {\n\t\t\n\t\t//If network is open\n\t\tif (this.open) {\n\t\t\t\n\t\t\treturn true;\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\treturn false;\n\t\t\t\n\t\t}\n\t}", "boolean hasFilePath();", "boolean hasInodeFile();", "public boolean hasCompleteFile() {\n return ((bitField0_ & 0x00000020) == 0x00000020);\n }", "public boolean hasCompleteFile() {\n return ((bitField0_ & 0x00000020) == 0x00000020);\n }", "boolean hasReinitializeFile();", "public boolean isOpen() {\n\t\treturn luaState != 0;\n\t}", "public boolean open() {\n\t\tif (RTS_COMMON.Option.VERBOSE)\n\t\t\tTRACE_OPEN(\"open Outbytefile\");\n\t\tif (_OPEN)\n\t\t\treturn (false);\n\t\tFile file = doCreateAction();\n\t\ttry {\n\t\t\toutputStream = new FileOutputStream(file, _APPEND);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tif (RTS_COMMON.Option.VERBOSE)\n\t\t\t\te.printStackTrace();\n\t\t\treturn (false);\n\t\t}\n\t\t_OPEN = true;\n\t\t_BYTESIZE = _DEFAULT_BYTESIZE;\n\t\treturn (true);\n\t}", "public boolean isOpened(){\n return chestProgressLevel==1;\n }", "public boolean isSignWasOpened() {\n return signWasOpened;\n }", "public boolean execute() {\n\t\tboolean result = false;\n\t\t\n\t\tif (this.exists()) {\n\t\t\ttry {\n\t\t\t\tDesktop.getDesktop().open(this);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tresult = true;\n\t\t} else {\n\t\t\tSystem.out.println(\"file not found: \" + this.getAbsolutePath());\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public final boolean atEndOfFile() {\n\t\treturn (m_flags & EndOfFile) != 0 ? true : false;\n\t}", "public boolean open() {\n\t\tif (!open) {\n\t\t\ttry {\n\t\t\t\tif (format.equals(\"sgml\")) {\n\t\t\t\t\tFile file = new File(fullFileName());\t//return the full file name,including directory and filename\n\t\t\t\t\tString line;\n\t\t\t\t\tBufferedReader reader = new BufferedReader (\n\t\t\t\t\t\t// (new FileReader(file));\n\t\t\t\t\t\tnew InputStreamReader (new FileInputStream(file), JetTest.encoding));\n\t\t\t\t\tStringBuffer fileText = new StringBuffer();\t\t//store all text in filename\n\t\t\t\t\twhile((line = reader.readLine()) != null)\n\t\t\t\t\t\tfileText.append(line + \"\\n\");\n\t\t\t\t\tString text = fileText.toString(); //Store the converted text\n\t\t\t\t\tSGMLProcessor.allTags = allTags;\t\n\t\t\t\t\tSGMLProcessor.emptyTags = emptyTags;\n\t\t\t\t\tDocument doc = SGMLProcessor.sgmlToDoc (this, text, SGMLtags);\t//Because format.equals(\"sgml\")\n\t\t\t\t\topen = true;\n\t\t\t\t\treturn true;\n\t\t\t\t} else if (format.equals(\"pos\")) {\n\t\t\t\t\tposRead();\n\t\t\t\t\topen = true;\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println (\"Error opening document \" + fileName);\n\t\t\t\t\tSystem.out.println (\"Unknown document format.\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\t\tSystem.out.println (\"Error opening document \" + fileName);\n\t\t\t\t\tSystem.out.println (e);\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\t// return true if already open\n\t\t\treturn true;\n\t\t}\n\t}", "public boolean isActive() \r\n\t //@ requires [?f]File(?fid, ?state, ?info);\r\n\t //@ ensures [f]File(fid, state, info) &*& result == state;\r\n\t{\r\n\t\t////@ open [f]File(fid, _, info); // auto\r\n\t\t////@ open [f]ElementaryFile(fid, _, _, _, _, ?info2); // auto\r\n\t\tboolean b = super.isActive();\r\n\t\t////@ close [f]ElementaryFile(fid, _, _, _, _, info2); // auto\r\n\t\t////@ close [f]File(fid, _, info); // auto\r\n\t\treturn b;\r\n\t}", "public boolean IsOpen() {\r\n return GoodOpen;\r\n }", "private boolean readFile() {\n JFileChooser jfc=new JFileChooser();\n jfc.setCurrentDirectory(new File(\"Users/\"+System.getProperty(\"user.name\")+\"/Desktop\"));\n jfc.setDialogTitle(WED_ZERO.lang.getInstruct().get(1)[34]);\n jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\n jfc.setAcceptAllFileFilterUsed(false);\n jfc.setFileFilter(new FileType());\n jfc.setVisible(true);\n if (jfc.showOpenDialog(panel)==JFileChooser.APPROVE_OPTION) {\n Reader read=new Reader(FileManaging.processLoc(jfc.getCurrentDirectory(), jfc.getSelectedFile()));\n try {\n this.processNewData(read.getMap(), read.getPacketName());\n return true;\n } catch (IOException ex) {\n ERROR.ERROR_362(Launch.frame);\n return false;\n }\n }\n return true;\n }", "public boolean isOpen()\r\n {\r\n if(connection != null)\r\n {\r\n try\r\n {\r\n return !connection.isClosed();\r\n } catch(SQLException exception)\r\n {\r\n LOG.log(Level.SEVERE, \"\", exception);\r\n }\r\n }\r\n return false;\r\n }", "public boolean fileExists(String fileName){\n\t\t\tboolean exists = false;\n\t\t\ttry{\n\t \t FileInputStream fin = openFileInput(fileName);\n\t\t\t\tif(fin == null){\n\t\t\t\t\texists = false;\n\t\t\t\t}else{\n\t\t\t\t\texists = true;\n\t\t\t\t\tfin.close();\n\t\t\t\t}\n\t\t\t}catch (Exception je) {\n\t\t //Log.i(\"ZZ\", \"AppDelegate:fileExists ERROR: \" + je.getMessage()); \n\t\t exists = false;\n\t\t\t}\n\t\t\treturn exists;\n\t\t}", "public boolean isOpen() {\n return open;\n }", "boolean hasFileInfo();", "boolean hasFileInfo();", "public boolean isActive() \r\n\t //@ requires [?f]File(?fid, ?state, ?info);\r\n\t //@ ensures [f]File(fid, state, info) &*& result == state;\r\n\t{\r\n\t\t////@ open [f]File(fid, state, info); // auto\r\n\t\treturn active;\r\n\t\t////@ close [f]File(fid, state, info); // auto\r\n\t}", "boolean hasRetrieveFile();", "public boolean isOpen() {\r\n\t\treturn false;\r\n\t}", "private final boolean isOpen()\n {\n return !closed;\n }", "@Override\r\n\tpublic boolean isOpen() {\r\n\t\t//\r\n\t\treturn this.socket.isOpen();\r\n\t}", "public boolean isOpen() {\r\n\t\treturn isOpen;\r\n\t}", "boolean isFile() throws IOException;", "public boolean isFileStartHit() {\n return pageRequest.getStart() == 0;\n }", "public boolean readDataFile();", "public boolean isSetFileData() {\n return this.fileData != null;\n }", "private boolean checkOpen(boolean recordException) {\n/* 650 */ if (!isOpen()) {\n/* 651 */ if (recordException) {\n/* 652 */ recordException(new ClosedChannelException());\n/* */ }\n/* 654 */ return false;\n/* */ } \n/* */ \n/* 657 */ return true;\n/* */ }", "public boolean isFile() { return true; }", "boolean hasRead();", "public boolean hasFileLocation() {\n return msgCase_ == 9;\n }", "public boolean newFile()\n {\n return newFile;\n }", "public boolean isReloadable() {\n return resultsFile != null && resultsFile.canRead();\n }", "public boolean hasFileLocation() {\n return msgCase_ == 9;\n }", "public boolean openFile(String pathName) \r\n\t{\r\n\t\tboolean result;\r\n\t\t// This allows the opening of files located from this actual package.\r\n\t\tURL localPath = this.getClass().getResource(pathName);\r\n\t\tinputFile = new File(localPath.getFile());\r\n\r\n\t\t// Open input file. The input file is a field oriented and\r\n\t\t// space-separated.\r\n\t\t// The fields and expected formats are listed above in the header\r\n\r\n\t\t// Check to ensure that the inputFile exists\r\n\t\tif (!inputFile.exists()) \r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\\"\" +localPath + \"\\\" should be in the same directory as: \"\r\n\t\t\t\t\t\t\t\t+ this.getClass().getPackage().getName());\r\n\t\t\t\r\n\t\t\tresult = false;\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\t// Create a buffered reader the file\r\n\t\t\t\tinFile = new BufferedReader(new InputStreamReader(\r\n\t\t\t\t\t\tnew FileInputStream((inputFile))));\r\n\r\n\t\t\t\tresult = true;\r\n\t\t\t} // try\r\n\t\t\tcatch (Exception Error) \r\n\t\t\t{\r\n\t\t\t\tresult = false;\r\n\t\t\t} // catch\r\n\t\t} // if\r\n\r\n\t\treturn (result);\r\n\t}", "public boolean isOpen() {\n return this.open;\n }", "public boolean isSetFilePath() {\n return this.filePath != null;\n }", "public boolean isSetFilePath() {\n return this.filePath != null;\n }", "public boolean isSetFilePath() {\n return this.filePath != null;\n }", "public boolean isSetFilePath() {\n return this.filePath != null;\n }", "@Override\n\tpublic boolean isOpen() {\n\t\treturn true;\n\t}", "public boolean exists() {\n\t\t\n\t\tFile temp = new File(this.path);\n\t\treturn temp.exists();\n\t}", "public boolean isOpen();", "public boolean isOpen();", "public boolean isFileByFile() {\n return fileByFile;\n }" ]
[ "0.8550967", "0.7795069", "0.77169603", "0.7712359", "0.76099586", "0.75939876", "0.7583084", "0.7425965", "0.72680134", "0.7243968", "0.7203843", "0.72030246", "0.71103334", "0.71065104", "0.7092534", "0.702946", "0.6995047", "0.69720507", "0.6934615", "0.6878422", "0.6828381", "0.68236864", "0.6812784", "0.6809408", "0.68013346", "0.6766725", "0.67528653", "0.67336243", "0.67204064", "0.67176074", "0.67068475", "0.66934276", "0.6675321", "0.66719496", "0.6661135", "0.6637937", "0.6628932", "0.66176456", "0.66174406", "0.6521526", "0.64978915", "0.6495245", "0.6492641", "0.6489234", "0.6487087", "0.64610744", "0.64561415", "0.64307487", "0.6430251", "0.6409357", "0.64027", "0.639677", "0.63929373", "0.63775414", "0.63643926", "0.6362021", "0.6353203", "0.6329362", "0.6325742", "0.6324026", "0.6319119", "0.63121396", "0.63116467", "0.6309715", "0.63082373", "0.63080156", "0.63063055", "0.6286381", "0.62858266", "0.62802446", "0.627558", "0.627558", "0.627116", "0.6267441", "0.6255652", "0.6251562", "0.62497145", "0.6234466", "0.62313706", "0.6223342", "0.62132597", "0.6211378", "0.6205392", "0.619068", "0.6184242", "0.6182771", "0.61813223", "0.6177714", "0.6173456", "0.6171865", "0.6170101", "0.61640936", "0.61640936", "0.61640936", "0.61640936", "0.6155058", "0.61401415", "0.6138132", "0.6138132", "0.6136268" ]
0.650928
40
returns the format of the file holding this document: 'sgml' or 'pos'.
public String format () { return format; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "FileFormat getFormat();", "public String getDocumentFormat() {\n return this.documentFormat;\n }", "String documentFormat();", "public String getFileFormat()\r\n\t{\r\n\t\treturn this.getSerializer().getFileFormat();\r\n\t}", "@UML(identifier=\"fileFormat\", obligation=MANDATORY, specification=ISO_19139)\n Format getFileFormat();", "@Override\n\tpublic String getFormat() {\n\t\treturn \"xml\";\n\t}", "String getContentFormat();", "public boolean open() {\n\t\tif (!open) {\n\t\t\ttry {\n\t\t\t\tif (format.equals(\"sgml\")) {\n\t\t\t\t\tFile file = new File(fullFileName());\t//return the full file name,including directory and filename\n\t\t\t\t\tString line;\n\t\t\t\t\tBufferedReader reader = new BufferedReader (\n\t\t\t\t\t\t// (new FileReader(file));\n\t\t\t\t\t\tnew InputStreamReader (new FileInputStream(file), JetTest.encoding));\n\t\t\t\t\tStringBuffer fileText = new StringBuffer();\t\t//store all text in filename\n\t\t\t\t\twhile((line = reader.readLine()) != null)\n\t\t\t\t\t\tfileText.append(line + \"\\n\");\n\t\t\t\t\tString text = fileText.toString(); //Store the converted text\n\t\t\t\t\tSGMLProcessor.allTags = allTags;\t\n\t\t\t\t\tSGMLProcessor.emptyTags = emptyTags;\n\t\t\t\t\tDocument doc = SGMLProcessor.sgmlToDoc (this, text, SGMLtags);\t//Because format.equals(\"sgml\")\n\t\t\t\t\topen = true;\n\t\t\t\t\treturn true;\n\t\t\t\t} else if (format.equals(\"pos\")) {\n\t\t\t\t\tposRead();\n\t\t\t\t\topen = true;\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println (\"Error opening document \" + fileName);\n\t\t\t\t\tSystem.out.println (\"Unknown document format.\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\t\tSystem.out.println (\"Error opening document \" + fileName);\n\t\t\t\t\tSystem.out.println (e);\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\t// return true if already open\n\t\t\treturn true;\n\t\t}\n\t}", "public RMFormat getFormat()\n {\n return getStyle().getFormat();\n }", "Object getFormat();", "public abstract String getFileFormatName();", "@ApiModelProperty(required = true, value = \"The file type of the file.\")\n public String getFormat() {\n return format;\n }", "private String inFormat() {\n File f = cfg.getReadFromFile();\n if (f != null) {\n return \" in format file \" + f.getPath();\n }\n return \" in format \" + StringUtils.defaultString(cfg.getName(), \"(unnamed)\");\n }", "public String getFormat() {\n\t\treturn getAttribute(FORMAT_TAG);\n\t}", "public int getFileShapeType() {\n return fileShapeType;\n }", "public String getDocumentType();", "public String getFormat() throws Exception {\n\t\treturn doc.selectSingleNode(\"/metadataFieldInfo/field/@metaFormat\").getText();\n\t}", "public static String getSupportedformats() {\r\n\t\tString description = \"\";\r\n\t\tfor(FileFormats ff : FileFormats.values()) {\r\n\t\t\tdescription += ff.description +\"\\n\";\r\n\t\t\t}\r\n\t\treturn description;\r\n\t}", "public String getChangeFileBeginFormat() {\r\n \t\treturn properties.getProperty(KEY_CHANGE_FILE_BEGIN_FORMAT);\r\n \t}", "public final AdFormat getFormat() {\n\t\treturn impl.getFormat();\n }", "public boolean isFormat() {\n\t\treturn isFormat;\n\t}", "public interface GPMLFormatVersion {\n\n\t/**\n\t * Returns the GPML namespace.\n\t */\n\tNamespace getGpmlNamespace();\n\n\t/**\n\t * Returns the GPML schema file.\n\t */\n\tString getSchemaFile();\n\n\t/**\n\t * Validates a JDOM document against the xml-schema definition specified by\n\t * 'xsdFile'\n\t *\n\t * @param doc the document to validate\n\t */\n\tvoid validateDocument(Document doc) throws ConverterException;\n}", "public int getFormat()\n {\n return format;\n }", "public String getFormat() {\n/* 206 */ return getValue(\"format\");\n/* */ }", "public Format getBestFormat() {\n\t\tif (formats.contains(Format.JSON)) {\n\t\t\treturn Format.JSON;\n\t\t}\n\t\tif (formats.contains(Format.XML)) {\n\t\t\treturn Format.XML;\n\t\t}\n\t\treturn null;\n\t}", "public String getFormatDesign() {\n return (String)getAttributeInternal(FORMATDESIGN);\n }", "public abstract String getImageFormat();", "@AutoEscape\n\tpublic String getDocumentType();", "public String getFormat() {\n\t\treturn format;\n\t}", "public Class<? extends FormatFeature> getFormatWriteFeatureType()\n/* */ {\n/* 426 */ return null;\n/* */ }", "public String getFormatOfRecords() {\n\t\tString t = doc.get(\"formatofrecords\");\n\n\t\tif (t == null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\treturn t;\n\t\t}\n\t}", "public void save () {\n\t\tif (!open) {\n\t\t\tSystem.out.println (\"ExternalDocument.save: attempt to save unopened document \" + fileName);\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tif (format.equals(\"sgml\")) {\n\t\t\t\tString tagToWrite;\n\t\t\t\tif (allTags)\n\t\t\t\t\ttagToWrite = null;\n\t\t\t\telse if (SGMLtags.length == 0)\n\t\t\t\t\ttagToWrite = \"***\"; // unused annotation type\n\t\t\t\telse if (SGMLtags.length == 1)\n\t\t\t\t\ttagToWrite = SGMLtags[0];\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println (\"ExternalDocument.save: cannot write more than 1 annotation type\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tString string = writeSGML(tagToWrite).toString();\n\t\t\t\tFile file = new File(fullFileName());\n\t\t\t\tBufferedWriter writer = new BufferedWriter (\n\t\t\t\t\t\tnew OutputStreamWriter (new FileOutputStream(file), JetTest.encoding));\n\t\t\t\twriteWithSystemNewlines (writer, string);\n\t\t\t\twriter.close();\n\t\t\t} else {\n\t\t\t\t\tSystem.out.println (\"Error saving document \" + fileName);\n\t\t\t\t\tSystem.out.println (\"Unknown document format.\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println (\"Error opening document \" + fileName);\n\t\t\t\tSystem.out.println (e);\n\t\t}\n\t}", "public Class<F> getFormatType() {\n\t\treturn formatType;\n\t}", "public String getChangeFileEndFormat() {\r\n \t\treturn properties.getProperty(KEY_CHANGE_FILE_END_FORMAT);\r\n \t}", "public int getFormat ()\n {\n return this.format;\n }", "private String getDocumentType(Document doc) {\n List<Node> nodes = doc.childNodes();\n for (Node node : nodes) {\n if (node instanceof DocumentType) {\n DocumentType documentType = (DocumentType) node;\n\n return documentType.toString().toLowerCase();\n }\n }\n return \"This document does not declare its DOCTYPE\";\n }", "com.google.protobuf.ByteString\n getFormatBytes();", "public List<String> getParserFormats();", "public Class<? extends FormatFeature> getFormatReadFeatureType()\n/* */ {\n/* 415 */ return null;\n/* */ }", "protected String xmlType()\n {\n return PRS_XML;\n }", "protected Format doGetFormat()\n {\n return null;\n }", "public SECSItemFormatCode getFormatCode()\n {\n return formatCode;\n }", "String getOutputFormat();", "String getFormat();", "String getFormat();", "String getFormat();", "public String getFileExtension() {\r\n return Generator.ANIMALSCRIPT_FORMAT_EXTENSION;\r\n }", "public boolean fileFormatSupported(String fmt);", "Format internalGetFormat()\n {\n return doGetFormat();\n }", "public String getFormat()\n {\n return format;\n }", "public String toFileFormat()\n\t{\n\t\t\n\t\treturn startx + \" \" + starty + \"; \" + endx + \" \" + endy + \"; \"+ texture + \";\\r\\n\";\n\t\t\n\t}", "public String getFILE_TYPE() {\r\n return FILE_TYPE;\r\n }", "private String descFormat() {\n File f = cfg.getReadFromFile();\n if (f != null) {\n return f.getPath();\n }\n return StringUtils.defaultString(cfg.getName(), \"(unnamed)\");\n }", "public java.lang.String getDocumentStandard() {\n return documentStandard;\n }", "public Document readDocument();", "public String getFormatCode() {\n if (format == null) return \"MP4\";\n switch(format) {\n case \"Windows Media\": return \"WMV\";\n case \"Flash Video\": return \"FLV\";\n case \"MPEG-4\": return \"MP4\";\n case \"Matroska\": return \"MKV\";\n case \"AVI\": return \"AVI\";\n default: return \"MP4\";\n }\n }", "public String getFormat() {\n\t\treturn formatString;\n\t}", "public File getDisplayDocument() {\n\t\tswitch (type) {\n\t\t\tcase SOURCE : return doc.getSourceDocument();\n\t\t\tcase TARGET : return doc.getWorkingDocument();\n\t\t}\n\t\treturn null;\n\t}", "public String getFormatByExtension(String fileExtenstion) throws DataServiceException{\r\n\t\tString format = \"\";\r\n\t\tformat = (String)queryForObject(\"document.query_format\",fileExtenstion);\r\n\t\treturn format;\r\n\t}", "public RMFormat getFormat()\n{\n // Return format from first binding\n if(getBindingCount()>0)\n return (RMFormat)getBinding(0).getFormat();\n \n // Return null\n return null;\n}", "public String getFormat() {\r\n return _format;\r\n }", "public java.lang.String getDocumentStandard() {\n return documentStandard;\n }", "public String getFormat() {\n return format;\n }", "public String getFormat() {\n return format;\n }", "public String getFormat() {\n return format;\n }", "public String getLBR_MDFeDocType();", "public SDMFormat getSDMFormat()\n\t{\n\t\treturn SDMFormat.valueOf( mMessage.get( B2_SDM_SEGMENT_TRANSACTION_FLAG ), \n\t\t\t\t\t\t\t\t mMessage.getInt( B2_SDM_GENERAL_FORMAT ) );\n\t}", "public String getSupportFormat() {\r\n\t\treturn supportFormat;\r\n\t}", "public String getDocumentType() {\n return this.documentType;\n }", "public String toString() {\r\n\r\n StructuredTextDocument doc = (StructuredTextDocument) getDocument(MimeMediaType.XMLUTF8);\r\n return doc.toString();\r\n }", "public String getPresentationFormat()\n {\n return (String) getProperty(PropertyIDMap.PID_PRESFORMAT);\n }", "public abstract String getOutputFormat();", "public String getMIMEType(String format)\n\t{\n\t\treturn engine.getMIMEType(format);\n\t}", "public String getDocumentInfo() {\n MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());\n return dt.getName() + \" \" + getDocumentNo();\n }", "public String[] getSupportedFileFormatsList();", "public String getFileTypeDescription() {\n return \"GrADS Binary Gridded Data\";\n }", "@Override\n public String toString() {\n String str = \"Unknown file format\";\n //$$fb2002-11-01: fix for 4672864: AudioFileFormat.toString() throws unexpected NullPointerException\n if (getType() != null) {\n str = getType() + \" (.\" + getType().getExtension() + \") file\";\n }\n if (getByteLength() != AudioSystem.NOT_SPECIFIED) {\n str += \", byte length: \" + getByteLength();\n }\n str += \", data format: \" + getFormat();\n if (getFrameLength() != AudioSystem.NOT_SPECIFIED) {\n str += \", frame length: \" + getFrameLength();\n }\n return str;\n }", "public java.lang.String getDocumentType() {\n return documentType;\n }", "public String getDocumentType() {\n return documentType;\n }", "public String getMime_type()\r\n {\r\n return getSemanticObject().getProperty(data_mime_type);\r\n }", "ImageFormat getFormat();", "public int getImageFormat() {\n if (this.cleanedUp) {\n throw new IllegalStateException(\"Tried fetch image format from cleaned up swapchain!\");\n }\n return this.imageFormat;\n }", "public String getSequenceFormat() {\n return sequenceFormat;\n }", "public java.lang.String getFiletype() {\n return filetype;\n }", "public static FileFormat getFileFormat(String ext)\r\n {\r\n return getFileFormat(ext, null);\r\n }", "public java.lang.String getDocumentType() {\n return documentType;\n }", "@RestrictTo(Scope.LIBRARY_GROUP)\n public int getImageFormat() {\n return mImageFormat;\n }", "public int getWriteFormatCount();", "public AVT getFormat()\n {\n return m_format_avt;\n }", "public edu.umich.icpsr.ddi.FormatType getFormat()\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.FormatType target = null;\n target = (edu.umich.icpsr.ddi.FormatType)get_store().find_element_user(FORMAT$10, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public int compareTo(Document o2) {\n return this.format.getClass().getSimpleName().compareTo(o2.getFormat().getClass().getSimpleName());\n }", "String getSchemaFile();", "public SECSItemFormatCode getSECSItemFormatCode()\n {\n return getFormatCode();\n }", "public String getFiletype() {\n return filetype;\n }", "public String getFormat() {\n return this.format;\n }", "@Override\n public String getFormatName() throws IOException {\n return input == null? myDefaultFormat.getName() : getInfo().getFormat().getName();\n }", "public boolean hasFormat() {\r\n return hasFormat;\r\n }", "public String getFormattedFileContents ();", "@Override\n public com.gensym.util.Symbol getFormatType() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.FORMAT_TYPE_);\n return (com.gensym.util.Symbol)retnValue;\n }", "public Object getContent() {\n\t\tManageProperties properties = ManageProperties.getInstance();\n\t\tDocument gateDoc = null;\n\t\ttry {\n\t\t\tgateDoc = (Document) Factory.createResource(\"gate.corpora.DocumentImpl\", Utils.featureMap(\"encoding\", properties.getValue(PropertiesFields.ENCODING.toString())));\n\t\t\tDocumentType doc = xmldoc.getDocument();\n\t\t\tgateDoc.setContent(new DocumentContentImpl(doc.getText()));\n\t\t\tAnnotationSet defaultSet = gateDoc.getAnnotations();\n\t\t\tTokensType tokens = doc.getTokens();\n\t\t\tIterator<TokenType> iterTokens = tokens.getToken().iterator();\n\t\t\twhile(iterTokens.hasNext()) {\n\t\t\t\tTokenType token = iterTokens.next();\n\t\t\t\tFeatureMap tokenFeatures = Factory.newFeatureMap();\n\t\t\t\ttokenFeatures.put(\"string\", token.getForm());\n\t\t\t\ttokenFeatures.put(\"root\", token.getLemma());\n\t\t\t\ttokenFeatures.put(\"category\", token.getCategory());\n\t\t\t\tdefaultSet.add(token.getBeginspan().longValue(), token.getEndspan().longValue(), \"Token\", tokenFeatures);\n\t\t\t}\n\t\t\t\n\t\t\tIterator<SentenceType> iterSentences = doc.getSentence().iterator();\n\t\t\twhile(iterSentences.hasNext()) {\n\t\t\t\tSentenceType sent = iterSentences.next();\n\t\t\t\tdefaultSet.add(sent.getBeginspan().longValue(), sent.getEndspan().longValue(), \"Sentence\", Factory.newFeatureMap());\n\t\t\t}\n\t\t} catch (ResourceInstantiationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (InvalidOffsetException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn (gateDoc);\n\t}", "public int rtf() {\n/* 219 */ return this.m_dtmRoot;\n/* */ }" ]
[ "0.7009432", "0.6917578", "0.6811955", "0.6745307", "0.6546614", "0.6526429", "0.6364159", "0.6158294", "0.6140202", "0.6099692", "0.5976575", "0.5867711", "0.58649606", "0.58545107", "0.58515525", "0.57616144", "0.5723877", "0.5699701", "0.56962025", "0.56929773", "0.5674897", "0.56707174", "0.5645283", "0.56287056", "0.5601965", "0.5579065", "0.5559734", "0.5509272", "0.5508694", "0.55040586", "0.5495354", "0.54876643", "0.5461301", "0.545517", "0.54467416", "0.54429173", "0.5439426", "0.54362535", "0.5433346", "0.5421784", "0.5412968", "0.5390769", "0.5383196", "0.5377084", "0.5377084", "0.5377084", "0.535511", "0.5354937", "0.53438944", "0.5318353", "0.53049594", "0.53028625", "0.5301306", "0.53011036", "0.52891105", "0.52874094", "0.5284651", "0.5283913", "0.5283597", "0.52672845", "0.52664375", "0.5264232", "0.52624434", "0.52624434", "0.52624434", "0.525569", "0.5255539", "0.5248882", "0.52450377", "0.52394664", "0.52360904", "0.5223256", "0.5221358", "0.52202356", "0.5211719", "0.5197707", "0.51834637", "0.51726717", "0.5171584", "0.51686513", "0.51579195", "0.51546514", "0.5151485", "0.51471466", "0.5138116", "0.5131323", "0.5125904", "0.5121563", "0.5109067", "0.5107812", "0.5105472", "0.51006305", "0.51002693", "0.50726783", "0.5067577", "0.5065492", "0.5056947", "0.5056782", "0.50527936", "0.50452703", "0.5036376" ]
0.0
-1
returns the directory associated with the document, or 'null' if there is no directory (if the fileName contains the full path).
public String directory () { return directory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\tpublic String getDir()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "public String getDir();", "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}", "public File getDirectory() {\n\t\treturn file.getParentFile();\n\t}", "String getDir();", "public Directory getDirectory() {\n\n\tif( _directory == null) { // If the current directory was not already parsed,\n \n \t _directory = parseDirectory(); // parse it.\n\t}\n\n\treturn _directory; // Return the current root directory.\n }", "@Override\n\tpublic File getDocument(String name) {\n\t\t\n\t\tFile returnValue = new File(RestService.documentDirectory + name + \".pdf\");\n\t\t\n\t\tif(returnValue.exists() && !returnValue.isDirectory()) { \n\t\t return returnValue;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}", "java.lang.String getDirName();", "private String getDicDir() {\n\t\tString wDir = null;\n\n\t\tif (System.getProperties().containsKey(\"root\")) {\n\t\t\twDir = System.getProperty(\"root\");\n\t\t}\n\n\t\tif ((wDir == null || wDir.isEmpty()) && CPlatform.isMacOs())\n\t\t\twDir = new File(CPlatform.getUserHome(), \"Library/Spelling\")\n\t\t\t\t\t.getAbsolutePath();\n\n\t\tif (wDir == null || wDir.isEmpty())\n\t\t\twDir = \"/home/ff/projects/hunspell\";\n\t\treturn wDir;\n\t}", "public File getFileChooserDirectory() {\n\n\t\tFile dir = null;\n\n\t\ttry {\n\t\t\tFile tmpDir = new File(diffuseBaseValueControl.getText());\n\t\t\tif (tmpDir.exists()) dir = tmpDir.getParentFile();\n\t\t} catch (Exception ex) {\n\t\t}\n\n\t\ttry {\n\t\t\tFile tmpDir = new File(specularBaseValueControl.getText());\n\t\t\tif (tmpDir.exists()) dir = tmpDir.getParentFile();\n\t\t} catch (Exception ex) {\n\t\t}\n\n\t\ttry {\n\t\t\tFile tmpDir = new File(((TextField) textureInputLayout.lookup(\"tex_path\")).getText());\n\t\t\tif (tmpDir.exists()) dir = tmpDir.getParentFile();\n\t\t} catch (Exception ex) {\n\t\t}\n\n\t\treturn dir;\n\t}", "private File getDocumentFile(String filename) {\n LOGGER.debug(\"In getDownloadFile Params: filename[{}]\", filename);\n // get absolute path of the application\n String root = fileUploadDirectory; //context.getRealPath(\"/\");\n File folder = new File(root + File.separator + \"uploads\");\n if (folder.exists()) {\n File[] listFiles = folder.listFiles();\n for (File listFile : listFiles) {\n if (listFile.getName().equals(filename)) {\n LOGGER.debug(\"File found: [{}]\", listFile.getName());\n return listFile;\n }\n }\n } else {\n LOGGER.error(\"File upload folder path not found [{}]\", folder.getName());\n }\n LOGGER.error(\"Download File not found: [{}]\", filename);\n return null;\n }", "String getDirectoryPath();", "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 }", "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}", "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 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}", "Object getDir();", "public String getDir() {\n return dir;\n }", "@Nullable\n public static PsiDirectory findResourceDirectory(@NotNull DataContext dataContext) {\n Project project = CommonDataKeys.PROJECT.getData(dataContext);\n if (project != null) {\n AbstractProjectViewPane pane = ProjectView.getInstance(project).getCurrentProjectViewPane();\n if (pane.getId().equals(AndroidProjectView.ID)) {\n return null;\n }\n }\n\n VirtualFile file = CommonDataKeys.VIRTUAL_FILE.getData(dataContext);\n if (file != null) {\n // See if it's inside a res folder (or is equal to a resource folder)\n Module module = PlatformCoreDataKeys.MODULE.getData(dataContext);\n if (module != null) {\n LocalResourceManager manager = LocalResourceManager.getInstance(module);\n if (manager != null) {\n VirtualFile resFolder = getResFolderParent(manager, file);\n if (resFolder != null) {\n return AndroidPsiUtils.getPsiDirectorySafely(module.getProject(), resFolder);\n }\n }\n }\n }\n\n return null;\n }", "@Override\n\tpublic String getDirName() {\n\t\treturn StringUtils.substringBeforeLast(getLocation(), \"/\");\n\t}", "public String getDirectory() {\n return directoryProperty().get();\n }", "private Optional<Path> dataSetDir() {\n Optional<String> dataSetDirProperty = demoProperties.dataSetDir();\n if (!dataSetDirProperty.isPresent()) {\n logger.info(\"Data set directory (app.demo.data-set-dir) is not set.\");\n return Optional.empty();\n }\n Path dataSetDirPath = Paths.get(dataSetDirProperty.get());\n if (!isReadableDir(dataSetDirPath)) {\n logger.warn(\n \"Data set directory '{}' doesn't exist or cannot be read. No external data sets will be loaded.\",\n dataSetDirPath.toAbsolutePath());\n return Optional.empty();\n }\n return Optional.of(dataSetDirPath);\n }", "public String getDir() {\n return this.dir;\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 File getDirectoryValue();", "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 getDocumentName() {\r\n if (resource != null) {\r\n return resource.getFullPath().toString();\r\n }\r\n return \"null\";\r\n }", "public String fullFileName () {\n\t\tif (directory == null || directory.equals(\"\"))\n\t\t\treturn fileName;\n\t\telse\n\t\t\treturn directory + File.separator + fileName;\t//add a '\\' in the path\n\t}", "protected File getDir() {\n return hasSubdirs ? DatanodeUtil.idToBlockDir(baseDir,\n getBlockId()) : baseDir;\n }", "public String getFileDirectory() {\n String storedDirectory = settings.get(\"fileDirectory\");\n \n // Default to the program files\n if (storedDirectory == null) {\n storedDirectory = System.getenv(\"ProgramFiles\");\n }\n \n return storedDirectory;\n }", "public File getDirectory() {\n\t\treturn directory;\n\t}", "public File getDirectory()\n {\n return directory;\n }", "public String getDir(){\r\n\t\treturn dir;\r\n\t}", "public String getIndexDirectoryString() {\n File indexDir = this.getIndexDirectory();\n return indexDir != null ? indexDir.getAbsolutePath() : null;\n }", "java.lang.String getFilePath();", "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 }", "public String getBundleDir()\n {\n if ( bundleDir != null )\n {\n bundleDir = cleanBundleDir( bundleDir );\n }\n return bundleDir;\n }", "private NodeRef getDocumentLibraryFolder(){\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 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 }", "java.io.File getBaseDir();", "public java.lang.String getDirName() {\n java.lang.Object ref = dirName_;\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 dirName_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getSourceDir() {\n\t\tif (sourceDir != null)\n\t\t\treturn sourceDir;\n\t\telse if (parent == null)\n\t\t\treturn \"./\";\n\t\telse\n\t\t\treturn parent.getSourceDir();\n\t}", "public static Path getWordsDir() {\n\t\treturn Paths.get(prefs.get(Constants.PREF_USERSAVE_DIR, null)).resolve(WORDS_DIR);\n\t}", "public static File getDatabaseExportDirectoryFile() {\n\t\tif (xml == null) return null;\n\t\treturn new File(basepath + databaseExportDir);\n\t}", "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 java.lang.String getDirName() {\n java.lang.Object ref = dirName_;\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 dirName_ = s;\n }\n return s;\n }\n }", "public String getXLSDirectory() {\n\t\treturn props.getProperty(ARGUMENT_XLS_DIRECTORY);\n\t}", "private String getAbsoluteFilesPath() {\n\n //sdcard/Android/data/cucumber.cukeulator\n //File directory = getTargetContext().getExternalFilesDir(null);\n //return new File(directory,\"reports\").getAbsolutePath();\n return null;\n }", "public static String getDirectoryName(URI uri) {\n\t\tString location = uri.getSchemeSpecificPart();\n\t\tif (location != null) {\n\t\t\tString name = location;\n\t\t\tint end = location.lastIndexOf('/');\n\t\t\tif (end != -1) {\n\t\t\t\tint start = location.lastIndexOf('/', end - 1);\n\t\t\t\tname = name.substring(start + 1, end);\n\t\t\t}\n\t\t\treturn name;\n\t\t}\n\n\t\treturn null;\n\t}", "public String getURI() {\n if (filePath == null) {\n return null;\n }\n int ind = filePath.lastIndexOf(\"/\");\n if (ind != -1) {\n //int ind2 = filePath.substring(0, ind-1).lastIndexOf(\"/\");\n //if (ind2 != -1)\n // return filePath.substring(ind2+1, filePath.length());\n return filePath.substring(ind+1, filePath.length());\n }\n\n return new File(filePath).getName();\n }", "public DicomDirectory getDicomDirectory() {\n\t\ttreeModel.getMapOfSOPInstanceUIDToReferencedFileName(this.parentFilePath);\t// initializes map using parentFilePath, ignore return value\n\t\treturn treeModel;\n\t}", "public static String getPath(String fn) {\n\t\tif (fn == null) {\n\t\t\treturn null;\n\t\t}\n\t\tint i = fn.lastIndexOf(File.separator);\n\t\treturn (i > -1) ? fn.substring(0, i) : fn;\n\t}", "public static Optional<File> dataFile(final String fileName)\n {\n final File file = new File(getDataDirectory(), fileName);\n\n Log.infoWhenDev(\"Looking up file in hierarchy: {0} ...\", file.toString());\n final Optional<File> result = file.exists() ? Optional.of(file) : Optional.empty();\n Log.infoWhenDev(\"...{0} was {1}\", file.toString(), result.isPresent() ? \"found.\" : \"not found!\");\n\n return result;\n }", "private String getFilePath(){\n\t\tif(directoryPath==null){\n\t\t\treturn System.getProperty(tmpDirSystemProperty);\n\t\t}\n\t\treturn directoryPath;\n\t}", "public static Optional<String> dataFilePathBySite(final Site site, final String fileName)\n {\n // get path relative to program root\n final Optional<File> file = dataFileBySite(site, fileName);\n if (file.isPresent())\n {\n final String normalizedDataDirectoryPath = new File(getDataDirectory()).getPath();\n final String escapedNormalizedDirectoryPath = Pattern.quote(normalizedDataDirectoryPath);\n final String dataFilePathWithoutDataDirectory = file.get().getPath().replaceFirst(escapedNormalizedDirectoryPath, \"\");\n final String dataFilePathWithoutLeadingSlash = dataFilePathWithoutDataDirectory.substring(1);\n\n return Optional.of(dataFilePathWithoutLeadingSlash);\n }\n\n // file not found\n return Optional.empty();\n }", "public static File getFile(File directory, final String fileName) {\n\t\tFile classesDir = null;\n\t\tFile[] filesReturned = directory.listFiles(new FileFilter() {\n\t\t\tpublic boolean accept(File pathname) {\n\t\t\t\treturn pathname.getName().equals(fileName);\n\t\t\t}\n\t\t});\n\t\tif (filesReturned.length == 1){\n\t\t\tclassesDir = filesReturned[0];\n\t\t}\n\t\treturn classesDir;\n\t}", "default Optional<Path> getProjectDir() {\n Optional<Path> projectDir = get(MICRONAUT_PROCESSING_PROJECT_DIR, Path.class);\n if (projectDir.isPresent()) {\n return projectDir;\n }\n // let's find the projectDir\n Optional<GeneratedFile> dummyFile = visitGeneratedFile(\"dummy\" + System.nanoTime());\n if (dummyFile.isPresent()) {\n URI uri = dummyFile.get().toURI();\n // happens in tests 'mem:///CLASS_OUTPUT/dummy'\n if (uri.getScheme() != null && !uri.getScheme().equals(\"mem\")) {\n // assume files are generated in 'build' or 'target' directories\n Path dummy = Paths.get(uri).normalize();\n while (dummy != null) {\n Path dummyFileName = dummy.getFileName();\n if (dummyFileName != null && (\"build\".equals(dummyFileName.toString()) || \"target\".equals(dummyFileName.toString()))) {\n projectDir = Optional.ofNullable(dummy.getParent());\n put(MICRONAUT_PROCESSING_PROJECT_DIR, dummy.getParent());\n break;\n }\n dummy = dummy.getParent();\n }\n }\n }\n\n return projectDir;\n }", "private File getFile(String fileName) {\n String path = \"\";\n if (fileName.equals(PREV_DIRECTORY)) {\n if (getCurrentDir().lastIndexOf(\"/\") >= 0) {\n path = getCurrentDir().substring(0, getCurrentDir().lastIndexOf(\"/\"));\n if (fileName.length() > PREV_DIRECTORY.length()) {\n path += fileName.substring(2, fileName.length());\n }\n }\n else {\n path += fileName.substring(2, fileName.length());\n }\n }\n else if (fileName.equals(CURRENT_DIRECTORY)) {\n path = getCurrentDir();\n }\n else {\n path = getCurrentDir()+\"/\"+fileName;\n }\n\n // Datei laden\n return getFile(path, getCredentials());\n }", "private synchronized Directory getDirectoryEmDisco() throws IOException{\r\n\t\tif(diretorioEmDisco == null){\r\n\t\t\tdiretorioEmDisco = FSDirectory.open(pastaDoIndice);\r\n\t\t}\r\n\t\t\r\n\t\treturn diretorioEmDisco;\r\n\t}", "public static File getYdfDirectory()\r\n/* 36: */ throws IOException\r\n/* 37: */ {\r\n/* 38: 39 */ log.finest(\"OSHandler.getYdfDirectory\");\r\n/* 39: 40 */ return ydfDirectory == null ? setYdfDirectory() : ydfDirectory;\r\n/* 40: */ }", "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 getTargetDir() {\n\t\tif (targetDir != null)\n\t\t\treturn targetDir;\n\t\telse if (parent == null)\n\t\t\treturn \"./\";\n\t\telse\n\t\t\treturn parent.getTargetDir();\n\t}", "public static String getFileName(String source) {\n File directory = null;\n try {\n directory = new File(source);\n } catch (NullPointerException ex) {\n return null;\n }\n if (directory.exists()) {\n for (File file : directory.listFiles(new FileFilter() {\n @Override\n public boolean accept(File pathname) {\n if (pathname.isFile() && pathname.getName().endsWith(Constants.PDF_FORMAT)) {\n return true;\n }\n return false;\n }\n })) {\n return file.getName();\n }\n }\n return null;\n }", "public String inputFileDir() {\n return inputFileDir;\n }", "java.lang.String getFilename();", "java.lang.String getFilename();", "private String getDownloadDir() throws IOException {\n if (!\"mounted\".equals(Environment.getExternalStorageState())) {\n return null;\n }\n String str = this.webView.getContext().getExternalFilesDir(null) + \"/socialsharing-downloads\";\n createOrCleanDir(str);\n return str;\n }", "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 }", "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 String getPath() {\n\t\treturn file.getPath();\n\t}", "@Nullable String getPath();", "public URL getCompleteURL (String fileName)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn new URL (\"file:\" + System.getProperty (\"user.dir\") + \"/\" + fileName);\r\n\t\t}\r\n\t\tcatch (MalformedURLException e)\r\n\t\t{\r\n\t\t\tSystem.err.println (e.getMessage ());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public String getDownloadFilePath(String fileName) {\n StringBuilder sb = new StringBuilder(32);\n sb.append(this.context.getExternalFilesDir((String) null)).append(WVNativeCallbackUtil.SEPERATER).append(DOWNLOAD_FOLDER).append(WVNativeCallbackUtil.SEPERATER).append(fileName);\n return sb.toString();\n }", "FsPath baseDir();", "public static String getDatabaseExportDirectory() {\n\t\tif (xml == null) return \"\";\n\t\treturn databaseExportDir;\n\t}", "public String getPath() {\n\t\treturn this.baseDir.getAbsolutePath();\n\t}", "public File getExternalFilesDir(String directory) {\n\t\treturn DraftSimulatorApplication.getContext().getExternalFilesDir(directory);\n\t}", "public static String rootDir()\n {\n read_if_needed_();\n \n return _root;\n }", "public static Path getPath(String fileName) {\n return FileSystems.getDefault().getPath(fileName);\n }", "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 String getDefDir() {\n\n\t\t// String newDefDir = defDir.replaceAll(\"\\\\\\\\\", \"\\\\\\\\\\\\\\\\\");\n\n\t\treturn defDir;\n\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}", "File getTargetDirectory();", "@Basic @Raw\r\n\tpublic Directory getDir() {\r\n\t\treturn dir;\r\n\t}", "public File getStoreDir();", "public static String folder(String filename) {\n return new File(filename).getParentFile().getAbsolutePath() + \"/\";\n }", "@Nullable\n public DocumentFile findFile(@NonNull Context context, @NonNull DocumentFile parent, @NonNull String fileName) {\n List<DocumentFile> result = listDocumentFiles(context, parent, createNameFilterEquals(fileName), false, true, true);\n if (!result.isEmpty()) return result.get(0);\n else return null;\n }", "public File getCodeRoot( File dirPackage )\n\t{\n\t\tif( (dirPackage == null) || (!dirPackage.exists()) || (!dirPackage.isDirectory()) ) return null;\n\n\t\tString strPathFragment = this.packagename.replace( '.', File.separatorChar );\n\t\t//System.out.println( \"\\t strPathFragment \" + strPathFragment );\n\n\t\tif( dirPackage.getPath().endsWith( strPathFragment ) )\n\t\t{\n\t\t\tString[] strSplit = this.packagename.split( \"\\\\.\" );\n\t\t\tFile current = dirPackage;\n\t\t\tfor( int i=0; (i<strSplit.length) && (current != null); i++ ) current = current.getParentFile();\n\t\t\t//System.out.println( \"\\t returning \" + current.getPath() );\n\t\t\treturn current;\n\t\t}\n\t\telse return null;\n\t}", "String getDatabaseDirectoryPath();", "private String getPDFFileName(){\r\n String[] split = inputFilePath.split(\"\\\\\\\\\");\r\n\r\n return split[split.length-1].split(\"\\\\.\")[0];\r\n }", "public File getPublicServiceDir(String serviceName) {\n return new File(new File(getRootDir(), ToolboxFoldersFileConstants.WSDL), serviceName);\n }", "@Override\n\t\tpublic InJarResourceImpl getDirectory(String name, InJarResourceImpl parentDirectory) {\n\t\t\tfor (InJarResourceImpl r : parentDirectory.getContents(false)) {\n\t\t\t\t// System.out.println(\" * \" + r.getName() + \" \" + r);\n\t\t\t\tif (name.equals(r.getName())) {\n\t\t\t\t\treturn r;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\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 }" ]
[ "0.6035599", "0.5893726", "0.5830858", "0.58284545", "0.5822884", "0.5762944", "0.57441103", "0.5691828", "0.5648245", "0.56288", "0.554456", "0.55336624", "0.55214244", "0.5497014", "0.5481806", "0.5481135", "0.545247", "0.5400631", "0.5396263", "0.5373848", "0.5358875", "0.5349296", "0.53455883", "0.53418726", "0.5333044", "0.5327209", "0.53043264", "0.52897835", "0.52777314", "0.5272959", "0.5255094", "0.52502507", "0.5249881", "0.5193315", "0.5185422", "0.5182648", "0.5171834", "0.51496524", "0.5148862", "0.514478", "0.5138439", "0.5137185", "0.51308", "0.513058", "0.5128274", "0.5100831", "0.50998175", "0.50983", "0.50891155", "0.5088755", "0.50739527", "0.5048844", "0.5045523", "0.5014747", "0.4996473", "0.4969189", "0.49625912", "0.49605417", "0.49579617", "0.49546558", "0.49450484", "0.49412504", "0.4940475", "0.4927205", "0.4927205", "0.4924543", "0.4919471", "0.4918036", "0.4918036", "0.4918036", "0.4918036", "0.4918036", "0.4918036", "0.4918036", "0.4918036", "0.4918036", "0.49177447", "0.4910719", "0.49069476", "0.49020344", "0.4893785", "0.48851836", "0.48771083", "0.48765025", "0.48760203", "0.48748848", "0.4861257", "0.4852694", "0.48454666", "0.4838485", "0.48366302", "0.4828693", "0.4821138", "0.48099", "0.48063505", "0.48006153", "0.4796836", "0.4794047", "0.47889826", "0.4786869" ]
0.5370808
20
returns the file name associated with the document.
public String fileName () { return fileName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getDocumentName() {\r\n if (resource != null) {\r\n return resource.getFullPath().toString();\r\n }\r\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();", "java.lang.String getFileName();", "java.lang.String getFileName();", "public String getFileName() {\n return String.format(\"%s%o\", this.fileNamePrefix, getIndex());\n }", "public String getFileName()\n {\n return getString(\"FileName\");\n }", "public String getFileName() {\n\t\treturn file.getFileName();\n\t}", "public final String getFileName() {\n\t\treturn m_info.getFileName();\n\t}", "public String getFileName() {\n\t\treturn file.getName();\n\t}", "public String getFileName() {\r\n \t\tif (isFileOpened()) {\r\n \t\t\treturn curFile.getName();\r\n \t\t} else {\r\n \t\t\treturn \"\";\r\n \t\t}\r\n \t}", "public String getFilename() {\n\treturn file.getFilename();\n }", "public final String getFileName() {\n\n\t\treturn getValue(FILE_NAME);\n\t}", "public String getDocumentName()\n {\n return getText();\n }", "public String getFileName() {\n return getCellContent(FILE).split(FILE_LINE_SEPARATOR)[0];\n }", "String getFilename();", "public String filename() {\n\t int sep = fullPath.lastIndexOf(pathSeparator);\n\t return fullPath.substring(sep + 1);\n\t }", "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 String getFile_name() {\n\t\treturn file_name;\n\t}", "public String getFilename();", "public String getFileName() {\n return mFileNameTextField == null ? \"\" : mFileNameTextField.getText(); //$NON-NLS-1$\n }", "public String getFileName();", "public String getFileName();", "public String getFileName() {\n\t\treturn mItems.getJustFileName();\n\t}", "String getFileName();", "String getFileName();", "String getFileName();", "String getFileName();", "String getFileName();", "public String filename() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n int sep = fullPath.lastIndexOf(pathSeparator);\n return fullPath.substring(sep + 1, dot);\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 }", "public String getName()\n {\n return( file );\n }", "private String getFileName() {\n\t\t// retornamos el nombre del fichero\n\t\treturn this.fileName;\n\t}", "@Override\n\tpublic String getFilename() {\n\t\treturn this.path.getFileName().toString();\n\t}", "public final String getFileName()\r\n {\r\n return _fileName;\r\n }", "public long getDocumentName();", "public String GetFileName() {\r\n\treturn fileName;\r\n }", "@Override\n\tprotected String getAnnotatedFileName() throws ParserConfigurationException, SAXException, IOException {\n\n\t\tNodeList nList = getNodeList(DOCUMENT_ID_TAG);\n\t\tNode node = nList.item(0);\n\n\t\tif (node != null && node.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\tElement elem = (Element) node;\n\t\t\tannotatedFilename = elem.getAttribute(DOCUMENT_ID_NODE);\n\t\t}\n\n\t\treturn annotatedFilename;\n\t}", "public final String getFilename() {\n return properties.get(FILENAME_PROPERTY);\n }", "public String filename (){\r\n\t\t\treturn _filename;\r\n\t\t}", "public String getName() {\n return _file.getAbsolutePath();\n }", "public String getFileName(){\r\n\t\treturn linfo != null ? linfo.getFileName() : \"\";\r\n\t}", "protected String getFileName()\n {\n return new StringBuilder()\n .append(getInfoAnno().filePrefix())\n .append(getName())\n .append(getInfoAnno().fileSuffix())\n .toString();\n }", "public String getFileName ();", "@Nullable public String getFileName() {\n return getSourceLocation().getFileName();\n }", "public final String getFileName() {\n return this.fileName;\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 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 getFileName()\n\t{\n\t\treturn fileName;\n\t}", "public String getFileName()\n\t{\n\t\treturn fileName;\n\t}", "private String getFilename() {\r\n\t\treturn (String) txtFlnm.getValue();\r\n\t}", "public String getFileRealName() {\n return fileRealName;\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 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 fileName_ = s;\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 fileName_ = s;\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 fileName_ = s;\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 fileName_ = s;\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 fileName_ = s;\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 fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getName() {\n\t\treturn filename;\n\t}", "protected String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName()\r\n {\r\n return sFileName;\r\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 filename_ = s;\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 filename_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public String getFileName()\r\n {\r\n return fileName;\r\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public String getName() {\r\n return mFile.getName();\r\n }", "public String getFileName(){\n\t\treturn _fileName;\n\t}", "public String getFileName() {\n return this.fileName;\n }", "public String getFileName() {\n return this.fileName;\n }", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName()\r\n\t{\r\n\t\treturn settings.getFileName();\r\n\t}", "public String getFilename()\r\n\t{\r\n\t\treturn _filename; \r\n\t}", "public String getName() { return FilePathUtils.getFileName(getPath()); }", "@java.lang.Override\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 filename_ = s;\n return s;\n }\n }", "@java.lang.Override\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 filename_ = s;\n return s;\n }\n }", "public String getFileName() {\n return filename;\n }", "public String getFILE_NAME() { return FILE_NAME; }", "@Column(length = 500, name = \"FILE_NAME\")\r\n public String getFileName() {\r\n return this.fileName == null ? null : this.fileName.substring(this.fileName.lastIndexOf(File.separator) + 1);\r\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 fileName_ = s;\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 fileName_ = s;\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 fileName_ = s;\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 fileName_ = s;\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 fileName_ = s;\n return s;\n }\n }" ]
[ "0.7703055", "0.7561839", "0.7561839", "0.7505732", "0.7505732", "0.7505732", "0.7505732", "0.7505732", "0.7505732", "0.7505732", "0.7505732", "0.7505732", "0.74738383", "0.74343425", "0.7413032", "0.7392748", "0.7339256", "0.73373574", "0.7302511", "0.7279686", "0.7247085", "0.7233071", "0.7192039", "0.7188298", "0.7182616", "0.7182512", "0.7120664", "0.7104333", "0.7084545", "0.7084545", "0.7076211", "0.7072111", "0.7072111", "0.7072111", "0.7072111", "0.7072111", "0.702732", "0.70193815", "0.7013466", "0.7008816", "0.70007485", "0.69998616", "0.69851893", "0.6977402", "0.69738346", "0.6961448", "0.69552875", "0.69514227", "0.69492567", "0.69415", "0.69336104", "0.6926261", "0.69074214", "0.6894136", "0.6894136", "0.68914497", "0.68914497", "0.68911415", "0.68831843", "0.6881728", "0.6881728", "0.6864752", "0.6864752", "0.6864752", "0.6864752", "0.6864752", "0.6864752", "0.68586504", "0.68569666", "0.6856611", "0.6843761", "0.6843761", "0.68409365", "0.68409365", "0.68409365", "0.6837377", "0.6813789", "0.6813789", "0.6813789", "0.6813506", "0.68096566", "0.6803995", "0.6803995", "0.6803902", "0.6803902", "0.6803902", "0.6803902", "0.6803902", "0.6801512", "0.680113", "0.67986864", "0.6793523", "0.6793523", "0.67914414", "0.6789985", "0.6787449", "0.6781607", "0.6781607", "0.6781607", "0.6781607", "0.6781607" ]
0.0
-1
the full file name, including both the directory and the file name within the directory
public String fullFileName () { if (directory == null || directory.equals("")) return fileName; else return directory + File.separator + fileName; //add a '\' in the path }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 filename() {\n\t int sep = fullPath.lastIndexOf(pathSeparator);\n\t return fullPath.substring(sep + 1);\n\t }", "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 }", "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();", "java.lang.String getFilename();", "java.lang.String getFilename();", "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 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 }", "protected String getFileName()\n {\n return new StringBuilder()\n .append(getInfoAnno().filePrefix())\n .append(getName())\n .append(getInfoAnno().fileSuffix())\n .toString();\n }", "public String getFileName(File f) {\n String[] list = f.toString().split(Pattern.quote(\"\\\\\"));\n return \"...\\\\\" + list[list.length - 1];\n }", "public String getFileName() {\r\n \t\tif (isFileOpened()) {\r\n \t\t\treturn curFile.getName();\r\n \t\t} else {\r\n \t\t\treturn \"\";\r\n \t\t}\r\n \t}", "public String getName() { return FilePathUtils.getFileName(getPath()); }", "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 String getFinalFileName()\r\n\t{\r\n\t\treturn this.getFileName() + this.getFileFormat();\r\n\t}", "public String getName() {\n return dtedDir + \"/\" + filename;\n }", "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 }", "public static String fileName(File file)\n {\n if (file == Configuration.STD_OUT)\n {\n return \"standard output\";\n }\n else\n {\n try\n {\n return file.getCanonicalPath();\n }\n catch (IOException ex)\n {\n return file.getPath();\n }\n }\n }", "String getShortName() {\n final int lastSlash = name.lastIndexOf('/');\n final String fileName = name.substring(lastSlash + 1);\n final int lastDot = fileName.lastIndexOf('.');\n return fileName.substring(0, lastDot);\n }", "String getFullWorkfileName();", "private String getPDFFileName(){\r\n String[] split = inputFilePath.split(\"\\\\\\\\\");\r\n\r\n return split[split.length-1].split(\"\\\\.\")[0];\r\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 static String fileNameAndExt(String fullPath){\n return filename(fullPath) + extension(fullPath);\n }", "public String getName() {\n if (filename != null) {\n int index = filename.lastIndexOf(separatorChar);\n\n if (index >= 0) {\n return filename.substring(index + 1);\n } else {\n if (filename == null) {\n return \"\";\n } else {\n return filename;\n }\n }\n } else {\n return \"\";\n }\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 String getFileName() {\n return String.format(\"%s%o\", this.fileNamePrefix, getIndex());\n }", "String getFileName();", "String getFileName();", "String getFileName();", "String getFileName();", "String getFileName();", "String displayableFileName(String path) {\n String result = \"\";\n StringTokenizer tok = new StringTokenizer(path, \"\\\\/\");\n while (tok.hasMoreTokens()) {\n result = tok.nextToken();\n }\n return result;\n }", "private String nakedFileName() {\n return f.getName().split(\"\\\\.\")[0];\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 String getFileName() {\n\t\treturn file.getFileName();\n\t}", "public String getFileRealName() {\n return fileRealName;\n }", "String getFilename();", "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 String getName() {\n return _file.getAbsolutePath();\n }", "public String getSimpleName() { return FilePathUtils.getFileName(_name); }", "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}", "private static String getResultFilename(String pathToFile) {\n\t\tString result = null;\n\t\tPath originalFilename = Paths.get(pathToFile).getFileName();\n\t\tif(originalFilename != null) {\n\t\t\tlogger.debug(\"A file name exists: {}\", originalFilename.toString());\n\t\t\tString[] nameParts = originalFilename.toString().split(\"[.]\");\n\t\t\tlogger.debug(\"The {} detected part(s) of the file name are:\", nameParts.length);\n\t\t\tresult = \"\";\n\t\t\tfor(int i=0; i<nameParts.length-1; i++) {\n\t\t\t\tlogger.debug(\"Part {}: {}\", i+1, nameParts[i]);\n\t\t\t\tresult += nameParts[i];\n\t\t\t}\n\t\t\tlogger.debug(\"Part {}: {}\", nameParts.length, nameParts[nameParts.length-1]);\n\t\t\tresult += \".csv\";\n\t\t}\n\t\treturn result;\n\t}", "public String getFileName() {\n\t\treturn file.getName();\n\t}", "public String getFileName() {\n return getCellContent(FILE).split(FILE_LINE_SEPARATOR)[0];\n }", "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 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 String path(File f) {\r\n int sep = f.toString().lastIndexOf(\"\\\\\");\r\n return f.toString().substring(0, sep);\r\n }", "@Override\n\tpublic String getFilename() {\n\t\treturn this.path.getFileName().toString();\n\t}", "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}", "public String generateFileName(String midName)\r\n {\r\n return dir + nameBase + midName + nameSuffix;\r\n }", "public static String getFullyQualifiedFileName(String FileName) {\n\t\tString systemRoot = PropertiesFile.getSystemRoot();\n\t\treturn systemRoot + FileName;\n\t}", "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 }", "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 }", "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 final String getFileName() {\n\t\treturn m_info.getFileName();\n\t}", "public String getFilename() {\n\treturn file.getFilename();\n }", "public String getFileName(int index) {\n\t\tFile f = openFiles.get(index);\n\t\tString nom = f.getName().substring(0,f.getName().length()-5);\n\t\treturn nom;\n\t}", "public final String getFileName() {\n\n\t\treturn getValue(FILE_NAME);\n\t}", "public String getFileName();", "public String getFileName();", "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 }", "private static String getEntryName(File source, File file) throws IOException {\n\t\tint index = source.getAbsolutePath().length() + 1;\n\t\tString path = file.getCanonicalPath();\n\n\t\treturn path.substring(index);\n\t}", "public String getFileName ();", "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 }", "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 }", "@Override\n\tpublic String getName() {\n\t\treturn new File(relativePath).getName();\n\t}", "public String getFileName(){\r\n\t\treturn linfo != null ? linfo.getFileName() : \"\";\r\n\t}", "public String getName() {\r\n return mFile.getName();\r\n }", "public String getName()\n {\n return( file );\n }", "public static String getFileName(String urlFileGenerated) {\r\n\r\n\t\tString result = \"\";\r\n\r\n\t\tif (urlFileGenerated != null) {\r\n\t\t\tresult = urlFileGenerated.substring(urlFileGenerated.lastIndexOf(\"/\") + 1);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public String getNameFile(){\n\t\t\treturn this.nameFile;\n\t\t}", "public String getFileName() {\n\t\treturn mItems.getJustFileName();\n\t}", "public String getFirstFilename() {\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\tint count=0;\n\t\tString fileName=null;\n\t\tSet<Double> set = tm.keySet();\n\t\tIterator<Double> it = set.iterator();\n\t\twhile (it.hasNext()) {\n\t\t Object key = it.next();\n\t\t Object objValue = tm.get(key);\n\t\t File tempFile = (File) objValue;\n\t\t if(count==fileNum-2)\n\t\t\t fileName=tempFile.getName();\n\t\t count++;\n\t\t }\n\t\tSystem.out.println(\"第一个log的文件名称-->\"+fileName);\n\t\treturn fileName;\n\t}", "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 String formatFilePath(){\n StringBuilder returnResult = new StringBuilder();\n String temp;\n temp = StringUtil.removeHttpPrefix(uri);\n returnResult.append(DEFAULT_DIRECTORY).append(\"\\\\\").append(temp);\n return returnResult.toString();\n }", "public String getFilename();", "public String getFileName()\n {\n return getString(\"FileName\");\n }", "public String getFileName() {\n if (url.endsWith(\"/\")) {\n url = url.substring(0, url.length() - 1);\n }\n\n //Replace illegal characters\n String urlFileName = url.replace(\"http://\", \"\");\n urlFileName = urlFileName.replace(\"https://\", \"\");\n urlFileName = urlFileName.replace(\"/\", \"\");\n urlFileName += \".txt\";\n\n return urlFileName;\n }", "public static String getFileName(String filePath) {\n int idx = filePath.lastIndexOf('\\\\');\n if (idx >= 0) {\n return getFileName(filePath.substring(idx + 1));\n }\n idx = filePath.lastIndexOf('/');\n if (idx >= 0) {\n return getFileName(filePath.substring(idx + 1));\n }\n return filePath;\n }", "public String getOriginalFileName() {\n if (originalFilePath==null) {\n return null;\n }\n // the path passed is in the client system's format,\n // so test all known path separator chars ('/', '\\' and \"::\" )\n // and pick the one which would create the smallest filename\n // Using Math is rather ugly but at least it is shorter and performs better\n // than Stringtokenizer, regexp, or sorting collections\n int last = Math.max(Math.max(\n originalFilePath.lastIndexOf(':'), // old mac path (::)\n originalFilePath.lastIndexOf('/')), // unix path\n originalFilePath.lastIndexOf('\\\\')); // windows path\n if (last > -1) {\n return originalFilePath.substring(last+1);\n }\n return originalFilePath;\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 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 static String getFileName(String filePath) {\n if (isFileExist(filePath)) {\n return filePath;\n }\n\n int filePosi = filePath.lastIndexOf(File.separator);\n return (filePosi == -1) ? filePath : filePath.substring(filePosi + 1);\n }", "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 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 static String getLastFileName()\r\n\t{\r\n\t\treturn _outputFileName;\r\n\t}", "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 getAbsoluteName() {\n\t\tint index = this.getName().indexOf(\".\");\n\t\tif (index == -1)\n\t\t\treturn this.getName();\n\t\telse\n\t\t\treturn this.getName().substring(0, index);\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 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}", "public String getFile_name() {\n\t\treturn file_name;\n\t}", "public String getFileName()\r\n\t{\r\n\t\treturn settings.getFileName();\r\n\t}", "public String getDisplayFileName() {\r\n return fileName + \" (\" + FileItem.getDisplayFileSize(fileSize) + \")\";\r\n }" ]
[ "0.7828763", "0.78172547", "0.74946404", "0.7481221", "0.7481221", "0.7481221", "0.7481221", "0.7481221", "0.7481221", "0.7481221", "0.7481221", "0.7481221", "0.73428744", "0.73428744", "0.7309326", "0.730645", "0.7271692", "0.72680867", "0.7224304", "0.7208067", "0.71946406", "0.7181156", "0.71145695", "0.70677155", "0.70666444", "0.7056191", "0.697115", "0.696391", "0.6959503", "0.6957822", "0.6930228", "0.6917225", "0.69074255", "0.6900691", "0.6900691", "0.6900691", "0.6900691", "0.6900691", "0.68666434", "0.6859722", "0.6848703", "0.68334305", "0.68169177", "0.68066746", "0.67900866", "0.6776017", "0.6775489", "0.67565703", "0.6736922", "0.67355853", "0.6713884", "0.670879", "0.67061603", "0.66911066", "0.6685055", "0.66844136", "0.6665218", "0.6650257", "0.6636775", "0.6625787", "0.6624948", "0.662168", "0.6588453", "0.6568931", "0.6566397", "0.6565559", "0.6565559", "0.64977103", "0.6494821", "0.6487136", "0.6486165", "0.6481662", "0.64689666", "0.6462215", "0.6458093", "0.64502674", "0.64335835", "0.64133406", "0.64125896", "0.640298", "0.63895005", "0.63840497", "0.6372385", "0.6369063", "0.63638264", "0.6350657", "0.6343303", "0.634197", "0.63271135", "0.63199496", "0.6319395", "0.63154113", "0.63097835", "0.6308705", "0.62981194", "0.62978643", "0.6295472", "0.6271307", "0.6270755", "0.62661076" ]
0.8636382
0
Processes requests for both HTTP GET and POST methods.
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {\n final String method = req.getParameter(METHOD);\n if (GET.equals(method)) {\n doGet(req, resp);\n } else {\n resp.setStatus(HttpServletResponse.SC_METHOD_NOT_ALLOWED);\n }\n }", "private void processRequest(HttpServletRequest request, HttpServletResponse response) {\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n // only POST should be used\n doPost(request, response);\n }", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\nSystem.err.println(\"=====================>>>>>123\");\n\t\tString key=req.getParameter(\"method\");\n\t\tswitch (key) {\n\t\tcase \"1\":\n\t\t\tgetProvinces(req,resp);\n\t\t\tbreak;\n\t\tcase \"2\":\n\t\t\tgetCities(req,resp);\t\t\t\n\t\t\tbreak;\n\t\tcase \"3\":\n\t\t\tgetAreas(req,resp);\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tprocess(req, resp);\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\t\tdoPost(req, resp);\r\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\n\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\r\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\n \tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n \t\t\tthrows ServletException, IOException {\n \t\tdoPost(req, resp);\n \t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t\tdoGet(req, resp);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n processRequest(request, response);\n }", "@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tprocessRequest(request, response);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tprocessRequest(request, response);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t\t\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\n\t\tprocess(req,resp);\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }" ]
[ "0.70041305", "0.6658495", "0.6603461", "0.650908", "0.6447329", "0.6442597", "0.6440696", "0.64322716", "0.6428243", "0.64247036", "0.64247036", "0.64201605", "0.64201605", "0.64201605", "0.6418442", "0.64144915", "0.64144915", "0.6400502", "0.6394304", "0.6394304", "0.63930726", "0.6392306", "0.6392306", "0.6390661", "0.6390661", "0.6390661", "0.6390661", "0.6388885", "0.6388885", "0.6380431", "0.6378519", "0.6378405", "0.6377094", "0.63764083", "0.6370683", "0.6362919", "0.6362919", "0.6361669", "0.63554734", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932", "0.6354932" ]
0.0
-1
Handles the HTTP GET method.
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //Edita as allergias do user String urlbase = "/trabalho2_so2_FINAL/jsp/Perfil.jsp"; PropretiesGetter propriedades = new PropretiesGetter(); String host = propriedades.getProperties("host"); String bd = propriedades.getProperties("bd"); String username = propriedades.getProperties("user"); String password = propriedades.getProperties("pw"); DataBaseManager db = new DataBaseManager(host, bd, username, password); int size = db.getAllAllergy().size();//Numero de alergias que a web app permite (4) HttpSession session = request.getSession(); User user = (User) session.getAttribute("login"); ArrayList<Allergy> allergies = new ArrayList(); //Ciclo for para apanhar as allergias "checked" pelo user for (int i = 0; i < size; i++) { if (request.getParameter("Allergy" + i) != null) { Allergy allTemp = new Allergy(request.getParameter("Allergy" + i)); allergies.add(allTemp); } } user.setAllergies(allergies); //Set allergias novas User edited = db.editUser(user); //update na base de dados session.setAttribute("login", edited); //update do user no jsp response.sendRedirect(urlbase); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doGet( )\n {\n \n }", "@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}", "@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}", "@Override\r\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\r\n\t}", "void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metGet(request, response);\n }", "public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException {\r\n\tlogTrace( req, \"GET log\" );\r\n\tString requestId = req.getQueryString();\r\n\tif (requestId == null) return;\r\n\tif (\"get-response\".equals( requestId )) {\r\n\t try {\r\n\t\tonMEVPollsForResponse( req, resp );\r\n\t } catch (Exception e) {\r\n\t\tlogError( req, resp, e, \"MEV polling error\" );\r\n\t\tsendError( resp, \"MEV polling error: \" + e.toString() );\r\n\t }\r\n\t}\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n \r\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t\t\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}", "public void doGet() throws IOException {\n\n // search ressource\n byte[] contentByte = null;\n try {\n contentByte = ToolBox.readFileByte(RESOURCE_DIRECTORY, this.url);\n this.statusCode = OK;\n ContentType contentType = new ContentType(this.extension);\n sendHeader(statusCode, contentType.getContentType(), contentByte.length);\n } catch (IOException e) {\n System.out.println(\"Ressource non trouvé\");\n statusCode = NOT_FOUND;\n contentByte = ToolBox.readFileByte(RESPONSE_PAGE_DIRECTORY, \"pageNotFound.html\");\n sendHeader(statusCode, \"text/html\", contentByte.length);\n }\n\n this.sendBodyByte(contentByte);\n }", "public HttpResponseWrapper invokeGET(String path) {\n\t\treturn invokeHttpMethod(HttpMethodType.HTTP_GET, path, \"\");\n\t}", "@Override\n\tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t}", "public Result get(Get get) throws IOException;", "@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) {\n System.out.println(\"[Servlet] GET request \" + request.getRequestURI());\n\n response.setContentType(FrontEndServiceDriver.APP_TYPE);\n response.setStatus(HttpURLConnection.HTTP_BAD_REQUEST);\n\n try {\n String url = FrontEndServiceDriver.primaryEventService +\n request.getRequestURI().replaceFirst(\"/events\", \"\");\n HttpURLConnection connection = doGetRequest(url);\n\n if (connection.getResponseCode() == HttpURLConnection.HTTP_OK) {\n PrintWriter pw = response.getWriter();\n JsonObject responseBody = (JsonObject) parseResponse(connection);\n\n response.setStatus(HttpURLConnection.HTTP_OK);\n pw.println(responseBody.toString());\n }\n }\n catch (Exception ignored) {}\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tSystem.out.println(\"get\");\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \tSystem.out.println(\"---here--get--\");\n processRequest(request, response);\n }", "@Override\n public final void doGet() {\n try {\n checkPermissions(getRequest());\n // GET one\n if (id != null) {\n output(api.runGet(id, getParameterAsList(PARAMETER_DEPLOY), getParameterAsList(PARAMETER_COUNTER)));\n } else if (countParameters() == 0) {\n throw new APIMissingIdException(getRequestURL());\n }\n // Search\n else {\n\n final ItemSearchResult<?> result = api.runSearch(Integer.parseInt(getParameter(PARAMETER_PAGE, \"0\")),\n Integer.parseInt(getParameter(PARAMETER_LIMIT, \"10\")), getParameter(PARAMETER_SEARCH),\n getParameter(PARAMETER_ORDER), parseFilters(getParameterAsList(PARAMETER_FILTER)),\n getParameterAsList(PARAMETER_DEPLOY), getParameterAsList(PARAMETER_COUNTER));\n\n head(\"Content-Range\", result.getPage() + \"-\" + result.getLength() + \"/\" + result.getTotal());\n\n output(result.getResults());\n }\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n }\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tthis.service(req, resp);\r\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\n\t}", "@RequestMapping(value = \"/{id}\", method = RequestMethod.GET)\n public void get(@PathVariable(\"id\") String id, HttpServletRequest req){\n throw new NotImplementedException(\"To be implemented\");\n }", "@Override\npublic void get(String url) {\n\t\n}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString action = req.getParameter(\"action\");\r\n\t\t\r\n\t\tif(action == null) {\r\n\t\t\taction = \"List\";\r\n\t\t}\r\n\t\t\r\n\t\tswitch(action) {\r\n\t\t\tcase \"List\":\r\n\t\t\t\tlistUser(req, resp);\r\n\t\t\t\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tlistUser(req, resp);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest request, \n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tSystem.out.println(\"Routed to doGet\");\n\t}", "@NonNull\n public String getAction() {\n return \"GET\";\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\n\t\tprocess(req,resp);\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "@Override\r\nprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t process(req,resp);\r\n\t }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tprocess(req, resp);\n\t}", "@Override\n\tpublic HttpResponse get(final String endpoint) {\n\t\treturn httpRequest(HTTP_GET, endpoint, null);\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste doget\");\r\n }", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/plain\");\n // Actual logic goes here.\n PrintWriter out = response.getWriter();\n out.println(\"Wolken,5534-0848-5100,0299-6830-9164\");\n\ttry \n\t{\n Get g = new Get(Bytes.toBytes(request.getParameter(\"userid\")));\n Result r = table.get(g);\n byte [] value = r.getValue(Bytes.toBytes(\"v\"),\n Bytes.toBytes(\"\"));\n\t\tString valueStr = Bytes.toString(value);\n\t\tout.println(valueStr);\n\t}\n\tcatch (Exception e)\n\t{\n\t\tout.println(e);\n\t}\n }", "@Override\r\n public void doGet(String path, HttpServletRequest request, HttpServletResponse response)\r\n throws Exception {\r\n // throw new UnsupportedOperationException();\r\n System.out.println(\"Inside the get\");\r\n response.setContentType(\"text/xml\");\r\n response.setCharacterEncoding(\"utf-8\");\r\n final Writer w = response.getWriter();\r\n w.write(\"inside the get\");\r\n w.close();\r\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n System.out.println(\"Console: doGET visited\");\n String result = \"\";\n //get the user choice from the client\n String choice = (request.getPathInfo()).substring(1);\n response.setContentType(\"text/plain;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n //methods call appropriate to user calls\n if (Integer.valueOf(choice) == 3) {\n result = theBlockChain.toString();\n if (result != null) {\n out.println(result);\n response.setStatus(200);\n //set status if result output is not generated\n } else {\n response.setStatus(401);\n return;\n }\n }\n //verify chain method\n if (Integer.valueOf(choice) == 2) {\n response.setStatus(200);\n boolean validity = theBlockChain.isChainValid();\n out.print(\"verifying:\\nchain verification: \");\n out.println(validity);\n }\n }", "public void handleGet( HttpExchange exchange ) throws IOException {\n switch( exchange.getRequestURI().toString().replace(\"%20\", \" \") ) {\n case \"/\":\n print(\"sending /MainPage.html\");\n sendResponse( exchange, FU.readFromFile( getReqDir( exchange )), 200);\n break;\n case \"/lif\":\n // send log in page ( main page )\n sendResponse ( exchange, FU.readFromFile(getReqDir(exchange)), 200);\n //\n break;\n case \"/home.html\":\n\n break;\n case \"/book.html\":\n\n break;\n default:\n //checks if user is logged in\n\n //if not send log in page\n //if user is logged in then\n print(\"Sending\");\n String directory = getReqDir( exchange ); // dont need to do the / replace as no space\n File page = new File( getReqDir( exchange) );\n\n // IMPLEMENT DIFFERENT RESPONSE CODE FOR HERE IF EXISTS IS FALSE OR CAN READ IS FALSE\n sendResponse(exchange, FU.readFromFile(directory), 200);\n break;\n }\n }", "@Override\n public DataObjectResponse<T> handleGET(DataObjectRequest<T> request)\n {\n if(getRequestValidator() != null) getRequestValidator().validateGET(request);\n\n DefaultDataObjectResponse<T> response = new DefaultDataObjectResponse<>();\n try\n {\n VisibilityFilter<T, DataObjectRequest<T>> visibilityFilter = visibilityFilterMap.get(VisibilityMethod.GET);\n List<Query> queryList = new LinkedList<>();\n if(request.getQueries() != null)\n queryList.addAll(request.getQueries());\n\n if(request.getId() != null)\n {\n // if the id is specified\n queryList.add(new ById(request.getId()));\n }\n\n DataObjectFeed<T> feed = objectPersister.retrieve(queryList);\n if(feed == null)\n feed = new DataObjectFeed<>();\n List<T> filteredObjects = visibilityFilter.filterByVisible(request, feed.getAll());\n response.setCount(feed.getCount());\n response.addAll(filteredObjects);\n }\n catch(PersistenceException e)\n {\n ObjectNotFoundException objectNotFoundException = new ObjectNotFoundException(String.format(OBJECT_NOT_FOUND_EXCEPTION, request.getId()), e);\n response.setErrorResponse(ErrorResponseFactory.objectNotFound(objectNotFoundException, request.getCID()));\n }\n return response;\n }", "public int handleGET(String requestURL) throws ClientProtocolException, IOException{\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\thttpGet = new HttpGet(requestURL);\t\t\r\n\t\t\t\t\t\t\r\n\t\tinputsource=null;\r\n\t\t\t\r\n\t\toutputString=\"\";\r\n\t\t\r\n\t\t//taking response by executing http GET object\r\n\t\tCloseableHttpResponse response = httpclient.execute(httpGet);\t\t\r\n\t\r\n\t\t/* \r\n\t\t * \tThe underlying HTTP connection is still held by the response object\r\n\t\t\tto allow the response content to be streamed directly from the network socket.\r\n\t\t\tIn order to ensure correct deallocation of system resources\r\n\t\t\tthe user MUST call CloseableHttpResponse.close() from a finally clause.\r\n\t\t\tPlease note that if response content is not fully consumed the underlying\r\n\t\t\tconnection cannot be safely re-used and will be shut down and discarded\r\n\t\t\tby the connection manager.\r\n\t\t */\r\n\t\t\r\n\t\t\tstatusLine= response.getStatusLine().toString();\t\t//status line\r\n\t\t\t\r\n\t\t\tHttpEntity entity1 = response.getEntity();\t\t\t\t//getting response entity from server response \t\r\n\t\t\t\t\t\r\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(entity1.getContent()));\r\n\r\n\t\t\tString line;\r\n\t\t\twhile((line=br.readLine())!=null)\r\n\t\t\t{\r\n\t\t\t\toutputString=outputString+line.toString();\r\n\t }\r\n\t\t\t\r\n\t\t\t//removing spaces around server response string.\r\n\t\t\toutputString.trim();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t//converting server response string into InputSource.\r\n\t\t\tinputsource = new InputSource(new StringReader(outputString));\t\r\n\t\t\t\r\n\t\t\t// and ensure it is fully consumed\r\n\t\t\tEntityUtils.consume(entity1);\t\t\t//consuming entity.\r\n\t\t\tresponse.close();\t\t\t\t\t\t//closing response.\r\n\t\t\tbr.close();\t\t\t\t\t\t\t\t//closing buffered reader\r\n\t\t\t\r\n\t\t\t//returning response code\r\n\t\t\treturn response.getStatusLine().getStatusCode();\r\n\t\r\n\t}", "@Override\n\tprotected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t logger.error(\"BISHUNNN CALLED\");\n\t\tString category = request.getParameter(\"category\").trim();\n\t\tGetHttpCall getHttpCall = new GetHttpCall();\n\t\turl = APIConstants.baseURL+category.toLowerCase();\n\t\tresponseString = getHttpCall.execute(url);\n\t\tresponse.getWriter().write(responseString);\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n //processRequest(request, response);\r\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tPrintWriter out = resp.getWriter();\n\t\tout.print(\"<h1>Hello from your doGet method!</h1>\");\n\t}", "public void doGet(HttpServletRequest request,\n HttpServletResponse response)\n throws IOException, ServletException {\n response.setContentType(TYPE_TEXT_HTML.label);\n response.setCharacterEncoding(UTF8.label);\n request.setCharacterEncoding(UTF8.label);\n String path = request.getRequestURI();\n logger.debug(RECEIVED_REQUEST + path);\n Command command = null;\n try {\n command = commands.get(path);\n command.execute(request, response);\n } catch (NullPointerException e) {\n logger.error(REQUEST_PATH_NOT_FOUND);\n request.setAttribute(JAVAX_SERVLET_ERROR_STATUS_CODE, 404);\n command = commands.get(EXCEPTION.label);\n command.execute(request, response);\n }\n }", "public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString search = req.getParameter(\"searchBook\");\n\t\tString output=search;\n\n\t\t//redirect output to view search.jsp\n\t\treq.setAttribute(\"output\", output);\n\t\tresp.setContentType(\"text/json\");\n\t\tRequestDispatcher view = req.getRequestDispatcher(\"search.jsp\");\n\t\tview.forward(req, resp);\n\t\t\t\n\t}", "public void doGet( HttpServletRequest request, HttpServletResponse response )\n throws ServletException, IOException\n {\n handleRequest( request, response, false );\n }", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t}", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n public Response handleGet() {\n Gson gson = GSONFactory.getInstance();\n List allEmployees = getAllEmployees();\n\n if (allEmployees == null) {\n allEmployees = new ArrayList();\n }\n\n Response response = Response.ok().entity(gson.toJson(allEmployees)).build();\n return response;\n }", "@Override\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows IOException, ServletException {\n\t\tsuper.doGet(request, response);\t\t\t\n\t}", "private static String sendGET(String getURL) throws IOException {\n\t\tURL obj = new URL(getURL);\n\t\tHttpURLConnection con = (HttpURLConnection) obj.openConnection();\n\t\tcon.setRequestMethod(\"GET\");\n\t\tString finalResponse = \"\";\n\n\t\t//This way we know if the request was processed successfully or there was any HTTP error message thrown.\n\t\tint responseCode = con.getResponseCode();\n\t\tSystem.out.println(\"GET Response Code : \" + responseCode);\n\t\tif (responseCode == HttpURLConnection.HTTP_OK) { // success\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n\t\t\tString inputLine;\n\t\t\tStringBuffer buffer = new StringBuffer();\n\n\t\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\t\tbuffer.append(inputLine);\n\t\t\t}\n\t\t\tin.close();\n\n\t\t\t// print result\n\t\t\tfinalResponse = buffer.toString();\n\t\t} else {\n\t\t\tSystem.out.println(\"GET request not worked\");\n\t\t}\n\t\treturn finalResponse;\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //processRequest(request, response);\n }", "public BufferedReader reqGet(final String route) throws\n ServerStatusException, IOException {\n System.out.println(\"first reqGet\");\n return reqGet(route, USER_AGENT);\n }", "@Override\n \tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n \t\t\tthrows ServletException, IOException {\n \t\tdoPost(req, resp);\n \t}", "HttpGet getRequest(HttpServletRequest request, String address) throws IOException;", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override \r\nprotected void doGet(HttpServletRequest request, HttpServletResponse response) \r\nthrows ServletException, IOException { \r\nprocessRequest(request, response); \r\n}", "protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\n String action = request.getParameter(\"action\");\r\n\r\n try {\r\n switch (action)\r\n {\r\n case \"/getUser\":\r\n \tgetUser(request, response);\r\n break;\r\n \r\n }\r\n } catch (Exception ex) {\r\n throw new ServletException(ex);\r\n }\r\n }", "@Override\n protected void doGet\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\n\t}", "@Test\r\n\tpublic void doGet() throws Exception {\n\t\tCloseableHttpClient httpClient = HttpClients.createDefault();\r\n\t\t// Create a GET object and pass a url to it\r\n\t\tHttpGet get = new HttpGet(\"http://www.google.com\");\r\n\t\t// make a request\r\n\t\tCloseableHttpResponse response = httpClient.execute(get);\r\n\t\t// get response as result\r\n\t\tSystem.out.println(response.getStatusLine().getStatusCode());\r\n\t\tHttpEntity entity = response.getEntity();\r\n\t\tSystem.out.println(EntityUtils.toString(entity));\r\n\t\t// close HttpClient\r\n\t\tresponse.close();\r\n\t\thttpClient.close();\r\n\t}", "private void requestGet(String endpoint, Map<String, String> params, RequestListener listener) throws Exception {\n String requestUri = Constant.API_BASE_URL + ((endpoint.indexOf(\"/\") == 0) ? endpoint : \"/\" + endpoint);\n get(requestUri, params, listener);\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tint i = request.getRequestURI().lastIndexOf(\"/\") + 1;\n\t\tString action = request.getRequestURI().substring(i);\n\t\tSystem.out.println(action);\n\t\t\n\t\tString view = \"Error\";\n\t\tObject model = \"service Non disponible\";\n\t\t\n\t\tif (action.equals(\"ProductsList\")) {\n\t\t\tview = productAction.productsList();\n\t\t\tmodel = productAction.getProducts();\n\t\t}\n\t\t\n\t\trequest.setAttribute(\"model\", model);\n\t\trequest.getRequestDispatcher(prefix + view + suffix).forward(request, response); \n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t throws ServletException, IOException {\n\tprocessRequest(request, response);\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tcommandAction(request,response);\r\n\t}" ]
[ "0.7589819", "0.71670026", "0.71134603", "0.7056349", "0.7030202", "0.70289457", "0.6996126", "0.6975816", "0.6888662", "0.6873633", "0.6853793", "0.6843488", "0.6843488", "0.68354696", "0.68354696", "0.68354696", "0.6819225", "0.6818393", "0.6797782", "0.6780766", "0.6761152", "0.67546815", "0.67546815", "0.67403847", "0.67188615", "0.67158395", "0.67054987", "0.67054987", "0.6701152", "0.6684633", "0.66776204", "0.6675632", "0.6675632", "0.6674378", "0.6674378", "0.6668488", "0.66617364", "0.66617364", "0.66477805", "0.6636472", "0.66167665", "0.66129434", "0.6603993", "0.6570445", "0.6551127", "0.6538683", "0.6536589", "0.6535939", "0.6496197", "0.64664567", "0.64521563", "0.64508563", "0.64114493", "0.64114493", "0.64114493", "0.64114493", "0.64114493", "0.64114493", "0.64114493", "0.64114493", "0.64114493", "0.64114493", "0.64114493", "0.64114493", "0.64072937", "0.6396223", "0.63798064", "0.63737595", "0.6359885", "0.63581914", "0.6341077", "0.6309777", "0.6306383", "0.630272", "0.63026774", "0.6283587", "0.6275156", "0.62678796", "0.62581164", "0.6255567", "0.62503594", "0.6245187", "0.6239602", "0.6239602", "0.6238581", "0.6235405", "0.6215722", "0.6212377", "0.6206887", "0.6206634", "0.6204746", "0.6200539", "0.6199529", "0.6188366", "0.6182832", "0.61764896", "0.6175472", "0.6173032", "0.6171852", "0.61701643", "0.61690634" ]
0.0
-1
Handles the HTTP POST method.
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }", "public void doPost( )\n {\n \n }", "@Override\n public String getMethod() {\n return \"POST\";\n }", "public String post();", "@Override\n\tpublic void doPost(HttpRequest request, AbstractHttpResponse response)\n\t\t\tthrows IOException {\n\t\t\n\t}", "@Override\n public String getMethod() {\n return \"POST\";\n }", "public ResponseTranslator post() {\n setMethod(\"POST\");\n return doRequest();\n }", "protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n }", "public void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows IOException {\n\n\t}", "public void postData() {\n\n\t}", "@Override\n public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {\n logger.warn(\"doPost Called\");\n handle(req, res);\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metPost(request, response);\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tpublic void postHandle(WebRequest request, ModelMap model) throws Exception {\n\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\r\n\t\t\r\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "@Override\n\tprotected HttpMethod requestMethod() {\n\t\treturn HttpMethod.POST;\n\t}", "@Override\n\tprotected void handlePostBody(HashMap<String, HashMap<String, String>> params, DataFormat format) throws Exception {\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n }", "@Override\n\tprotected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\n\n\tpublic void handlePOST(CoapExchange exchange) {\n\t\tFIleStream read = new FIleStream();\n\t\tread.tempWrite(Temp_Path, exchange.getRequestText());\n\t\texchange.respond(ResponseCode.CREATED, \"POST successfully!\");\n\t\t_Logger.info(\"Receive post request:\" + exchange.getRequestText());\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.getWriter().println(\"go to post method in manager\");\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "public abstract boolean handlePost(FORM form, BindException errors) throws Exception;", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n super.doPost(req, resp);\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\n\t\t\t\n\t\t \n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "public void processPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException\n {\n }", "@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}", "@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\n\t}", "public void doPost(HttpServletRequest request ,HttpServletResponse response){\n\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "public void post(){\n\t\tHttpClient client = new HttpClient();\n\n\t\tPostMethod post = new PostMethod(\"http://211.138.245.85:8000/sso/POST\");\n//\t\tPostMethod post = new PostMethod(\"/eshopclient/product/show.do?id=111655\");\n//\t\tpost.addRequestHeader(\"Cookie\", cookieHead);\n\n\n\t\ttry {\n\t\t\tSystem.out.println(\"��������====\");\n\t\t\tint status = client.executeMethod(post);\n\t\t\tSystem.out.println(status);\n\t\t} catch (HttpException 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\ttaskCount++;\n//\t\tcountDown--;\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException {\r\n\tlogTrace( req, \"POST log\" );\r\n\tString requestId = req.getQueryString();\r\n\tif (requestId == null) {\r\n\t try {\r\n\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t } catch (IOException ex) {\r\n\t }\r\n\t logError( req, resp, new Exception(\"Unrecognized POST\"), \"\" );\r\n\t sendError(resp, \"Unrecognized POST\");\r\n\t} else\r\n\t if (\"post-request\".equals( requestId )) {\r\n\t\ttry {\r\n\t\t onMEVPostsRequest( req, resp );\r\n\t\t} catch (Exception e) {\r\n\t\t try {\r\n\t\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t\t } catch (IOException ex) {\r\n\t\t }\r\n\t\t logError( req, resp, e, \"MEV POST error\" );\r\n\t\t sendError( resp, \"MEV POST error: \" + e.toString() );\r\n\t\t}\r\n\t } else if (\"post-response\".equals( requestId )) {\r\n\t\ttry {\r\n\t\t onPVMPostsResponse( req, resp );\r\n\t\t} catch (Exception e) {\r\n\t\t try {\r\n\t\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t\t } catch (IOException ex) {\r\n\t\t }\r\n\t\t logError( req, resp, e, \"PVM POST error\" );\r\n\t\t sendError( resp, \"PVM POST error: \" + e.toString() );\r\n\t\t}\r\n\t }\r\n }", "@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest req, HttpServletResponse resp, Object handler, ModelAndView m)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t}", "@Override\n public final void doPost() {\n try {\n checkPermissions(getRequest());\n final IItem jSonStreamAsItem = getJSonStreamAsItem();\n final IItem outputItem = api.runAdd(jSonStreamAsItem);\n\n output(JSonItemWriter.itemToJSON(outputItem));\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n\n }\n }", "@Override\n\tvoid post() {\n\t\t\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\t\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\tSystem.out.println(\"=========interCpetor Post=========\");\r\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tString method = request.getParameter(\"method\");\n\t\tswitch(method){\n\t\tcase \"Crawl\":\n\t\t\tcrawl(request, response);\n\t\t\tbreak;\n\t\tcase \"Extract\":\n\t\t\textract(request, response);\n\t\t\tbreak;\n\t\tcase \"JDBC\":\n\t\t\tjdbc(request, response);\n\t\t\tbreak;\n\t\tcase \"Indexer\":\n\t\t\tindexer(request, response);\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste dopost\");\r\n }", "protected void doPost(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response)\r\n\t/* 43: */throws ServletException, IOException\r\n\t/* 44: */{\r\n\t\t/* 45:48 */doGet(request, response);\r\n\t\t/* 46: */}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tprocess(req, resp);\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\tprocess(req,resp);\r\n\t}", "public void handlePost(SessionSrvc session, IObjectContext context)\n throws Exception\n {\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response) {\n\t\tdoGet(request, response);\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response) {\n\t\tdoGet(request, response);\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tdoGet(request, response);\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\t}", "@Override\n protected void doPost\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n processRequest(request, response);\r\n } catch (JSONException ex) {\r\n Logger.getLogger(PDCBukUpload.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "@Override\r\n protected void doPost(HttpServletRequest request,\r\n HttpServletResponse response)\r\n throws ServletException,\r\n IOException {\r\n processRequest(request,\r\n response);\r\n\r\n }", "@Override\r\n\tpublic void doPost(CustomHttpRequest request, CustomHttpResponse response) throws Exception {\n\t\tdoGet(request, response);\r\n\t}", "@Override\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response,\n\t\t\tObject handler, ModelAndView modelAndView) throws Exception {\n\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoHandle(request, response);\n\t}", "private void postRequest() {\n\t\tSystem.out.println(\"post request, iam playing money\");\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\n public void postHandle(HttpServletRequest request,\n HttpServletResponse response, Object handler,\n ModelAndView modelAndView) throws Exception {\n\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (Exception ex) {\n Logger.getLogger(PedidoController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }" ]
[ "0.73289514", "0.71383566", "0.7116213", "0.7105215", "0.7100045", "0.70236707", "0.7016248", "0.6964149", "0.6889435", "0.6784954", "0.67733276", "0.67482096", "0.66677034", "0.6558593", "0.65582114", "0.6525548", "0.652552", "0.652552", "0.652552", "0.65229493", "0.6520197", "0.6515622", "0.6513045", "0.6512626", "0.6492367", "0.64817846", "0.6477479", "0.64725804", "0.6472099", "0.6469389", "0.6456206", "0.6452577", "0.6452577", "0.6452577", "0.6450273", "0.6450273", "0.6438126", "0.6437522", "0.64339423", "0.64253825", "0.6422238", "0.6420897", "0.6420897", "0.6420897", "0.6407662", "0.64041835", "0.64041835", "0.639631", "0.6395677", "0.6354875", "0.63334197", "0.6324263", "0.62959254", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6280875", "0.6272104", "0.6272104", "0.62711537", "0.62616795", "0.62544584", "0.6251865", "0.62274224", "0.6214439", "0.62137586", "0.621211", "0.620854", "0.62023044", "0.61775357", "0.61775357", "0.61775357", "0.61775357", "0.61775357", "0.61775357", "0.61775357", "0.61638993", "0.61603814", "0.6148914", "0.61465937", "0.61465937", "0.614548", "0.6141879", "0.6136717", "0.61313903", "0.61300284", "0.6124381", "0.6118381", "0.6118128", "0.61063534", "0.60992104", "0.6098801", "0.6096766" ]
0.0
-1
Returns a short description of the servlet.
@Override public String getServletInfo() { return "Short description"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getServletInfo()\n {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\r\n public String getServletInfo()\r\n {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo()\n {\n return \"Short description\";\n }", "@Override\r\n\tpublic String getServletInfo() {\r\n\t\treturn \"Short description\";\r\n\t}", "@Override\r\n public String getServletInfo()\r\n {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }" ]
[ "0.87634975", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8531295", "0.8531295", "0.85282224", "0.85282224", "0.85282224", "0.8527433", "0.8527433", "0.8527433", "0.8527433", "0.8527433", "0.8527433", "0.8516995", "0.8512296", "0.8511239", "0.8510324", "0.84964365", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599" ]
0.0
-1
/ renamed from: a
public final int mo4456a(C1902e c1902e, C1202f c1202f) { AppMethodBeat.m2504i(102744); if (this.scene == 0 && (this.mgt == null || this.mgt.size() == 0)) { AppMethodBeat.m2505o(102744); return -1; } bcb bcb = (bcb) this.ehh.fsG.fsP; bcb.wGE = this.mgt.size(); if (this.mgs != null) { bcb.wGG = this.mgs.size(); bcb.vKB = this.mgs; } else { bcb.wGG = 0; bcb.vKB = new LinkedList(); } if (!C5046bo.isNullOrNil(this.mgu)) { bcb.wGH = this.mgu; } bcb.wGE = this.mgt.size(); bcb.wGF = this.mgt; bcb.vEp = this.mgq; bcb.Scene = this.scene; this.ehi = c1202f; int a = mo4457a(c1902e, this.ehh, this); AppMethodBeat.m2505o(102744); return a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
public final void mo4498a(int i, int i2, int i3, String str, C1929q c1929q, byte[] bArr) { AppMethodBeat.m2504i(102745); C4990ab.m7410d("MicroMsg.Fav.NetSceneModFavItem", "favId: " + this.mgq + ", netId : " + i + " errType :" + i2 + " errCode: " + i3 + " errMsg :" + str); this.ehi.onSceneEnd(i2, i3, str, this); C39037b.m66383d(((C7604ae) C1720g.m3530M(C7604ae.class)).getFavItemInfoStorage().mo23694iF((long) this.mgq)); AppMethodBeat.m2505o(102745); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.6249595", "0.6242955", "0.61393225", "0.6117684", "0.61140615", "0.60893875", "0.6046927", "0.60248226", "0.60201806", "0.59753186", "0.5947817", "0.5912414", "0.5883872", "0.5878469", "0.587005", "0.58678955", "0.58651674", "0.5857262", "0.58311176", "0.58279663", "0.58274275", "0.5794977", "0.57889086", "0.57837564", "0.5775938", "0.57696944", "0.57688814", "0.5752557", "0.5690739", "0.5678386", "0.567034", "0.56661606", "0.56595623", "0.56588095", "0.56576085", "0.5654566", "0.56445956", "0.56401736", "0.5638699", "0.56305", "0.56179273", "0.56157446", "0.5607045", "0.5605239", "0.5600648", "0.5595156", "0.55912733", "0.5590759", "0.5573802", "0.5556659", "0.55545336", "0.5550466", "0.5549409", "0.5544484", "0.55377364", "0.55291194", "0.55285007", "0.55267704", "0.5525843", "0.5522067", "0.5520236", "0.55098593", "0.5507351", "0.5488173", "0.54860324", "0.54823226", "0.5481975", "0.5481588", "0.5480086", "0.5478032", "0.54676044", "0.5463578", "0.54506475", "0.54438734", "0.5440832", "0.5440053", "0.5432095", "0.5422814", "0.5421934", "0.54180306", "0.5403851", "0.5400144", "0.5400042", "0.5394655", "0.53891194", "0.5388751", "0.53749055", "0.53691155", "0.53590924", "0.5356525", "0.5355397", "0.535498", "0.5354871", "0.535003", "0.5341249", "0.5326222", "0.53232485", "0.53197914", "0.5316941", "0.5311645", "0.5298656" ]
0.0
-1
END OF MAIN METHODS: This method import an aircraft and it's operating conditions from an .xml file overwriting imported data on the default aircraft ones.
public void importUsingCustomXML(OperatingConditions operatingConditions, Aircraft aircraft, ACAnalysisManager analysis, String inFilePathNoExt) { System.out.println("\n ----- STARTED IMPORTING DATA FROM THE XML CUSTOM FILE -----\n"); // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // STATIC FUNCTIONS - TO BE CALLED BEFORE EVERYTHING ELSE JPADWriteUtils.buildXmlTree(); JPADXmlReader _theReadUtilities = new JPADXmlReader(aircraft, operatingConditions, inFilePathNoExt); _theReadUtilities.importAircraftAndOperatingConditions(aircraft, operatingConditions, inFilePathNoExt); System.out.println("\n\n"); System.out.println("\t\tCurrent Mach after importing = " + operatingConditions.get_machCurrent()); System.out.println("\t\tCurrent Altitude after importing = " + operatingConditions.get_altitude()); System.out.println("\n\n"); System.out.println("\t\tCurrent MTOM after importing = " + aircraft.get_weights().get_MTOM()); System.out.println("\n\n"); //------------------------------------------------------------------- // Export/Serialize JPADDataWriter writer = new JPADDataWriter(operatingConditions, aircraft, analysis); String myExportedFile = inFilePathNoExt + "b" + ".xml"; writer.exportToXMLfile(myExportedFile); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void loadAircraftData(Path p) throws DataLoadingException {\t\r\n\t\ttry {\r\n\t\t\t//open the file\r\n\t\t\tBufferedReader reader = Files.newBufferedReader(p);\r\n\t\t\t\r\n\t\t\t//read the file line by line\r\n\t\t\tString line = \"\";\r\n\t\t\t\r\n\t\t\t//skip the first line of the file - headers\r\n\t\t\treader.readLine();\r\n\t\t\t\r\n\t\t\twhile( (line = reader.readLine()) != null) {\r\n\t\t\t\t//each line has fields separated by commas, split into an array of fields\r\n\t\t\t\tString[] fields = line.split(\",\");\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//Creating an Aircraft object\r\n\t\t\t\tAircraft loadingIn = new Aircraft();\r\n\t\t\t\t\r\n\t\t\t\t//put some of the fields into variables: check which fields are where atop the CSV file itself\r\n\t\t\t\tloadingIn.setTailCode(fields[0]);\r\n\t\t\t\tloadingIn.setTypeCode(fields[1]);\r\n\t\t\t\t//Checking the manufacturer and setting it\r\n\t\t\t\tManufacturer manufacturer = null;\r\n\t\t\t\tString mString = fields[2];\r\n\t\t\t\tif(mString.equals(\"Boeing\"))\r\n\t\t\t\t\tmanufacturer = Manufacturer.BOEING;\r\n\t\t\t\telse if(mString.equals(\"Airbus\"))\r\n\t\t\t\t\tmanufacturer = Manufacturer.AIRBUS;\r\n\t\t\t\telse if(mString.equals(\"Bombardier\"))\r\n\t\t\t\t\tmanufacturer = Manufacturer.BOMBARDIER;\r\n\t\t\t\telse if(mString.equals(\"Embraer\"))\r\n\t\t\t\t\tmanufacturer = Manufacturer.EMBRAER;\r\n\t\t\t\telse if(mString.equals(\"Fokker\"))\r\n\t\t\t\t\tmanufacturer = Manufacturer.FOKKER;\r\n\t\t\t\telse\r\n\t\t\t\t\tmanufacturer = Manufacturer.ATR;\r\n loadingIn.setManufacturer(manufacturer);\r\n\t\t\t\tloadingIn.setModel(fields[3]);\r\n\t\t\t\tloadingIn.setSeats(Integer.parseInt(fields[4]));\r\n\t\t\t\tloadingIn.setCabinCrewRequired(Integer.parseInt(fields[5]));\r\n\t\t\t\tloadingIn.setStartingPosition(fields[6]);\r\n\t\t\t\tairCrafts.add(loadingIn);\r\n\t\t\t\t\r\n\t\t\t\t//print a line explaining what we've found\r\n\t\t\t\t/*System.out.println(\"Tail Code: \" + loadingIn.getTailCode() + \" TypeCode: \" + loadingIn.getTailCode() +\r\n\t\t\t\t\t\t\" Manufacturer: \" + loadingIn.getManufacturer() + \" Model: \" + loadingIn.getModel() +\r\n\t\t\t\t\t\t\" Seats and CabinCrew : \" + loadingIn.getSeats() + \" \" + loadingIn.getCabinCrewRequired()\r\n\t\t\t\t\t\t+ \" Starting Pos. \" + loadingIn.getStartingPosition());*/\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tcatch (IOException ioe) {\r\n\t\t\t//There was a problem reading the file\r\n\t\t\tthrow new DataLoadingException(ioe);\r\n\t\t}\r\n\t\tcatch (NumberFormatException e)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error loading aircraft data\");\r\n\t\t\tDataLoadingException dle = new DataLoadingException();\r\n\t\t\tthrow dle;\r\n\t\t}\r\n\r\n\t}", "public void updateDeviceAir(){\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.add(Calendar.DATE, -1);\n\t\tDate date = calendar.getTime();\n\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tString time = df.format(date);\n\t\t\n\t\tHashMap<String, Integer> insideMap = deviceStatusDao.getAverageInside(time + \"%\");\n\t\tHashMap<String, Integer> outsideMap = deviceStatusDao.getAverageOutside(time + \"%\");\n\t\t//pair device air & city air\n\t\tfor(String device_id : insideMap.keySet()){\n\t\t\tDeviceAir deviceAir = new DeviceAir();\n\t\t\tdeviceAir.setDeviceID(device_id);\n\t\t\tdeviceAir.setInsideAir(insideMap.get(device_id));\n\t\t\tif(!outsideMap.containsKey(device_id)){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdeviceAir.setOutsideAir(outsideMap.get(device_id));\n\t\t\tdeviceAir.setDate(time);\n\t\t\tdeviceStatusDao.insertDeviceAir(deviceAir);\n\t\t}\n\t}", "public static AircraftFleet load(String fileName) {\n\t\tAircraftFleet a = new AircraftFleet();\n\t\tAircraft ac;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(fileName));\t\t\t\n\t\t\twhile(br.readLine() != null) {\n\t\t\t\tString ID = br.readLine().split(\"=\")[1];\n\t\t\t\tString make = br.readLine().split(\"=\")[1];\n\t\t\t\tString model = br.readLine().split(\"=\")[1];\n\t\t\t\tdouble fuelCap = Double.parseDouble(br.readLine().split(\"=\")[1]);\n\t\t\t\tdouble weight = Double.parseDouble(br.readLine().split(\"=\")[1]);\n\t\t\t\tdouble cargoWeight = Double.parseDouble(br.readLine().split(\"=\")[1]);\n\t\t\t\tdouble maxTakeoffWeight = Double.parseDouble(br.readLine().split(\"=\")[1]);\n\t\t\t\tdouble cruiseSpeed = Double.parseDouble(br.readLine().split(\"=\")[1]);\n\t\t\t\tdouble fuelFlowRate = Double.parseDouble(br.readLine().split(\"=\")[1]);\n\t\t\t\tdouble range = Double.parseDouble(br.readLine().split(\"=\")[1]);\n\t\t\t\tint crewNum = Integer.parseInt(br.readLine().split(\"=\")[1]);\n\t\t\t\tint payload = Integer.parseInt(br.readLine().split(\"=\")[1]);\n\t\t\t\tac = new Aircraft(ID, make, model, fuelCap, weight, cargoWeight, maxTakeoffWeight, cruiseSpeed,\n\t\t\t\t\t\tfuelFlowRate, range, crewNum, payload);\n\t\t\t\ta.add(ac);\n\t\t\t\tbr.readLine();//skip the blank that divided different Aircraft in the file\n\t\t\t} \n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"IO ERROR received: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn a;\n\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 importWorkflow() {\n int returnVal = this.graphFileChooser.showOpenDialog(this.engine.getGUI().getFrame());\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n File file = this.graphFileChooser.getSelectedFile();\n try {\n\n String path = file.getPath();\n Workflow importedWorkflow;\n if (path.endsWith(XBayaConstants.GRAPH_FILE_SUFFIX)) {\n WSGraph importedGraph = WSGraphFactory.createGraph(file);\n importedWorkflow = Workflow.graphToWorkflow(importedGraph);\n } else {\n XmlElement importedWorkflowElement = XMLUtil.loadXML(file);\n importedWorkflow = new Workflow(importedWorkflowElement);\n }\n GraphCanvas newGraphCanvas = engine.getGUI().newGraphCanvas(true);\n newGraphCanvas.setWorkflow(importedWorkflow);\n this.engine.getGUI().setWorkflow(importedWorkflow);\n engine.getGUI().getGraphCanvas().setWorkflowFile(file);\n\n } catch (IOException e) {\n this.engine.getGUI().getErrorWindow().error(ErrorMessages.OPEN_FILE_ERROR, e);\n } catch (GraphException e) {\n this.engine.getGUI().getErrorWindow().error(ErrorMessages.GRAPH_FORMAT_ERROR, e);\n } catch (ComponentException e) {\n this.engine.getGUI().getErrorWindow().error(ErrorMessages.GRAPH_FORMAT_ERROR, e);\n } catch (RuntimeException e) {\n this.engine.getGUI().getErrorWindow().error(ErrorMessages.UNEXPECTED_ERROR, e);\n } catch (Error e) {\n this.engine.getGUI().getErrorWindow().error(ErrorMessages.UNEXPECTED_ERROR, e);\n }\n }\n }", "protected void importEOModel() {\n JFileChooser fileChooser = getEOModelChooser();\n int status = fileChooser.showOpenDialog(Application.getFrame());\n\n if (status == JFileChooser.APPROVE_OPTION) {\n\n // save preferences\n FSPath lastDir = getApplication()\n .getFrameController()\n .getLastEOModelDirectory();\n lastDir.updateFromChooser(fileChooser);\n\n File file = fileChooser.getSelectedFile();\n if (file.isFile()) {\n file = file.getParentFile();\n }\n\n DataMap currentMap = getProjectController().getCurrentDataMap();\n\n try {\n URL url = file.toURI().toURL();\n\n EOModelProcessor processor = new EOModelProcessor();\n\n // load DataNode if we are not merging with an existing map\n if (currentMap == null) {\n loadDataNode(processor.loadModeIndex(url));\n }\n\n // load DataMap\n DataMap map = processor.loadEOModel(url);\n addDataMap(map, currentMap);\n\n }\n catch (Exception ex) {\n logObj.info(\"EOModel Loading Exception\", ex);\n ErrorDebugDialog.guiException(ex);\n }\n\n }\n }", "private void importarDatos() {\r\n // Cabecera\r\n System.out.println(\"Importación de Datos\");\r\n System.out.println(\"====================\");\r\n\r\n // Acceso al Fichero\r\n try (\r\n FileReader fr = new FileReader(DEF_NOMBRE_FICHERO);\r\n BufferedReader br = new BufferedReader(fr)) {\r\n // Colección Auxiliar\r\n final List<Item> AUX = new ArrayList<>();\r\n\r\n // Bucle de Lectura\r\n boolean lecturaOK = true;\r\n do {\r\n // Lectura Linea Actual\r\n String linea = br.readLine();\r\n\r\n // Procesar Lectura\r\n if (linea != null) {\r\n // String > Array\r\n String[] items = linea.split(REG_CSV_LECT);\r\n\r\n // Campo 0 - id ( int )\r\n int id = Integer.parseInt(items[DEF_INDICE_ID]);\r\n\r\n // Campo 1 - nombre ( String )\r\n String nombre = items[DEF_INDICE_NOMBRE].trim();\r\n\r\n // Campo 2 - precio ( double )\r\n double precio = Double.parseDouble(items[DEF_INDICE_PRECIO].trim());\r\n\r\n // Campo 3 - color ( Color )\r\n Color color = UtilesGraficos.generarColor(items[DEF_INDICE_COLOR].trim());\r\n\r\n // Generar Nuevo Item\r\n Item item = new Item(id, nombre, precio, color);\r\n\r\n // Item > Carrito\r\n AUX.add(item);\r\n// System.out.println(\"Importado: \" + item);\r\n } else {\r\n lecturaOK = false;\r\n }\r\n } while (lecturaOK);\r\n\r\n // Vaciar Carrito\r\n CARRITO.clear();\r\n\r\n // AUX > CARRITO\r\n CARRITO.addAll(AUX);\r\n\r\n // Mensaje Informativo\r\n UtilesEntrada.hacerPausa(\"Datos importados correctamente\");\r\n } catch (NumberFormatException | NullPointerException e) {\r\n // Mensaje Informativo\r\n UtilesEntrada.hacerPausa(\"ERROR: Formato de datos incorrecto\");\r\n\r\n // Vaciado Carrito\r\n CARRITO.clear();\r\n } catch (IOException e) {\r\n // Mensaje Informativo\r\n UtilesEntrada.hacerPausa(\"ERROR: Acceso al fichero\");\r\n }\r\n }", "private void loadApplication() throws Exception{\n\t\t\n\t\tBufferedReader br = new BufferedReader(new FileReader(this.appfile));\n\t\tString line;\n\t\t\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tif (line.equals(\"Date\")){\n\t\t\t\tline = br.readLine();\n\t\t\t\tsetDate(line);\n\t\t\t}\n\t\t\telse if (line.equals(\"GPA\")){\n\t\t\t\tline = br.readLine();\n\t\t\t\tdouble newGPA = Double.parseDouble(line);\n\t\t\t\tsetGPA(newGPA);\n\t\t\t}\n\t\t\telse if (line.equals(\"Education Level\")){\n\t\t\t\tline = br.readLine();\n\t\t\t\tsetEducationLevel(line);\n\t\t\t}\n\t\t\telse if (line.equals(\"Status\")){\n\t\t\t\tline = br.readLine();\n\t\t\t\tsetStatus(line);\n\t\t\t}\n\t\t\telse if (line.equals(\"Priority\")){\n\t\t\t\tline = br.readLine();\n\t\t\t\tint newPriority = Integer.parseInt(line);\n\t\t\t\tsetPriority(newPriority);\n\t\t\t}\n\t\t}\n\t\tbr.close();\t\n\t}", "void doImport() {\r\n\t\tif (imp == null) {\r\n\t\t\timp = new ImportDialog(rl);\r\n\t\t}\r\n\t\timp.setLabels(labels);\r\n\t\timp.setLocationRelativeTo(this);\r\n\t\timp.setVisible(true);\r\n\t\tif (imp.success) {\r\n\t\t\tif (renderer.surface == null) {\r\n\t\t\t\tcreatePlanetSurface(33, 66);\r\n\t\t\t}\r\n\t\t\tUndoableMapEdit undo = new UndoableMapEdit(renderer.surface);\r\n\t\t\tif (imp.selected != null) {\r\n\t\t\t\tif (imp.replaceSurface) {\r\n\t\t\t\t\tdoClearSurfaces(false);\r\n\t\t\t\t}\r\n\t\t\t\tplaceTilesFromOriginalMap(imp.selected.fullPath, imp.selected.surfaceType, imp.shiftXValue, imp.shiftYValue);\r\n\t\t\t}\r\n\t\t\tif (imp.planet != null) {\r\n\t\t\t\tif (imp.replaceBuildings) {\r\n\t\t\t\t\tdoClearBuildings(false);\r\n\t\t\t\t}\r\n\t\t\t\tif (imp.withSurface) {\r\n\t\t\t\t\tif (imp.replaceSurface) {\r\n\t\t\t\t\t\tdoClearSurfaces(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tplaceTilesFromOriginalMap(\"colony/\" + imp.planet.getMapName(), imp.planet.surfaceType.toLowerCase(), imp.shiftXValue, imp.shiftYValue);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (OriginalBuilding ob : imp.planet.buildings) {\r\n\t\t\t\t\tBuildingType bt = buildingModel.buildings.get(ob.getName()); \r\n\t\t\t\t\tString r = imp.planet.getRaceTechId();\r\n\t\t\t\t\tTileSet t = bt.tileset.get(r);\r\n\t\t\t\t\tBuilding bld = new Building(bt, r);\r\n\t\t\t\t\tbld.makeFullyBuilt();\r\n\t\t\t\t\tbld.location = Location.of(ob.location.x + imp.shiftXValue, ob.location.y + imp.shiftYValue);\r\n\t\t\t\t\trenderer.surface.buildings.add(bld);\r\n\t\t\t\t\tplaceTile(t.normal, ob.location.x + imp.shiftXValue, ob.location.y + imp.shiftYValue, SurfaceEntityType.BUILDING, bld);\r\n\t\t\t\t}\r\n\t\t\t\trenderer.buildingBox = null;\r\n\t\t\t\tcurrentBuilding = null;\r\n\t\t\t\tplaceRoads(imp.planet.getRaceTechId());\r\n\t\t\t} else {\r\n\t\t\t\tdoClearBuildings(false);\r\n\t\t\t}\r\n\t\t\tundo.setAfter();\r\n\t\t\taddUndo(undo);\r\n\t\t\trepaint();\r\n\t\t}\r\n\t}", "public void importFileClick() {\n\n //Lets the user choose a file location\n FileChooser fileChooser = new FileChooser();\n fileChooser.setTitle(\"Open Resource File\");\n fileChooser.setInitialDirectory(new File(System.getProperty(\"user.dir\")));\n fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter(\"Run-length encoding\",\n \"*.rle\"));\n File file = fileChooser.showOpenDialog(new Stage());\n\n //If a file was chosen, will stop the game and set the generation to 0 and try to load the file.\n if (file != null) {\n timeline.stop();\n gOL.resetGenCounter();\n generationLabel.setText(Integer.toString(gOL.getGenCounter()));\n try {\n fileHandler.readGameBoardFromDisk(file);\n } catch (IOException ie) {\n //Produces a warning if unsuccessful\n PopUpAlerts.ioAlertFromDisk();\n }\n }\n\n aliveLabel.setText(Integer.toString(board.getCellsAlive()));\n ruleLabel.setText(gOL.getRuleString().toUpperCase());\n isMovable = true;\n canvasArea.requestFocus();\n setFocusTraversable(false);\n\n //Resets offset to accommodate for the new pattern and calls draw().\n canvasDrawer.resetOffset(board, canvasArea);\n draw();\n }", "private void actionImport() {\n ImportPanel myPanel = new ImportPanel();\n int result = JOptionPane.showConfirmDialog(this, myPanel, \"Import\",\n JOptionPane.OK_CANCEL_OPTION);\n if (result == JOptionPane.OK_OPTION) { // Afirmative\n readNeuronListFromFile(\n myPanel.tfields[ImportPanel.idxInhList].getText(),\n layoutPanel.inhNList, LayoutPanel.INH);\n readNeuronListFromFile(\n myPanel.tfields[ImportPanel.idxActList].getText(),\n layoutPanel.activeNList, LayoutPanel.ACT);\n readNeuronListFromFile(\n myPanel.tfields[ImportPanel.idxPrbList].getText(),\n layoutPanel.probedNList, LayoutPanel.PRB);\n\n Graphics g = layoutPanel.getGraphics();\n layoutPanel.writeToGraphics(g);\n }\n }", "public void importaRegole(String file, ArrayList<Sensore> listaSensori, ArrayList<Attuatore> listaAttuatori) {\n ArrayList<String> nomiDispPres = new ArrayList<>();\n\n for (Sensore s : listaSensori) {\n nomiDispPres.add(s.getNome());\n }\n\n for (Attuatore att : listaAttuatori) {\n nomiDispPres.add(att.getNome());\n }\n\n String regoleImport = readFromFile(file);\n\n if (regoleImport.equals(\"\")) {\n System.out.println(\"XX Errore di lettura file. Non sono state inserite regole per l'unita immobiliare XX\\n\");\n return;\n }\n\n String[] regole = regoleImport.split(\"\\n\");\n\n for (String r : regole) {\n try {\n ArrayList<String> dispTrovati = verificaCompRegola(r);\n\n for (String nomeDis : dispTrovati) {\n if (nomeDis.contains(\".\")){\n String nomeS = nomeDis.split(\"\\\\.\")[0];\n\n if (!nomiDispPres.contains(nomeS)) {\n throw new Exception(\"XX Dispositivi Incompatibili all'interno della regola XX\\n\");\n }\n\n Sensore s = listaSensori.stream().filter(sensore -> sensore.getNome().equals(nomeS)).iterator().next();\n String nomeInfo = nomeDis.split(\"\\\\.\")[1];\n\n if (s.getInformazione(nomeInfo) == null)\n throw new Exception(\"XX Regola non compatibile XX\\n\");\n\n\n } else if (!nomiDispPres.contains(nomeDis)) {\n throw new Exception(\"XX Dispositivi Incompatibili all'interno della regola XX\\n\");\n\n }\n }\n System.out.println(\"*** Importazione della regola avvenuta con successo ***\\n\");\n writeRuleToFile(r, true);\n\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n\n }\n eliminaDoppie(listaSensori,listaAttuatori);\n }", "@Override\n\tpublic void importData(String filePath) {\n\t\tString[] allLines = readFile(filePath);\n\n\t\t//Obtains the date to give to all sales from the cell in the first line and first column of the csv\n\t\t//And formats it into the expected format.\n\t\tString[] firstLine = allLines[0].split(\",(?=([^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\", -1);\n\t\tString[] title = firstLine[0].split(\"\\\\(\");\n\t\tSimpleDateFormat oldFormat = new SimpleDateFormat(\"MMMMM, yyyy\");\n\t\tSimpleDateFormat newFormat = new SimpleDateFormat(\"MMM yyyy\");\n\t\tDate date = null;\n\t\ttry {\n\t\t\tdate = oldFormat.parse(title[1].replaceAll(\"[()]\", \"\"));\n\t\t} catch (ParseException e) {\n\t\t\tSystem.out.println(\"There was parsing the date in the first cell of the first line of the csv.\\n\" \n\t\t\t\t\t+ \" A date of the format 'October, 2017' was expected.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.monthAndYear = newFormat.format(date);\n\n\t\t//Parses data for each currency and places it in class variable listForex by calling importForex() on each currency line of csv\n\t\t//Considers that the first line of currencies is the fourth line of csv.\n\t\t//Stops if counter reaches the total number of lines of csv, or if the line is shorter than 15 characters,\n\t\t//so that it doesn't try to parse the summary lines below the last currency line.\n\t\tint counter = 3;\n\t\twhile (counter< allLines.length && allLines[counter].length() > 15) {\n\t\t\timportForex(allLines[counter]);\n\t\t\tcounter++;\n\t\t}\n\n\t\tChannel apple = obtainChannel(\"Apple\", new AppleFileFormat(), false);\n\n\t\t//Places the imported data in the app,\n\t\t//making sure not to replace the existing list of FX rates for this month and year if there is one.\n\t\t//It does however update the FX rate value for currencies that are already in the data for this month.\n\t\tif (apple.getHistoricalForex().containsKey(monthAndYear)) {\n\t\t\tHashMap<String, Double> existingList = apple.getHistoricalForex().get(monthAndYear);\n\t\t\tfor (String s : existingList.keySet()) {\n\t\t\t\tlistForex.put(s, existingList.get(s));\n\t\t\t}\t\n\t\t}\n\t\tapple.addHistoricalForex(monthAndYear, listForex);\n\t}", "private void importAll() {\n\t\tfinal JFileChooser chooser = new JFileChooser(System.getProperty(\"user.home\"));\n\t\tint returnVal = chooser.showOpenDialog(null);\n\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile file = chooser.getSelectedFile();\n\t\t\tdeserializeFile(file);\n\t\t\t // imported the projects for this application from a file, so update what should be persisted on close\n\t\t\tupdatePersistence();\n\t\t}\n\t}", "@Override\r\n\tpublic void importXML(String parentAbsPath, InputStream in, int uuidBehavior)\r\n\t\t\tthrows IOException, PathNotFoundException, ItemExistsException,\r\n\t\t\tConstraintViolationException, VersionException,\r\n\t\t\tInvalidSerializedDataException, LockException, RepositoryException {\n\t\t\r\n\t}", "public void importer() {\n\t\tString[] champs = {\n\t\t\t\"numero_edition\", \n\t\t\t\"libelle_edition\"\n\t\t};\n\t\t\n\t\tExploitation bdd = new Exploitation();\n\t\tbdd.chargerPilote();\n\t\tbdd.connexion();\n\t\tString[][] req = bdd.lister(champs, \"edition\");\n\n\t\tfor(int i=0; i<req.length; i++) {\n\t\t\tEdition e = new Edition(Integer.parseInt(req[i][0]), req[i][1]);\n\t\t\tthis.lesEditions.add(e);\n\t\t}\n\t\tbdd.deconnexion();\n\t}", "public void load(){\n\t\t\tArrayList<String> entries = readEntriesFromFile(FILENAME);\n\t\t\t\n\t\t\tfor(int i = 1; i < entries.size(); i++){\n\t\t\t\tString entry = entries.get(i);\n\t\t\t\tString[] entryParts = entry.split(\",\");\n\t\t\t\tString name = entryParts[0];\n\t\t\t\tString power = entryParts[1];\n\t\t\t\tString gold = entryParts[2];\n\t\t\t\tString xp = entryParts[3];\n\t\t\t\tString location = entryParts[4];\n\t\t\t\tint powerInt = Integer.parseInt(power);\n\t\t\t\tint goldInt = Integer.parseInt(gold);\n\t\t\t\tint XPInt = Integer.parseInt(xp);\n\t\t\t\tRegion regionR = RM.getRegion(location);\n\t\t\t\tTrap trap = new Trap(name, powerInt, goldInt, XPInt, regionR);\n\t\t\t\ttrapList[i-1] = trap;\n\t\t\t}\n\t}", "public void convertAll() {\n Document dom = null;\n long beginTime = System.currentTimeMillis();\n try {\n log.info(\" ############################### begin import ######################\");\n dom = XMLParser.parseXMLToDOM(context.getResourceAsStream(IMPORT_FILE));\n // XMLParser.DTDValidator(dom);\n Element element = (Element) dom.getElementsByTagName(\"import\").item(0);\n String encoding = element.getAttribute(\"encoding\");\n DataAccessor.encoding = encoding;\n\n NodeList list = element.getChildNodes();\n\n List<Data> clondSources = new ArrayList<Data>();\n for (int i = 0; i < list.getLength(); i++) {\n // datatype node\n Node itemDatatype = list.item(i);\n List<Data> sources = processDatatype(itemDatatype);\n clondSources.addAll(sources);\n }\n NodeService.insertMigrationMappings(clondSources);\n createRelationDataType(clondSources);\n linkRoot(list);\n log.info(String.format(\n \" ---->#######################finished importing [time:%s mins] #############################\",\n (System.currentTimeMillis() - beginTime) / (1000 * 60)));\n NodeService.insertProperties(properties);\n }\n catch (Exception e) {\n log.error(e.getMessage());\n e.printStackTrace();\n }\n }", "private void m72698ho() {\n try {\n FileInputStream openFileInput = this.mContext.openFileInput(this.aeq);\n try {\n XmlPullParser newPullParser = Xml.newPullParser();\n newPullParser.setInput(openFileInput, \"UTF-8\");\n int i = 0;\n while (i != 1 && i != 2) {\n i = newPullParser.next();\n }\n if (\"historical-records\".equals(newPullParser.getName())) {\n List list = this.aep;\n list.clear();\n while (true) {\n int next = newPullParser.next();\n if (next != 1) {\n if (!(next == 3 || next == 4)) {\n if (\"historical-record\".equals(newPullParser.getName())) {\n list.add(new C31890c(newPullParser.getAttributeValue(null, \"activity\"), Long.parseLong(newPullParser.getAttributeValue(null, \"time\")), Float.parseFloat(newPullParser.getAttributeValue(null, \"weight\"))));\n } else {\n throw new XmlPullParserException(\"Share records file not well-formed.\");\n }\n }\n } else if (openFileInput != null) {\n try {\n openFileInput.close();\n return;\n } catch (IOException e) {\n return;\n }\n } else {\n return;\n }\n }\n }\n throw new XmlPullParserException(\"Share records file does not start with historical-records tag.\");\n } catch (XmlPullParserException e2) {\n new StringBuilder(\"Error reading historical recrod file: \").append(this.aeq);\n if (openFileInput != null) {\n try {\n openFileInput.close();\n } catch (IOException e3) {\n }\n }\n } catch (IOException e4) {\n new StringBuilder(\"Error reading historical recrod file: \").append(this.aeq);\n if (openFileInput != null) {\n try {\n openFileInput.close();\n } catch (IOException e5) {\n }\n }\n } catch (Throwable th) {\n if (openFileInput != null) {\n try {\n openFileInput.close();\n } catch (IOException e6) {\n }\n }\n }\n } catch (FileNotFoundException e7) {\n }\n }", "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 }", "private void loadAlarms() {\n\n try {\n if (!Files.exists(Paths.get(alarmsFile))) {\n\n System.out.println(\"Alarms file not found attemping to create default\");\n Files.createFile(Paths.get(alarmsFile));\n\n } else {\n List<String> fileLines = Files.readAllLines(Paths.get(alarmsFile));\n\n for (int i = 0; i < fileLines.size() - 1; i += 4) {\n int hour = Integer.parseInt(fileLines.get(i));\n int minute = Integer.parseInt(fileLines.get(i + 1));\n int period = Integer.parseInt(fileLines.get(i + 2));\n String name = fileLines.get(i + 3);\n\n System.out.println(\"Adding new alarm from file. \" + name);\n addEntry(hour, minute, period, name);\n }\n }\n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(AlarmsEditPanel.class.getName()).log(Level.SEVERE, null, ex);\n } catch (FileNotFoundException ex) {\n Logger.getLogger(AlarmsEditPanel.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(AlarmsEditPanel.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "protected void actionPerformedImport ()\n {\n System.out.println (\"Import selected\");\n if (chooser.showOpenDialog (PreferencesDialog.this) == JFileChooser.APPROVE_OPTION)\n {\n try\n {\n InputStream in = new FileInputStream (chooser.getSelectedFile ());\n Preferences.importPreferences (in);\n in.close ();\n this.invalidate ();\n this.jTableEdition.repaint ();\n this.jTreePreferences.repaint ();\n this.repaint ();\n }\n catch (Exception e)\n {\n e.printStackTrace ();\n JOptionPane.showMessageDialog (this, stringDatabase.getString (e.getMessage ()),\n stringDatabase.getString (e.getMessage ()),\n JOptionPane.ERROR_MESSAGE);\n }\n }\n }", "private void loadEnvironment(String filename){\n // Code here to read from the file and set up the environment\n try (BufferedReader br = new BufferedReader(new FileReader(filename))) {\n String line;\n while((line = br.readLine()) != null) {\n String[] values = line.split(\",\");\n String type = values[0].replaceAll(\"[^a-zA-Z0-9]\", \"\"); // remove special characters\n double x = Double.parseDouble(values[1]);\n double y = Double.parseDouble(values[2]);\n switch (type) {\n case \"Zombie\":\n Zombie zombie = new Zombie(x, y);\n this.zombies.put(zombie.getPosition(), zombie);\n break;\n case \"Sandwich\":\n Sandwich sandwich = new Sandwich(x, y);\n this.sandwiches.put(sandwich.getPosition(), sandwich);\n break;\n case \"Player\":\n this.player = new Player(x, y, Integer.parseInt(values[3]));\n break;\n case \"Treasure\":\n this.treasure = new Treasure(x, y);\n break;\n default:\n throw new BagelError(\"Unknown type: \" + type);\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public JuggleFestCircuitAssignments() throws FileNotFoundException {\n // Prompt the user for the jugglefest.txt file and store the path to a variable\n // Scanner userFileNameInput = new Scanner(System.in);\n // System.out.println(\"Please enter the path to your jugglefest.txt file\");\n // String filename = userFileNameInput.nextLine();\n // userFileNameInput.close();\n // TODO Uncomment above code and make the Scanner read in from \"filename\" before sending this out to production\n\n Scanner file = new Scanner(new File(\"/Users/kevin/Github/YodleJuggleFest/jugglefest-mini.txt\")); // Open the jugglefest.txt file\n\n // Read the file one line at a time and parse their contents\n while (file.hasNext()) {\n /* Splits the line by spaces. Expect the array to contain:\n * [0] The identifier for the line (either C or J for Circuit or Juggler)\n * [1] The identifier concatenated to the # of that Circuit or Juggler (eg, C101 for Circuit #101)\n * [2] \"H\" for this Circuit/Juggler\n * [3] \"E\" for this Circuit/Juggler\n * [4] \"P\" for this Circuit/Juggler\n * [5] Only exists for Jugglers: a comma-delimited list of the 10 preferred Circuits for this Juggler\n */\n String[] inputFileLine = file.nextLine().split(\" \");\n\n // Remove everything that isn't a digit or a comma, so now all we have is the raw data that we need.\n for (int i = 0; i < inputFileLine.length; i++) {\n inputFileLine[i] = inputFileLine[i].replaceAll(\"[^\\\\d,]\", \"\");\n }\n\n // If there are 5 elements, this is a circuit element. Add it to the circuits list\n if (inputFileLine.length == 5) {\n circuits.add(Integer.parseInt(inputFileLine[1]),\n new Circuit(\n Integer.parseInt(inputFileLine[2]), // \"H\" value\n Integer.parseInt(inputFileLine[3]), // \"E\" value\n Integer.parseInt(inputFileLine[4]) // \"P\" value\n ));\n }\n\n // If there are 6 elements, this is a juggler element. Parse the last element into an array and add it to the circuits list\n else if (inputFileLine.length == 6) {\n // Parses the String into a comma-delimited array, and then converts those Strings to Integers\n String[] desiredCircuitsString = inputFileLine[5].split(\",\");\n Integer[] desiredCircuitsInt = new Integer[desiredCircuitsString.length];\n for (int i = 0; i < desiredCircuitsString.length; i++) {\n desiredCircuitsInt[i] = Integer.parseInt(desiredCircuitsString[i]);\n }\n\n jugglers.add(Integer.parseInt(inputFileLine[1]),\n new Juggler(\n Integer.parseInt(inputFileLine[2]), // \"H\" value\n Integer.parseInt(inputFileLine[3]), // \"E\" value\n Integer.parseInt(inputFileLine[4]), // \"P\" value\n Arrays.asList(desiredCircuitsInt) // Desired circuits\n ));\n }\n }\n\n file.close();\n MAX_JUGGLERS_PER_CIRCUIT = jugglers.size() / circuits.size();\n }", "public void setFlightList(String filePath) throws FileNotFoundException, NoSuchCityException, ParseException {\n Scanner scan = new Scanner(new File(filePath));\n while (scan.hasNextLine()) { // while there's another line in the file\n String line = scan.nextLine();\n if (line == \"\") { // if the line is empty, break from the loop\n break;\n }\n int i = 0; // to keep track of the iterator's placement in a line\n int n = 0; // to keep track of information in store\n String[] flightInformation = new String[8];\n while (i < line.length()) {\n String store = \"\";\n while (i < line.length() && line.charAt(i) != ',') {\n store += line.charAt(i);\n i++;\n }\n i++;\n n++;\n switch (n) { // checks which piece of flight information\n case 1:\n flightInformation[0] = store;\n break;\n case 2:\n flightInformation[1] = store;\n break;\n case 3:\n flightInformation[2] = store;\n break;\n case 4:\n flightInformation[3] = store;\n break;\n case 5:\n flightInformation[4] = store;\n break;\n case 6:\n flightInformation[5] = store;\n break;\n case 7:\n flightInformation[6] = store;\n break;\n case 8:\n flightInformation[7] = store;\n break;\n }\n }\n // convert String to Double\n double costDouble = Double.parseDouble(flightInformation[6]);\n DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n Calendar departureDateTime = Calendar.getInstance();\n departureDateTime.setTime(df.parse(flightInformation[1]));\n Calendar arrivalDateTime = Calendar.getInstance();\n arrivalDateTime.setTime(df.parse(flightInformation[2]));\n boolean b = false;\n for (Flight f: this.flightList) {\n if (f.getFlightNumber().equals(flightInformation[0])) {\n b = true;\n f.setDepartureDateTime(departureDateTime);\n f.setArrivalDateTime(arrivalDateTime);\n f.setAirline(flightInformation[3]);\n // need to update cityGraph\n f.setOrigin(flightInformation[4]);\n f.setDestination(flightInformation[5]);\n f.setCost(costDouble);\n f.setNumSeats(Integer.parseInt(flightInformation[7]));\n\n }\n }\n if (!b) {\n this.flightList.add(new Flight(flightInformation[0], departureDateTime, arrivalDateTime,\n flightInformation[3], flightInformation[4], flightInformation[5], costDouble, Integer.parseInt(flightInformation[7])));\n flightSystem.getCityGraph().addFlight(new Flight(flightInformation[0], departureDateTime, arrivalDateTime,\n flightInformation[3], flightInformation[4], flightInformation[5], costDouble, Integer.parseInt(flightInformation[7])));\n }\n\n }\n scan.close();\n setChanged();\n notifyObservers(flightList);\n\n }", "public static void adminUploadFlight(String filepath) throws FileNotFoundException {\r\n Scanner sc = new Scanner(new FileInputStream(filepath));\r\n String[] flightData;\r\n Flight flight;\r\n while (sc.hasNextLine()) {\r\n flightData = sc.nextLine().split(\",\");\r\n // FlightID, DepartureDate/time, ArrivalDate/time, Airline, Origin, Destination, price\r\n try {\r\n\r\n flight = new Flight(flightData[0], flightData[1], flightData[2], flightData[3],\r\n flightData[4], flightData[5], Double.parseDouble(flightData[6]),\r\n Integer.parseInt(flightData[7]));\r\n\r\n // get the FlightMap\r\n Map<String, Flight> tempFlightMap = getFlightMap();\r\n // if temFlightMap contains the above flight's id then set that flight to this\r\n // new flight.\r\n if (tempFlightMap.containsKey(flight.getFlightNumber())) {\r\n // get the flight that exists and update the flights info as needed\r\n // start at index 1 as the flight number(i.e. id) stays same\r\n // the index matches the constructor of Flight object\r\n tempFlightMap.get(flight.getFlightNumber()).setDepartureTime(flightData[1]);\r\n tempFlightMap.get(flight.getFlightNumber()).setArrivalTime(flightData[2]);\r\n tempFlightMap.get(flight.getFlightNumber()).setAirline(flightData[3]);\r\n tempFlightMap.get(flight.getFlightNumber()).setOrigin(flightData[4]);\r\n tempFlightMap.get(flight.getFlightNumber()).setDestination(flightData[5]);\r\n tempFlightMap.get(flight.getFlightNumber()).setPrice(Double.parseDouble(flightData[6]));\r\n tempFlightMap.get(flight.getFlightNumber()).setNumSeats(Integer.parseInt(flightData[7]));\r\n } else { // else since the new flight doesn't exist just add it to the FlightMap\r\n addFlight(flight);\r\n }\r\n } catch (NumberFormatException | ParseException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }\r\n sc.close();\r\n }", "public void importFile(String filename) throws IOException, BadEntryException, ImportFileException{\n try{\n BufferedReader reader = new BufferedReader(new FileReader(filename));\n String line;\n line = reader.readLine();\n\n while(line != null){\n String[] fields = line.split(\"\\\\|\");\n int id = Integer.parseInt(fields[1]);\n if(_persons.get(id) != null){\n throw new BadEntryException(fields[0]);\n }\n\n if(fields[0].equals(\"FUNCIONÁRIO\")){\n registerAdministrative(fields);\n line = reader.readLine();\n }else if(fields[0].equals(\"DOCENTE\")){\n Professor _professor = new Professor(id, fields[2], fields[3]);\n _professors.put(id, _professor);\n _persons.put(id, (Person) _professor);\n\n line = reader.readLine();\n if(line != null){\n fields = line.split(\"\\\\|\");\n while((line != null) && (fields[0].charAt(0) == '#')){\n String course = fields[0].substring(2);\n String discipline = fields[1];\n Course _course = _courses.get(course);\n \n if(_course == null){\n _course = new Course(course);\n _disciplineCourse.put(course, new HashMap<String, Discipline>());\n _courses.put(course, _course);\n }\n\n if(_professor.getDisciplineCourses().get(course) == null){\n _professor.getDisciplineCourses().put(course, new HashMap<String, Discipline>());\n }\n\n Discipline _discipline = _disciplines.get(discipline);\n if(_discipline == null){\n _discipline = new Discipline(discipline,_course);\n _disciplines.put(discipline, _discipline);\n _course.getDisciplines().put(discipline, _discipline);\n }\n _discipline.registerObserver(_professor, id);\n _disciplineCourse.get(course).put(discipline, _discipline);\n\n if(_professor.getDisciplines() != null){\n _professor.getDisciplines().put(discipline, _discipline);\n _professor.getDisciplineCourses().get(course).put(discipline, _discipline); \n }\n line = reader.readLine();\n if(line != null){\n fields = line.split(\"\\\\|\");\n\n }\n }\n }\n }else if(fields[0].equals(\"DELEGADO\")){\n Student _student = new Student(id, fields[2], fields[3]);\n _students.put(id, _student);\n _persons.put(id, (Person) _student);\n\n line = reader.readLine();\n fields = line.split(\"\\\\|\");\n while((line != null) && (fields[0].charAt(0) == '#')){\n String course = fields[0].substring(2);\n String discipline = fields[1];\n Course _course = _courses.get(course);\n if(_course == null){\n _course = new Course(course);\n _disciplineCourse.put(course, new HashMap<String, Discipline>());\n _courses.put(course,_course);\n }\n if(_course.getRepresentatives().size() == 8){\n System.out.println(id);\n throw new BadEntryException(course);\n }else{\n _course.getRepresentatives().put(id,_student);\n }\n _student.setCourse(_course);\n Discipline _discipline = _disciplines.get(discipline);\n if(_discipline == null){\n _discipline = new Discipline(discipline, _course);\n _disciplines.put(discipline,_discipline);\n _course.getDisciplines().put(discipline, _discipline);\n }\n if(_student.getDisciplines().size() == 6){\n throw new BadEntryException(discipline);\n }else{\n if(_discipline.getStudents().size() == 100){\n throw new BadEntryException(discipline);\n }else{\n _student.getDisciplines().put(discipline,_discipline);\n _discipline.getStudents().put(id,_student);\n }\n }\n line = reader.readLine();\n if(line != null){\n fields = line.split(\"\\\\|\");\n }\n }\n }else if(fields[0].equals(\"ALUNO\")){\n Student _student = new Student(id, fields[2], fields[3]);\n _students.put(id, _student);\n _persons.put(id, (Person) _student);\n\n line = reader.readLine();\n fields = line.split(\"\\\\|\");\n while((line != null) && (fields[0].charAt(0) == '#')){\n String course = fields[0].substring(2);\n String discipline = fields[1];\n Course _course = _courses.get(course);\n if(_course == null){\n _course = new Course(course);\n _disciplineCourse.put(course, new HashMap<String, Discipline>());\n _courses.put(course, _course);\n }\n _student.setCourse(_course);\n Discipline _discipline = _disciplines.get(discipline);\n if(_discipline == null){\n _discipline = new Discipline(discipline, _course);\n _disciplines.put(discipline, _discipline);\n _course.getDisciplines().put(discipline, _discipline);\n }\n _discipline.registerObserver(_student, id);\n if(_student.getDisciplines().size() == 6){\n throw new BadEntryException(discipline);\n }else{\n _student.getDisciplines().put(discipline,_discipline);\n if(_discipline.getStudents().size() == 100){\n throw new BadEntryException(discipline);\n }else{\n _discipline.getStudents().put(id,_student);\n }\n }\n line = reader.readLine();\n if(line != null){\n fields = line.split(\"\\\\|\");\n }\n }\n\n }else{\n throw new BadEntryException(fields[0]);\n }\n }\n for(Course course: _courses.values()){\n HashMap<Integer,Student> representatives = course.getRepresentatives();\n HashMap<String, Discipline> disciplines = course.getDisciplines();\n for(Discipline discipline: disciplines.values()){\n for(Student representative: representatives.values()){\n discipline.registerObserver(representative, representative.getId());\n }\n }\n \n } \n reader.close();\n }catch(BadEntryException e){\n throw new ImportFileException(e);\n }catch(IOException e){\n throw new ImportFileException(e);\n }\n }", "public void importFile() {\n \ttry {\n\t File account_file = new File(\"accounts/CarerAccounts.txt\");\n\n\t FileReader file_reader = new FileReader(account_file);\n\t BufferedReader buff_reader = new BufferedReader(file_reader);\n\n\t String row;\n\t while ((row = buff_reader.readLine()) != null) {\n\t String[] account = row.split(\",\"); //implementing comma seperated value (CSV)\n\t String[] users = account[6].split(\"-\");\n\t int[] usersNew = new int[users.length];\n\t for (int i = 0; i < users.length; i++) {\n\t \tusersNew[i] = Integer.parseInt(users[i].trim());\n\t }\n\t this.add(Integer.parseInt(account[0]), account[1], account[2], account[3], account[4], account[5], usersNew);\n\t }\n\t buff_reader.close();\n } catch (IOException e) {\n System.out.println(\"Unable to read text file this time.\");\n \t}\n\t}", "public AirportXMLParser() {\n airportList = new ArrayList<Airport>();\n }", "public void readBoardData(Document d){\r\n \r\n Element root = d.getDocumentElement();\r\n \r\n NodeList setList = root.getElementsByTagName(\"set\");\r\n NodeList office = root.getElementsByTagName(\"office\");\r\n NodeList trailer = root.getElementsByTagName(\"trailer\");\r\n \r\n \r\n //special handling for office:\r\n \r\n //reads data from the node\r\n Node officeNode = office.item(0);\r\n Element officeElement = (Element) officeNode;\r\n String officeName = \"office\";\r\n \r\n Room officeTemp = new Room();\r\n officeTemp.name = officeName;\r\n \r\n //office area\r\n NodeList officeArea = officeElement.getElementsByTagName(\"area\");\r\n Node tempNode = officeArea.item(0);\r\n Element officeBuilder = (Element) tempNode;\r\n officeTemp.x = Integer.parseInt(officeBuilder.getAttribute(\"x\"));\r\n officeTemp.y = Integer.parseInt(officeBuilder.getAttribute(\"y\"));\r\n officeTemp.h = Integer.parseInt(officeBuilder.getAttribute(\"h\"));\r\n officeTemp.w = Integer.parseInt(officeBuilder.getAttribute(\"w\"));\r\n \r\n //neighbors\r\n NodeList officeNeighbors = officeElement.getElementsByTagName(\"neighbor\");\r\n \r\n String[] officeNeighborList = new String[officeNeighbors.getLength()];\r\n \r\n for(int i = 0; i < officeNeighbors.getLength(); i++){\r\n Element n = (Element) officeNeighbors.item(i);\r\n String tempNeighborName = n.getAttribute(\"name\");\r\n officeNeighborList[i] = tempNeighborName;\r\n }\r\n officeTemp.neighbors = officeNeighborList;\r\n \r\n //upgrades\r\n NodeList officeUpgrades = officeElement.getElementsByTagName(\"upgrade\");\r\n \r\n Upgrade[] upgradeList = new Upgrade[officeUpgrades.getLength()];\r\n for(int k = 0; k < upgradeList.length; k++){\r\n upgradeList[k] = new Upgrade();\r\n }\r\n \r\n //put all upgrades into upgradeList\r\n for(int i = 0; i < officeUpgrades.getLength(); i++){\r\n Element n = (Element) officeUpgrades.item(i);\r\n upgradeList[i].level = Integer.parseInt(n.getAttribute(\"level\"));\r\n upgradeList[i].currency = n.getAttribute(\"currency\");\r\n upgradeList[i].amount = Integer.parseInt(n.getAttribute(\"amt\"));\r\n \r\n //upgrade area\r\n NodeList upgradeArea = n.getElementsByTagName(\"area\");\r\n tempNode = upgradeArea.item(0);\r\n Element upgradeBuilder = (Element) tempNode;\r\n upgradeList[i].x = Integer.parseInt(upgradeBuilder.getAttribute(\"x\"));\r\n upgradeList[i].y = Integer.parseInt(upgradeBuilder.getAttribute(\"y\"));\r\n upgradeList[i].h = Integer.parseInt(upgradeBuilder.getAttribute(\"h\"));\r\n upgradeList[i].w = Integer.parseInt(upgradeBuilder.getAttribute(\"w\")); \r\n }\r\n \r\n officeTemp.upgrades = upgradeList;\r\n officeTemp.doneShooting = true;\r\n Board.currentBoard[Board.currentBoardIndex++] = officeTemp;\r\n \r\n \r\n //special handling for trailer\r\n //reads data from the node\r\n Node trailerNode = trailer.item(0);\r\n \r\n Element trailerElement = (Element) trailerNode;\r\n String trailerName = \"trailer\";\r\n \r\n Room trailerTemp = new Room();\r\n trailerTemp.name = trailerName;\r\n NodeList trailerArea = trailerElement.getElementsByTagName(\"area\");\r\n \r\n //trailer area\r\n tempNode = trailerArea.item(0);\r\n Element trailerBuilder = (Element) tempNode;\r\n trailerTemp.x = Integer.parseInt(trailerBuilder.getAttribute(\"x\"));\r\n trailerTemp.y = Integer.parseInt(trailerBuilder.getAttribute(\"y\"));\r\n trailerTemp.h = Integer.parseInt(trailerBuilder.getAttribute(\"h\"));\r\n trailerTemp.w = Integer.parseInt(trailerBuilder.getAttribute(\"w\"));\r\n \r\n //neighbors\r\n NodeList trailerNeighbors = trailerElement.getElementsByTagName(\"neighbor\");\r\n \r\n String[] trailerNeighborList = new String[trailerNeighbors.getLength()];\r\n \r\n for(int i = 0; i < trailerNeighbors.getLength(); i++){\r\n Element n = (Element) trailerNeighbors.item(i);\r\n String tempNeighborName = n.getAttribute(\"name\");\r\n trailerNeighborList[i] = tempNeighborName;\r\n }\r\n trailerTemp.doneShooting = true;\r\n trailerTemp.neighbors = trailerNeighborList;\r\n \r\n Board.currentBoard[Board.currentBoardIndex++] = trailerTemp;\r\n \r\n //handles all the sets\r\n for(int i = 0; i < setList.getLength(); i++){\r\n \r\n Room tempRoom = new Room();\r\n \r\n //reads data from the nodes\r\n Node setNode = setList.item(i);\r\n \r\n //set name\r\n String setName = setNode.getAttributes().getNamedItem(\"name\").getNodeValue();\r\n tempRoom.name = setName;\r\n \r\n Element set = (Element) setNode;\r\n NodeList neighbors = set.getElementsByTagName(\"neighbor\");\r\n NodeList takes = set.getElementsByTagName(\"take\");\r\n NodeList parts = set.getElementsByTagName(\"part\");\r\n NodeList setArea = set.getElementsByTagName(\"area\");\r\n \r\n //area\r\n tempNode = setArea.item(0);\r\n Element setBuilder = (Element) tempNode; \r\n tempRoom.x = Integer.parseInt(setBuilder.getAttribute(\"x\"));\r\n tempRoom.y = Integer.parseInt(setBuilder.getAttribute(\"y\"));\r\n tempRoom.h = Integer.parseInt(setBuilder.getAttribute(\"h\"));\r\n tempRoom.w = Integer.parseInt(setBuilder.getAttribute(\"w\"));\r\n \r\n //neighbors\r\n String[] tempNeighbors = new String[neighbors.getLength()];\r\n \r\n for(int j = 0; j < neighbors.getLength(); j++){\r\n Element n = (Element) neighbors.item(j);\r\n String tempName = n.getAttribute(\"name\");\r\n tempNeighbors[j] = tempName;\r\n }\r\n tempRoom.neighbors = tempNeighbors;\r\n \r\n //takes\r\n Take[] tempTakes = new Take[takes.getLength()];\r\n for(int k = 0; k < takes.getLength(); k++){\r\n Take tempTake = new Take();\r\n Element t = (Element) takes.item(k);\r\n int num = Integer.parseInt(t.getAttribute(\"number\"));\r\n \r\n //takes area\r\n NodeList takeArea = t.getElementsByTagName(\"area\");\r\n Node takeNode = takeArea.item(0);\r\n Element takeBuilder = (Element) takeNode;\r\n tempTake.x = Integer.parseInt(takeBuilder.getAttribute(\"x\"));\r\n tempTake.y = Integer.parseInt(takeBuilder.getAttribute(\"y\"));\r\n tempTake.h = Integer.parseInt(takeBuilder.getAttribute(\"h\"));\r\n tempTake.w = Integer.parseInt(takeBuilder.getAttribute(\"w\")); \r\n \r\n tempTakes[k] = tempTake;\r\n }\r\n tempRoom.takes = tempTakes;\r\n tempRoom.maxTakes = takes.getLength();\r\n \r\n //parts\r\n Part[] tempParts = new Part[parts.getLength()];\r\n for(int j = 0; j < parts.getLength(); j++) {\r\n Part tempPart = new Part();\r\n Element n = (Element) parts.item(j);\r\n \r\n tempPart.name = n.getAttribute(\"name\");\r\n tempPart.level = Integer.parseInt(n.getAttribute(\"level\"));\r\n tempPart.line = n.getElementsByTagName(\"line\").item(0).getTextContent();\r\n tempPart.onCard = false;\r\n tempPart.isTaken = false;\r\n \r\n //part area\r\n NodeList partArea = n.getElementsByTagName(\"area\");\r\n Node partNode = partArea.item(0);\r\n Element partBuilder = (Element) partNode;\r\n \r\n tempPart.x = Integer.parseInt(partBuilder.getAttribute(\"x\"));\r\n tempPart.y = Integer.parseInt(partBuilder.getAttribute(\"y\"));\r\n tempPart.h = Integer.parseInt(partBuilder.getAttribute(\"h\"));\r\n tempPart.w = Integer.parseInt(partBuilder.getAttribute(\"w\"));\r\n \r\n tempParts[j] = tempPart;\r\n }\r\n tempRoom.parts = tempParts;\r\n Board.currentBoard[Board.currentBoardIndex++] = tempRoom;\r\n }\r\n }", "public void parseXML(String xmlString) {\n DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance(); \n Document document = null; \n try { \n //DOM parser instance \n DocumentBuilder builder = builderFactory.newDocumentBuilder(); \n \n //parse an XML file into a DOM tree, in this case, change the filepath to xml String \n document = builder.parse(new File(filePath));\n \n //get root element, which is <Airports>\n Element rootElement = document.getDocumentElement(); \n \n //traverse child elements. retrieve all the <Airport>\n NodeList nodes = rootElement.getChildNodes(); \n for (int i=0; i < nodes.getLength(); i++) \n { \n Node node = nodes.item(i); \n if (node.getNodeType() == Node.ELEMENT_NODE) { \n Element airport = (Element) node; \n \n //process child element \n String code = airport.getAttribute(\"Code\");\n String name = airport.getAttribute(\"Name\"); \n \n // child node of airport\n NodeList airportChildren = airport.getChildNodes();\n \n // value of longitude & latitude\n String longitude = airportChildren.item(1).getTextContent();\n String latitude = airportChildren.item(2).getTextContent();\n \n Location location = new Location(longitude, latitude);\n airportList.add(new Airport(code, name, location));\n } \n } \n \n // another approach to traverse all the listNode by tagName \n /*NodeList nodeList = rootElement.getElementsByTagName(\"book\"); \n if(nodeList != null) \n { \n for (int i = 0 ; i < nodeList.getLength(); i++) \n { \n Element element = (Element)nodeList.item(i); \n String id = element.getAttribute(\"id\"); \n } \n }*/\n // add the DOM object to the airportList\n } catch (ParserConfigurationException e) { \n e.printStackTrace(); \n } catch (SAXException e) { \n e.printStackTrace(); \n } catch (IOException e) { \n e.printStackTrace(); \n } \n }", "public static void main(String[] args) throws IOException \n { \n StationDefinitionList tempStation = new StationDefinitionList(\n \"data/geoinfo.csv\");\n DataDefinitionList tempData = new DataDefinitionList(\n \"data/DataTranslation.csv\");\n DataDay.setDataDefinitionList(tempData);\n // tempStation.loadData(\"data/alldata_2011.csv\");\n // tempStation.loadData(\"data/alldata_2012.csv\");\n // tempStation.loadData(\"data/alldata_2013.csv\");\n // tempStation.loadData(\"data/alldata_2014.csv\");\n tempStation.loadData(\"data/alldata_2015.csv\");\n // tempStation.loadData(\"data/alldata_2016.csv\");\n reportStation(tempStation, tempData, \"TISH\");\n //System.out.println(\"done\");\n\n\n }", "private void loadBoardFromXML(){\n int x = 0;\n int y = 0;\n int width = 0;\n try {\n File inputFile = new File(\"Config\\\\level1.xml\");\n DocumentBuilderFactory dbFactory\n = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n Document doc = dBuilder.parse(inputFile);\n doc.getDocumentElement().normalize();\n\n NodeList nList = doc.getElementsByTagName(\"line\");\n for(int n = 0; n < nList.getLength(); ++ n){\n Node nNode = nList.item(n);\n NodeList innerList = nNode.getChildNodes();\n for(int j = 0; j < innerList.getLength(); ++j){\n Node innerNode = innerList.item(j);\n if(innerNode.getTextContent().equals(\"wall\")){\n Wall wall = new Wall(x,y);\n walls.add(wall);\n } else if(innerNode.getTextContent().equals(\"empty_field\")){\n } else if(innerNode.getTextContent().equals(\"player\")){\n player = new Player(x,y);\n } else if(innerNode.getTextContent().equals(\"box\")){\n Box box = new Box(x,y);\n boxes.add(box);\n } else if(innerNode.getTextContent().equals(\"end_position\")){\n End_position end_position = new End_position(x,y);\n end_positions.add(end_position);\n }\n x+= DISTANCE;\n }\n //next row\n y += DISTANCE;\n if(width < x){\n width = x;\n }\n if(LEVEL_WIDTH < x) LEVEL_WIDTH = x;\n x = 0;\n }\n LEVEL_HEIGHT = y;\n }catch(Exception ex){\n ex.printStackTrace();\n }\n }", "public static GraphDirected<NodeCppOSMDirected, EdgeCppOSMDirected> importOsmDirected(final String filename) {\n \t\t// setting up\n \t\tGraphDirected<NodeCppOSMDirected, EdgeCppOSMDirected> osmGraph = new GraphDirected<>();\n \t\tFileReader fis = null;\n \t\tHashMap<Long, WayNodeOSM> osmNodes = new HashMap<>();\n \t\ttry {\n \t\t\t// create a StAX XML parser\n \t\t\tfis = new FileReader(filename);\n \t\t\tXMLInputFactory factory = XMLInputFactory.newInstance();\n \t\t\tXMLStreamReader parser = factory.createXMLStreamReader(fis);\n \t\t\t// go through all events\n \t\t\tfor (int event = parser.next(); \n \t\t\t\t\tevent != XMLStreamConstants.END_DOCUMENT;\n \t\t\t\t\tevent = parser.next()){\n \t\t\t\tif (event == XMLStreamConstants.START_ELEMENT) {\n \t\t\t\t\t//we are only interested in node|way elements\n \t\t\t\t\tif (parser.getLocalName().equals(\"node\")) {\n \t\t\t\t\t\t// get the node and store it\n \t\t\t\t\t\tWayNodeOSM node = processNode(parser);\n \t\t\t\t\t\tosmNodes.put(node.getID(), node);\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tif (parser.getLocalName().equals(\"way\")) {\n \t\t\t\t\t\t\t// get the way and add it to the graph\n \t\t\t\t\t\t\t// this also creates all the included nodes\n \t\t\t\t\t\t\tOSMWay way = processWay(parser,osmNodes);\n \t\t\t\t\t\t\taddWay(osmGraph,osmNodes,way);\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// tear down the parser\n \t\t\tparser.close();\n \t\t\tparser = null;\n \t\t\tfactory = null;\n \t\t}\n \t\tcatch (IOException e){\n \t\t\tSystem.out.println(\"IOExcpetions\");\n \t\t\tSystem.exit(0);\n \t\t} catch (XMLStreamException e) {\n \t\t\tSystem.out.println(\"XMLStreamExcpetions\");\n \t\t\tSystem.exit(0);\n \t\t}\n \t\tif(fis!=null){\n \t\t\ttry {\n \t\t\t\tfis.close();\n \t\t\t} catch (IOException e) {\n \t\t\t\tSystem.exit(0);\n \t\t\t} \n \t\t}\n \t\t// reduce the number of nodes\n \t\tsimplify(osmGraph);\n \t\treturn osmGraph;\n \t}", "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}", "void importSubsystem() {\n\t\t//Update attributes of target subsystem//\r\n\t\t/////////////////////////////////////////\r\n\t\tblockElementInto.setAttribute(\"Name\", blockElementFrom.getAttribute(\"Name\"));\r\n\t\tblockElementInto.setAttribute(\"Descriptions\", blockElementFrom.getAttribute(\"Descriptions\"));\r\n\t}", "protected void importDefaultData()\n {\n LOG.info(\"Importing Data\");\n Session session = HibernateUtil.currentSession();\n Transaction tx = session.beginTransaction();\n Session dom4jSession = session.getSession(EntityMode.DOM4J);\n\n SAXReader saxReader = new SAXReader();\n try\n {\n Document document = saxReader.read(Setup.class.getResource(\"/DefaultData.xml\"));\n \n for (Object obj : document.selectNodes(\"//name\"))\n {\n Node node = (Node)obj;\n node.setText(node.getText().trim());\n }\n \n List<?> nodes = document.selectNodes(\"/Data/*/*\");\n \n for (Object obj : nodes)\n {\n Node node = (Node)obj;\n \n Class<?> clazz = Class.forName(\"at.easydiet.model.\" + node.getName());\n LOG.info(\"Importing \" + clazz.getName());\n dom4jSession.save(clazz.getName(), node);\n }\n \n session.flush();\n tx.commit();\n HibernateUtil.closeSession();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n tx.rollback();\n }\n LOG.info(\"Importing ended\");\n }", "public static GraphUndirected<NodeCppOSM, EdgeCppOSM> importOsmUndirected(final String filename) {\n \t\t// setting up\n \t\tGraphUndirected<NodeCppOSM, EdgeCppOSM> osmGraph = new GraphUndirected<>();\n \t\tFileReader fis = null;\n \t\tHashMap<Long, WayNodeOSM> osmNodes = new HashMap<>();\n \t\ttry {\n \t\t\t// create a StAX XML parser\n \t\t\tfis = new FileReader(filename);\n \t\t\tXMLInputFactory factory = XMLInputFactory.newInstance();\n \t\t\tXMLStreamReader parser = factory.createXMLStreamReader(fis);\n \t\t\t// go through all events\n \t\t\tfor (int event = parser.next(); \n \t\t\t\t\tevent != XMLStreamConstants.END_DOCUMENT;\n \t\t\t\t\tevent = parser.next()){\n \t\t\t\tif (event == XMLStreamConstants.START_ELEMENT) {\n \t\t\t\t\t//we are only interested in node|way elements\n \t\t\t\t\tif (parser.getLocalName().equals(\"node\")) {\n \t\t\t\t\t\t// get the node and store it\n \t\t\t\t\t\tWayNodeOSM node = processNode(parser);\n \t\t\t\t\t\tosmNodes.put(node.getID(), node);\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tif (parser.getLocalName().equals(\"way\")) {\n \t\t\t\t\t\t\t// get the way and add it to the graph\n \t\t\t\t\t\t\t// this also creates all the included nodes\n \t\t\t\t\t\t\tOSMWay way = processWay(parser,osmNodes);\n \t\t\t\t\t\t\taddWay(osmGraph,osmNodes,way);\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// tear down the parser\n \t\t\tparser.close();\n \t\t\tparser = null;\n \t\t\tfactory = null;\n \t\t}\n \t\tcatch (IOException e){\n \t\t\tSystem.out.println(\"IOExcpetions\");\n \t\t\tSystem.exit(0);\n \t\t} catch (XMLStreamException e) {\n \t\t\tSystem.out.println(\"XMLStreamExcpetions\");\n \t\t\tSystem.exit(0);\n \t\t}\n \t\tif(fis!=null){\n \t\t\ttry {\n \t\t\t\tfis.close();\n \t\t\t} catch (IOException e) {\n \t\t\t\tSystem.exit(0);\n \t\t\t} \n \t\t}\n \t\t// reduce the number of nodes\n \t\treturn osmGraph;\n \t}", "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\tpublic void importXML(String nodePath, ByteArrayInputStream bis,\n\t\t\tint typeImport) throws Exception {\n\n\t}", "public AirConditioner()\n\t{\n\t\tinit();\n\t}", "@PostConstruct\n public void loaddata() throws IOException {\n File file = ResourceUtils.getFile(configProvider.getFilePath());\n Reader in = new FileReader(file.getPath());\n Iterable<CSVRecord> records = CSVFormat.RFC4180.withHeader(\n \"locationid\", \"Applicant\", \"FacilityType\", \"cnn\", \"LocationDescription\", \"Address\", \"blocklot\", \"block\", \"lot\",\n \"permit\", \"Status\", \"FoodItems\", \"X\", \"Y\", \"Latitude\", \"Longitude\", \"Schedule\",\n \"dayshours\", \"NOISent\", \"Approved\", \"Received\", \"PriorPermit\", \"ExpirationDate\",\n \"Location\", \"Fire Prevention Districts\", \"Police Districts\",\n \"Supervisor Districts\", \"Zip Codes\", \"Neighborhoods (old)\"\n ).parse(in);\n\n Iterator<CSVRecord> iterator = records.iterator();\n iterator.next();\n // use our own ids because of how atomic integers work, we can't have a 0 for an id, so can't rely on outside sources.\n int i = 0;\n while (iterator.hasNext()) {\n CSVRecord record = iterator.next();\n FoodTruck truck = new FoodTruck(Float.parseFloat(record.get(\"Latitude\")), Float.parseFloat(record.get(\"Longitude\")),\n record.get(\"Address\"), record.get(\"FoodItems\"), ++i);\n //add food truck to datastore\n truckDataStore.addTruck(truck.getId(), truck);\n\n final Rectangle rect = new Rectangle(truck.getLat(), truck.getLon(),\n truck.getLat(), truck.getLon());\n //add food truck location + id to location data store.\n locationDataStore.getSpatialIndex().add(rect, truck.getId());\n }\n }", "public AirCondition(){}", "public MusicSheet loadAlcFile(String alcFilePath) {\n\t\tMusicSheet sheet = null;\n\t\tMusicSlice slice = null;\n\t\t\n\t\tString headerLine = null;\n\t\tString countLine = null;\n\t\tint noteCount = -1;\n\t\tint noteLinesReadIn = 0;\n\t\tint duplicatesCaught = 0;\n\n\t\tint prevStartTime = -1;\n\t\tStringTokenizer st;\n\t\t\n\t\tint currStartTime;\n\t\tdouble compareValue;\n\t\tint noteDuration;\n\t\t\n\t\t// TODO While I removed rest instructions from legacy .alc files a while ago, and regenerated those .alc files that had rests,\n\t\t// I guess it still bugs me that someone could manually add rests back in, and that may throw off stuff like the StatsGenerator's values or how many fingers could be needed (even though rests aren't \"hit\").\n\t\t// Should we throw an error or exception if we see a rest compare value when attempting to load an .alc file?\n\t\t// Should we try to fix it here (by erasing it and decrementing the note counter in the file), or is that too invasive, since a method called >load shouldn't be >overwriting the existing file.\n\t\t// The AlcAlterer cleans up rests already, so I'd rather not duplicate any cleanup code here anyway. Erroring out and saying when the rest is, allows the user to manually decrement the counter by 1 and delete the line.\n\t\t// If there are tons of rests, the AlcAlterer would trivially clean it up programmatically.\n\t\t// The AlcAlterer relies on first doing importAlcFileWithPlaceholders() anyway, as in, it expects there could be rests for it to ignore.\n\t\t// I don't know, just some thoughts.\n\t\t\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(new File(alcFilePath)));\n\t\t\twhile (br.ready()) {\n\t\t\t\tString line = br.readLine();\n\t\t\t\t\n\t\t\t\tif (headerLine == null) {\n\t\t\t\t\t// first line is informational only\n\t\t\t\t\theaderLine = line;\n\t\t\t\t}\n\t\t\t\telse if (countLine == null) {\n\t\t\t\t\t// second line is an integrity check line - it holds the count of notes (the number of following lines) in the song\n\t\t\t\t\tcountLine = line;\n\t\t\t\t\tnoteCount = Integer.parseInt(countLine); // if this fails, we throw an exception and return a null MusicSheet. Checking for nullness is how we determine if a file loaded successfully.\n\t\t\t\t\tsheet = new MusicSheet(headerLine, noteCount);\n\t\t\t\t} else {\n\t\t\t\t\t// all lines after the first 2 contain note information.\n\t\t\t\t\t// if there are not enough tokens in a line, or bad data (such as non-numeric characters), an exception will be thrown and the load aborted.\n\t\t\t\t\tst = new StringTokenizer(line);\n\t\t\t\t\tcurrStartTime = Integer.parseInt(st.nextToken());\n\t\t\t\t\tcompareValue = Double.parseDouble(st.nextToken());\n\t\t\t\t\tnoteDuration = Integer.parseInt(st.nextToken());\n\n\t\t\t\t\tMusicNote note = new MusicNote(compareValue, noteDuration);\n\t\t\t\t\t\n\t\t\t\t\tif (slice == null) {\n\t\t\t\t\t\tslice = new MusicSlice(currStartTime);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// initializing prevStartTime if it hasn't already.\n\t\t\t\t\t// we initialize here, so the first line in an .alc file doesn't HAVE to start on a 0.\n\t\t\t\t\tif (prevStartTime == -1) {\n\t\t\t\t\t\tprevStartTime = currStartTime;\n\t\t\t\t\t}\n\n\t\t\t\t\t// if the currStartTime is greater than prevStartTime, this means we're in a new time slice.\n\t\t\t\t\t// we need to add the old slice to the music sheet object and construct a new slice to put this music note into.\n\t\t\t\t\t// otherwise, the start times are the same, so just add it to the existing slice.\n\t\t\t\t\tif (prevStartTime != currStartTime) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// data integrity check: if the current line's start time occurs EARLIER than the previous line's, then we have bad data, most likely due to hand-editing of the file.\n\t\t\t\t\t\tif (prevStartTime > currStartTime) {\n\t\t\t\t\t\t\tSystem.out.println(\"AlcReader#loadAlcFile - error - note data is out of order. Aborting load. Confirm - prevStartTime: \" + prevStartTime + \", currStartTime: \" + currStartTime);\n\t\t\t\t\t\t\tsheet = null;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tsheet.addSlice(slice);\n\t\t\t\t\t\tslice = new MusicSlice(currStartTime);\n\t\t\t\t\t\tslice.addMusicNote(note);\n\t\t\t\t\t\tprevStartTime = currStartTime;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if we fail to add a note (such as a duplicate), then we need to decrement the valid note count\n\t\t\t\t\t\tif (!slice.addMusicNote(note)) {\n\t\t\t\t\t\t\t--noteCount;\n\t\t\t\t\t\t\t++duplicatesCaught;\n\t\t\t\t\t\t\tsheet.setNoteCount(noteCount);\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// counter for our file integrity check\n\t\t\t\t\t++noteLinesReadIn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (sheet != null) {\n\t\t\t\tsheet.addSlice(slice); // this is necessary because the newest slice hasn't been added to the musicsheet yet, due to how the while-loop handles old/new slices.\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"AlcReader#loadAlcFile - error - exception occurred while reading .alc file at path: [\" + alcFilePath + \"]. Exception: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\tsheet = null; // just ensuring we return null on an exception, although depending on when the failure occurred, it may have still been null.\n\t\t}\n\n\t\tif (headerLine == null || countLine == null) { // if the file was incomplete (only 1 or 2 lines in length), then there isn't enough data to play a song\n\t\t\tSystem.out.println(\"AlcReader#loadAlcFile - error - .alc file did not have at least 3 lines (1 informational, 1 counter, at least 1 note). File is too small to process.\");\n\t\t\tsheet = null; // the object may not be null if the file was 2 lines long, so this ensures we return null\n\t\t} else if (noteCount != (noteLinesReadIn-duplicatesCaught)) { // if we fail the integrity check, report an error and return a null object\n\t\t\tSystem.out.println(\"AlcReader#loadAlcFile - error - .alc file failed the file integrity check. The number of notes read in does not match the expected note count.\" +\n\t\t\t\t\t\t \" Read in: \" + noteLinesReadIn + \", Expected: \" + noteCount);\n\t\t\tsheet = null;\n\t\t} else if (noteCount == 0) { // if there was a note count of 0, then it is an (intentionally?) empty alc file\n\t\t\tSystem.out.println(\"AlcReader#loadAlcFile - error - .alc file had a value of 0 in the note count line. File integrity can't be validated. File will not be processed.\");\n\t\t\tsheet = null;\n\t\t} else if (noteLinesReadIn == 0) { // if there were no notes read in, we can't play a song. Although I don't think this conditional is capable of being hit.\n\t\t\tSystem.out.println(\"AlcReader#loadAlcFile - error - .alc file contains 0 note lines. File will not be processed.\");\n\t\t\tsheet = null;\n\t\t}\n\n\t\treturn sheet;\n\t}", "public NetworkGraph(String flightInfoPath) throws FileNotFoundException {\r\n\t\tString pattern = \",\";\r\n\t\tString line = \"\";\r\n\r\n\t\tallFlightData = new ArrayList<Flight>();\r\n\t\tairportNames = new ArrayList<String>();\r\n\t\tallAirports = new ArrayList<Airport>();\r\n\t\ttry {\r\n\t\t\tFileReader flight = new FileReader(flightInfoPath);\r\n\t\t\tScanner readFlightData = new Scanner(flight);\r\n\t\t\treadFlightData.nextLine();\r\n\t\t\twhile (readFlightData.hasNextLine()) {\r\n\t\t\t\tline = readFlightData.nextLine();\r\n\t\t\t\tString[] values = line.split(pattern);\r\n\t\t\t\t\tif(airportNames.contains(values[0])){\r\n\t\t\t\t\t\tint index = airportNames.indexOf(values[0]);\r\n\t\t\t\t\t\tif(airportNames.contains(values[1])){\r\n\t\t\t\t\t\t\tint destinationIndex = airportNames.indexOf(values[1]);\r\n\t\t\t\t\t\t\tallAirports.get(destinationIndex).setPrevious(allAirports.get(index));\r\n\t\t\t\t\t\t\tflights = new Flight(allAirports.get(destinationIndex), values[2], Integer.parseInt(values[3]), Integer.parseInt(values[4]), Integer.parseInt(values[5]), Integer.parseInt(values[6]), Double.parseDouble(values[7]));\r\n\t\t\t\t\t\t\tallAirports.get(index).addFilght(flights);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\tairportDestination = new Airport(values[1]);\r\n\t\t\t\t\t\tairportDestination.setPrevious(allAirports.get(index));\r\n\t\t\t\t\t\tflights = new Flight(airportDestination, values[2], Integer.parseInt(values[3]), Integer.parseInt(values[4]), Integer.parseInt(values[5]), Integer.parseInt(values[6]), Double.parseDouble(values[7]));\r\n\t\t\t\t\t\tallAirports.get(index).addFilght(flights);\r\n\t\t\t\t\t\tallAirports.add(airportDestination);\r\n\t\t\t\t\t\tairportNames.add(values[1]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tairportOrigin = new Airport(values[0]);\r\n\t\t\t\t\t\tif(airportNames.contains(values[1])){\r\n\t\t\t\t\t\t\tint index = airportNames.indexOf(values[1]);\r\n\t\t\t\t\t\t\tallAirports.get(index).setPrevious(airportOrigin);\r\n\t\t\t\t\t\t\tflights = new Flight(allAirports.get(index), values[2], Integer.parseInt(values[3]), Integer.parseInt(values[4]), Integer.parseInt(values[5]), Integer.parseInt(values[6]), Double.parseDouble(values[7]));\r\n\t\t\t\t\t\t\tairportOrigin.addFilght(flights);\r\n\t\t\t\t\t\t\tallAirports.add(airportOrigin);\r\n\t\t\t\t\t\t\tairportNames.add(values[0]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tairportNames.add(values[0]);\r\n\t\t\t\t\t\t\tairportNames.add(values[1]);\r\n\t\t\t\t\t\t\tairportOrigin = new Airport(values[0]);\r\n\t\t\t\t\t\t\tairportDestination = new Airport(values[1]);\r\n\t\t\t\t\t\t\tflights = new Flight(airportDestination, values[2], Integer.parseInt(values[3]), Integer.parseInt(values[4]), Integer.parseInt(values[5]), Integer.parseInt(values[6]), Double.parseDouble(values[7]));\r\n\t\t\t\t\t\t\tairportOrigin.addFilght(flights);\r\n\t\t\t\t\t\t\tairportDestination.setPrevious(airportOrigin);\r\n\t\t\t\t\t\t\tallAirports.add(airportOrigin);\r\n\t\t\t\t\t\t\tallAirports.add(airportDestination);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treadFlightData.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void selectedTx(){\r\n\r\n tpoCheck(); //check tpo\r\n channelNumber = Double.parseDouble(channel.getText());//set channelNumber\r\n System.out.println(\"Channel number: \"+channelNumber);\r\n\r\n System.out.println(\" \"); //just adding some space for clarity on console print out\r\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder builder = null;\r\n try {\r\n builder = factory.newDocumentBuilder();\r\n } catch (ParserConfigurationException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n // Load the input XML document, parse it and return an instance of the document class. will need to make this work on any computer somehow.\r\n Document document = null;\r\n try {\r\n document = builder.parse(new File(\"test.xml\"));\r\n } catch (SAXException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n //refer to Transmitter.java\r\n List<Transmitter> transmitters = new ArrayList<Transmitter>();\r\n NodeList nodeList = document.getDocumentElement().getChildNodes();\r\n for (int i = 0; i < nodeList.getLength(); i++) { //loop through to get every item and its attributes from the test.xml\r\n Node node = nodeList.item(i);\r\n\r\n if (node.getNodeType() == Node.ELEMENT_NODE) {\r\n Element elem = (Element) node;\r\n\r\n // Get the value of the ID attribute.\r\n ID = node.getAttributes().getNamedItem(\"ID\").getNodeValue();//transmitters(i.e. ULXTE-2)\r\n // Get the value of all sub-elements.\r\n pa = Integer.parseInt(elem.getElementsByTagName(\"PA\").item(0).getChildNodes().item(0).getNodeValue());//pa modules\r\n cabinets = Integer.parseInt(elem.getElementsByTagName(\"Cabinets\").item(0).getChildNodes().item(0).getNodeValue());// cabinets\r\n powerblocks = Integer.parseInt(elem.getElementsByTagName(\"Powerblocks\").item(0).getChildNodes().item(0).getNodeValue());// power blocks\r\n linesize = elem.getElementsByTagName(\"Linesize\").item(0).getChildNodes().item(0).getNodeValue();//line size\r\n powerRating = Double.parseDouble(elem.getElementsByTagName(\"Power\").item(0).getChildNodes().item(0).getNodeValue());\r\n\r\n transmitters.add(new Transmitter(ID, pa, cabinets, powerblocks, linesize, powerRating));//call constructor in Transmitter.java to set values for variables\r\n\r\n /** breaks for loop when ID == tx_cb value. need ID for populating label element. display info to console about selection **/\r\n if (ID.equals(tx_cb.getValue())) {\r\n NodeList power = elem.getElementsByTagName(\"Power\");\r\n Node node2 = power.item(0);\r\n System.out.println(ID + \" selected\");\r\n System.out.println(pa + \" PA Modules for \" + ID);\r\n System.out.println(\"Power rating: \"+powerRating);\r\n break;\r\n }\r\n }\r\n }\r\n for (Transmitter tx : transmitters) {\r\n if (ID.equals(tx_cb.getValue())) {\r\n TX_Text.setText(tx.toString());\r\n }\r\n }\r\n }", "public void load() {\n theDataSet = getParent().getCurrentDataset();\n currentSession = getParent().getSession();\n\n airlineContainer.setOnKeyPressed(new EventHandler<KeyEvent>(){\n @Override\n public void handle(KeyEvent event) {\n if (event.getCode().equals(KeyCode.ENTER)){\n editAirline();\n }\n }\n });\n\n toEdit = theDataSet.getAirlineDictionary().get(currentSession.getAirlineToEdit());\n\n airlNameEdit.setText(toEdit.getName());\n airlAliasEdit.setText(toEdit.getAlias());\n airlIATAEdit.setText(toEdit.getIATA());\n airlICAOEdit.setText(toEdit.getICAO());\n airlCallsignEdit.setText(toEdit.getCallSign());\n airlCountryEdit.setText(toEdit.getCountryName());\n airlActiveEdit.setText(toEdit.getActive());\n }", "protected String importRow(final String aRow, final XmlChangeWriter aChangeWriter) throws IOException, ParseException {\r\n\t\t//System.out.println(\"============ importing row:\\n\" + aRow + \"\\n===\");\r\n\t\tString name = aRow.replace('\\n', ' ').replaceFirst(\" of type .*\", \"\").replaceFirst(\".*admin area \", \"\").trim();\r\n\t\tString code = aRow.replace('\\n', ' ').replaceFirst(\".*TMCAdminArea_\", \"\").replaceFirst(\".osm.*\", \"\").trim();\r\n\t\tSystem.out.println(\"name: \\\"\" + name + \"\\\"\");\r\n\t\tSystem.out.println(\"code: \" + code);\r\n\t\t// TODO Auto-generated method stub\r\n\t\t// is this a \"Kreis\"?\r\n\t\t// TODO: boundary=administrative + admin_level=8 == \"Order 4 area\"(Stadt/Gemeinde)\r\n\t\t// TODO: boundary=administrative + admin_level=6 == \"Order 3 area\"(Kreis)\r\n\t\tif (aRow.toLowerCase().indexOf(\"order 3 area\") != -1) {\r\n\t\t\tSystem.out.println(\"code \" + code + \" is an order 3 area(Kreis)\\n============\");\r\n\t\t\treturn importOrder3Area(aRow, name, code, aChangeWriter);\r\n\t\t}\r\n\t\tif (aRow.toLowerCase().indexOf(\"order 4 area\") != -1) {\r\n\t\t\tSystem.out.println(\"code \" + code + \" is an order 4 area(Stadt/Gemeinde)\\n============\");\r\n\t\t\tString retval = importOrder4Area(aRow, name, code, aChangeWriter);\r\n\t\t\tif (retval == null) {\r\n\t\t\t\tretval = importOrder4AreaWays(aRow, name, code, aChangeWriter);\r\n\t\t\t}\r\n\t\t\treturn retval;\r\n\t\t}\r\n\t\tSystem.out.println(\"code is \" + code + \" not an order 3 or order 4 area\\n============\");\r\n\t\treturn null;\r\n\t}", "protected void inizializzazione2()\r\n\t\t\tthrows RestrizioniSpecException {\r\n\t\t\t// si preleva una lista che contiene tutti gli AttacDecl\r\n\t\t\t// che hanno idecl come interazione di input\r\n\t\t\tArchiAttachments archiAttachments = this.archiType.getTopologia().getAttachments();\r\n\t\t\t// list2 contiene i collegamenti in cui l'istanza che si sta considerando\r\n\t\t\t// risulta essere un'istanza di input\r\n\t\t\tList<AttacDecl> list2 = getAttacDeclsAEIInput(idecl.getName(), archiAttachments);\r\n\t\t\tattacsDeclInput = list2;\r\n\t\t\t// si prelevano i nomi degli AEIs di output\r\n\t\t\t// list3 contiene i nomi degli aei di output in cui l'aei attuale\r\n\t\t\t// risulta essere l'aei di input\r\n\t\t\tList<String> list3 = getAEIsOutputFromAttacDecls(list2);\r\n\t\t\t// si preleva una lista che contiene tutti gli AttacDecl\r\n\t\t\t// che hanno idecl come aei di output\r\n\t\t\tList<AttacDecl> list = getAttacDeclsAEIOutput(idecl.getName(), archiAttachments);\r\n\t\t\tattacsDeclOutput = list;\r\n\t\t\t// si prelevano i nomi degli AEIs di input tra i collegamenti in cui l'istanza considerata\r\n\t\t\t// risulta essere un AEI di output\r\n\t\t\tList<String> list5 = getAEIsInputFromAttacDecls(list);\r\n\t\t\tArchiElemInstances archiElemInstances = this.archiType.getTopologia().getAEIs();\r\n\t\t\t// si prelevano le dichiarazioni degli AEI di output collegati\r\n\t\t\tList<AEIdecl> list9 = getAEIsFromNames(list3, archiElemInstances);\r\n\t\t\tAEIsDeclInput = list9;\r\n\t\t\t// si prelevano le dichiarazioni degli AEI di input collegati\r\n\t\t\tList<AEIdecl> list10 = getAEIsFromNames(list5, archiElemInstances);\r\n\t\t\tAEIsDeclOutput = list10;\r\n\t\t\t// si restituiscono delle liste contenenti le equivalenze \r\n\t\t\t// corrispondeti agli ElemType di list9 e list10\r\n\t\t\tList<IEquivalenza> list7 = getEquivalenze(this.archiType, AEIsDeclInput);\r\n\t\t\tthis.equivalenzeInput = list7;\r\n\t\t\tList<IEquivalenza> list8 = getEquivalenze(this.archiType, AEIsDeclOutput);\r\n\t\t\tthis.equivalenzeOutput = list8;\r\n\t\t\t}", "public synchronized void outputRule() throws IOException\n{\n File f1 = for_program.getUniverse().getBaseDirectory();\n File f2 = new File(f1,RULE_FILE);\n FileWriter fw = new FileWriter(f2,true);\n IvyXmlWriter xw = new IvyXmlWriter(fw);\n\n xw.begin(\"RULE\");\n xw.field(\"WHEN\",at_time);\n xw.field(\"WHENS\",new Date(at_time).toString());\n\n xw.begin(\"WORLD\");\n for (Map.Entry<UpodParameter,Object> ent : from_world.getParameters().entrySet()) {\n UpodParameter pnm = ent.getKey();\n Object pvl = ent.getValue();\n if (pvl == null) continue;\n xw.begin(\"PARAM\");\n xw.field(\"NAME\",pnm.getName());\n xw.field(\"TYPE\",pvl.getClass().toString());\n xw.cdata(pvl.toString());\n xw.end(\"PARAM\");\n }\n xw.end(\"WORLD\");\n\n for (Map.Entry<UpodDevice,Map<UpodParameter,Object>> ent : sensor_values.entrySet()) {\n UpodDevice us = ent.getKey();\n xw.begin(\"SENSOR\");\n xw.field(\"NAME\",us.getName());\n xw.field(\"ID\",us.getUID());\n for (Map.Entry<UpodParameter,Object> pent : ent.getValue().entrySet()) {\n\t xw.begin(\"PARAM\");\n\t xw.field(\"NAME\",pent.getKey().getName());\n\t xw.cdata(pent.getValue().toString());\n\t xw.end(\"PARAM\");\n }\n xw.end(\"SENSOR\");\n }\n for (Map.Entry<UpodDevice,Map<UpodParameter,Object>> ent : entity_values.entrySet()) {\n UpodDevice ue = ent.getKey();\n xw.begin(\"ENTITY\");\n xw.field(\"NAME\",ue.getName());\n xw.field(\"ID\",ue.getUID());\n for (Map.Entry<UpodParameter,Object> pent : ent.getValue().entrySet()) {\n\t xw.begin(\"PARAM\");\n\t xw.field(\"NAME\",pent.getKey().getName());\n\t xw.cdata(pent.getValue().toString());\n\t xw.end(\"PARAM\");\n }\n xw.end(\"ENTITY\");\n }\n\n for (CalendarEvent ce : calendar_events) {\n if (ce.getStartTime() > at_time + 5*T_MINUTE) continue;\n if (ce.getEndTime() < at_time - 5*T_MINUTE) continue;\n xw.begin(\"CALENDAR\");\n xw.field(\"START\",ce.getStartTime());\n xw.field(\"STARTS\",new Date(ce.getStartTime()).toString());\n xw.field(\"END\",ce.getEndTime());\n xw.field(\"ENDS\",new Date(ce.getEndTime()).toString());\n for (Map.Entry<String,String> ent : ce.getProperties().entrySet()) {\n\t xw.begin(\"FIELD\");\n\t xw.field(\"NAME\",ent.getKey());\n\t xw.field(\"VALUE\",ent.getValue());\n\t xw.end(\"FIELD\");\n }\n xw.end(\"CALENDAR\");\n }\n xw.end(\"RULE\");\n xw.close();\n}", "public ProductionLine buildFromFile(String path) throws ParserConfigurationException, IOException, SAXException {\n Document doc = DocumentBuilderFactory\n .newInstance()\n .newDocumentBuilder()\n .parse(new File(path));\n doc.getDocumentElement().normalize();\n\n HashMap<String, ProductionUnit> productionUnits = new HashMap<>();\n\n // Get list of stages\n NodeList stageNodes = doc.getElementsByTagName(\"ProductionStage\");\n\n // Loop through stages\n for (int i = 0; i < stageNodes.getLength(); i++) {\n\n Node node = stageNodes.item(i);\n if (node.getNodeType() == Node.ELEMENT_NODE) {\n Element stage = (Element) node;\n\n // Create station\n String name = stage.getElementsByTagName(\"Name\").item(0).getTextContent();\n\n ProductionStage productionStage = getStage(productionUnits, name);\n\n if (productionStage == null) continue;\n\n NodeList predecessors = stage.getElementsByTagName(\"Predecessors\");\n if (predecessors.getLength() > 0) {\n Node sNode = predecessors.item(0);\n if (node.getNodeType() == Node.ELEMENT_NODE) {\n Element ePredecessors = (Element) sNode;\n NodeList stages = ePredecessors.getElementsByTagName(\"Stage\");\n for (int j = 0; j < stages.getLength(); j++) {\n productionStage.addPredecessor(getStage(productionUnits, stages.item(j).getTextContent()));\n }\n }\n }\n\n NodeList successors = stage.getElementsByTagName(\"Successors\");\n if (successors.getLength() > 0) {\n Node sNode = successors.item(0);\n if (node.getNodeType() == Node.ELEMENT_NODE) {\n Element eSuccessors = (Element) sNode;\n NodeList stages = eSuccessors.getElementsByTagName(\"Stage\");\n for (int j = 0; j < stages.getLength(); j++) {\n productionStage.addSuccessor(getStage(productionUnits, stages.item(j).getTextContent()));\n }\n }\n }\n\n NodeList input = stage.getElementsByTagName(\"Input\");\n if (input.getLength() > 0) {\n InterStageStorage storage = getStorage(productionUnits, input.item(0).getTextContent());\n if (storage == null) continue;\n storages.add(storage);\n productionStage.setInput(storage);\n } else {\n // All stages except beginning\n productionStage.updateState(ProductionStage.State.IDLE);\n }\n\n NodeList output = stage.getElementsByTagName(\"Output\");\n if (output.getLength() > 0) {\n InterStageStorage storage = getStorage(productionUnits, output.item(0).getTextContent());\n if (storage == null) continue;\n storages.add(storage);\n productionStage.setOutput(storage);\n }\n\n stages.add(productionStage);\n }\n }\n return this;\n }", "public void initVariables() throws Exception {\n\n\t\tclockTomasulo = clockTomasulo.getInstance();\n\t\tclockTomasulo.ResetClock();\n\t\t// OperationFileParser file_parser = new OperationFileParser( data_file\n\t\t// );\n\n\t\t// Iniatialize containers for instructions and registers\n\t\t// operations = new OperationList();\n\t\tregistersTomasulo = new RegisterFiles();\n\n\t\t// file_parser.parseFile( operations );\n\n\t\t/*\n\t\t * // Create and intialize Reservation Stations alu_rsTomasulo = new\n\t\t * ALUStation[8];\n\t\t * \n\t\t * \n\t\t * alu_rsTomasulo[0] = new ALUStation(\"Int1\"); alu_rsTomasulo[1] = new\n\t\t * ALUStation(\"Add1\"); alu_rsTomasulo[2] = new ALUStation(\"Add2\");\n\t\t * alu_rsTomasulo[3] = new ALUStation(\"Mul1\"); alu_rsTomasulo[4] = new\n\t\t * ALUStation(\"Mul2\"); alu_rsTomasulo[5] = new ALUStation(\"Div1\");\n\t\t * alu_rsTomasulo[6] = new ALUStation(\"Div2\"); alu_rsTomasulo[7] = new\n\t\t * ALUStation(\"Div3\");\n\t\t */\n\t\t/*\n\t\t * MemReservationTomasulo[0] = new MemStation(\"Load1\");\n\t\t * MemReservationTomasulo[1] = new MemStation(\"Load2\");\n\t\t * MemReservationTomasulo[2] = new MemStation(\"Store1\");\n\t\t * MemReservationTomasulo[3] = new MemStation(\"Store2\");\n\t\t */\n\n\t\tinstruction_to_stationTomasulo = new HashMap<String, Integer[]>();\n\t\t// Memory Indices\n\t\tinstruction_to_stationTomasulo.put(\"LD\", new Integer[] { 0, 1 });\n\t\tinstruction_to_stationTomasulo.put(\"SD\", new Integer[] { 2, 3 });\n\n\t\t/*\n\t\t * // ALU Indices instruction_to_stationTomasulo.put(\"DADDI\", new\n\t\t * Integer[] { 0 }); instruction_to_stationTomasulo.put(\"ADDD\", new\n\t\t * Integer[] { 1, 2 }); instruction_to_stationTomasulo.put(\"SUBD\", new\n\t\t * Integer[] { 1, 2 }); instruction_to_stationTomasulo.put(\"MULD\", new\n\t\t * Integer[] { 3, 4, 5 }); instruction_to_stationTomasulo.put(\"DIVD\",\n\t\t * new Integer[] { 6, 7, 8, 9 });\n\t\t */\n\n\t\ttry {\n\t\t\t/*\n\t\t\t * [pipeline] PipeFPAddSub=1 PipeFPMult=1 PipeFPDivide=1\n\t\t\t * PipeIntDivide=1 [scorboard] ScoreInteger=1 ScoreAddSub=2\n\t\t\t * ScoreMult=10 ScoreDivide=40 [tomasulo] TomInteger=2 TomAddI=1\n\t\t\t * TomAddSub=4 TomMult=7 TomDivide=25\n\t\t\t */\n\t\t\tWini ini;\n\t\t\t/* Load the ini file. */\n\t\t\tini = new Wini(new File(\"config/settings.ini\"));\n\n\t\t\tint TomInteger = ini.get(\"tomasulo\", \"TomInteger\", int.class);\n\t\t\tint TomAddI = ini.get(\"tomasulo\", \"TomAddI\", int.class);\n\t\t\tint TomAddSub = ini.get(\"tomasulo\", \"TomAddSub\", int.class);\n\t\t\tint TomMult = ini.get(\"tomasulo\", \"TomMult\", int.class);\n\t\t\tint TomDivide = ini.get(\"tomasulo\", \"TomDivide\", int.class);\n\n\t\t\tint TomNumInteger = ini.get(\"tomasulo\", \"TomNumInteger\", int.class);\n\t\t\tint TomNumAddSub = ini.get(\"tomasulo\", \"TomNumAddSub\", int.class);\n\t\t\tint TomNumMult = ini.get(\"tomasulo\", \"TomNumMult\", int.class);\n\t\t\tint TomNumDiv = ini.get(\"tomasulo\", \"TomNumDiv\", int.class);\n\t\t\tint TomNumLoad = ini.get(\"tomasulo\", \"TomNumLoad\", int.class);\n\t\t\tint TomNumStore = ini.get(\"tomasulo\", \"TomNumStore\", int.class);\n\n\t\t\tInteger[] arrayTomNumInteger;\n\t\t\tInteger[] arrayTomNumAddSub;\n\t\t\tInteger[] arrayTomNumMult;\n\t\t\tInteger[] arrayTomNumDiv;\n\n\t\t\t// Create a mapping of instructions to execution time\n\t\t\tinstruction_to_timeTomasulo = new HashMap<String, Integer>();\n\t\t\t// Memory Instructions\n\t\t\tinstruction_to_timeTomasulo.put(\"LD\", new Integer(TomInteger));\n\t\t\tinstruction_to_timeTomasulo.put(\"SD\", new Integer(TomInteger));\n\n\t\t\t// ALU Instructions\n\t\t\tinstruction_to_timeTomasulo.put(\"DADDI\", new Integer(TomAddI));\n\t\t\tinstruction_to_timeTomasulo.put(\"DADD\", new Integer(TomAddSub));\n\t\t\tinstruction_to_timeTomasulo.put(\"ADDD\", new Integer(TomAddSub));\n\t\t\tinstruction_to_timeTomasulo.put(\"SUBD\", new Integer(TomAddSub));\n\t\t\tinstruction_to_timeTomasulo.put(\"MULD\", new Integer(TomMult));\n\t\t\tinstruction_to_timeTomasulo.put(\"DIVD\", new Integer(TomDivide));\n\n\t\t\t// Create and intialize Reservation Stations\n\t\t\talu_rsTomasulo = new ALUStation[TomNumInteger + TomNumAddSub + TomNumMult + TomNumDiv];\n\n\t\t\t// ALU Indices\n\t\t\tarrayTomNumInteger = new Integer[TomNumInteger];\n\t\t\tfor (int i = 0; i < TomNumInteger; i++) {\n\t\t\t\talu_rsTomasulo[i] = new ALUStation(\"Int\" + (i + 1));\n\t\t\t\tarrayTomNumInteger[i] = i;\n\t\t\t}\n\t\t\tif (arrayTomNumInteger.length > 0)\n\t\t\t\tinstruction_to_stationTomasulo.put(\"DADDI\", arrayTomNumInteger);\n\n\t\t\tarrayTomNumAddSub = new Integer[TomNumAddSub];\n\t\t\tfor (int i = TomNumInteger; i < TomNumInteger + TomNumAddSub; i++) {\n\t\t\t\talu_rsTomasulo[i] = new ALUStation(\"Add\" + (i - TomNumInteger + 1));\n\t\t\t\tarrayTomNumAddSub[i - TomNumInteger] = i;\n\t\t\t}\n\t\t\tif (arrayTomNumAddSub.length > 0) {\n\t\t\t\tinstruction_to_stationTomasulo.put(\"ADDD\", arrayTomNumAddSub);\n\t\t\t\tinstruction_to_stationTomasulo.put(\"SUBD\", arrayTomNumAddSub);\n\t\t\t}\n\n\t\t\tarrayTomNumMult = new Integer[TomNumMult];\n\t\t\tfor (int i = TomNumInteger + TomNumAddSub; i < TomNumInteger + TomNumAddSub + TomNumMult; i++) {\n\t\t\t\talu_rsTomasulo[i] = new ALUStation(\"Mul\" + (i - TomNumInteger - TomNumAddSub + 1));\n\t\t\t\tarrayTomNumMult[i - TomNumInteger - TomNumAddSub] = i;\n\t\t\t}\n\t\t\tif (arrayTomNumMult.length > 0)\n\t\t\t\tinstruction_to_stationTomasulo.put(\"MULD\", arrayTomNumMult);\n\n\t\t\tarrayTomNumDiv = new Integer[TomNumDiv];\n\t\t\tfor (int i = TomNumInteger + TomNumAddSub + TomNumMult; i < TomNumInteger + TomNumAddSub + TomNumMult\n\t\t\t\t\t+ TomNumDiv; i++) {\n\t\t\t\talu_rsTomasulo[i] = new ALUStation(\"Div\" + (i - TomNumInteger - TomNumAddSub - TomNumMult + 1));\n\t\t\t\tarrayTomNumDiv[i - TomNumInteger - TomNumAddSub - TomNumMult] = i;\n\t\t\t}\n\t\t\tif (arrayTomNumDiv.length > 0)\n\t\t\t\tinstruction_to_stationTomasulo.put(\"DIVD\", arrayTomNumDiv);\n\n\t\t\t/*\n\t\t\t * alu_rsTomasulo[0] = new ALUStation(\"Int1\"); alu_rsTomasulo[1] =\n\t\t\t * new ALUStation(\"Add1\"); alu_rsTomasulo[2] = new\n\t\t\t * ALUStation(\"Add2\"); alu_rsTomasulo[3] = new ALUStation(\"Mul1\");\n\t\t\t * alu_rsTomasulo[4] = new ALUStation(\"Mul2\"); alu_rsTomasulo[5] =\n\t\t\t * new ALUStation(\"Div1\"); alu_rsTomasulo[6] = new\n\t\t\t * ALUStation(\"Div2\"); alu_rsTomasulo[7] = new ALUStation(\"Div3\");\n\t\t\t */\n\n\t\t\t// array contain of number of load andstore units\n\t\t\tMemReservationTomasulo = new MemStation[TomNumLoad + TomNumStore];\n\t\t\tfor (int i = 0; i < TomNumLoad; i++) {\n\t\t\t\tMemReservationTomasulo[i] = new MemStation(\"Load\" + (i + 1));\n\n\t\t\t}\n\t\t\tfor (int i = TomNumLoad; i < TomNumLoad + TomNumStore; i++) {\n\t\t\t\tMemReservationTomasulo[i] = new MemStation(\"Store\" + (i - TomNumLoad + 1));\n\n\t\t\t}\n\t\t\t// MemReservationTomasulo[0] = new MemStation(\"Load1\");\n\t\t\t// MemReservationTomasulo[1] = new MemStation(\"Load2\");\n\t\t\t// MemReservationTomasulo[2] = new MemStation(\"Store1\");\n\t\t\t// MemReservationTomasulo[3] = new MemStation(\"Store2\");\n\n\t\t} catch (InvalidFileFormatException e) {\n\t\t\tSystem.out.println(\"Invalid file format.\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Problem reading file.\");\n\t\t}\n\n\t\t// Mapping of aliases to Registers\n\t\talias_to_registerTomasulo = new HashMap<String, String>();\n\n\t\t// Initalize the Memory Buffer\n\t\tMemoryBufferTomasulo = new HashMap<String, Integer>();\n\n\t\tCurrentInstTomasulo = 1;\n\n\t}", "public ArrayList<Airport> loadXMLFromString(String xml) throws Exception\n\t\t\t{\n\t\t\t DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\t\t DocumentBuilder builder = factory.newDocumentBuilder();\n\t\t\t InputSource is = new InputSource(new StringReader(xml));\n\t\t\t Document airports = builder.parse(is);\n\t\t\t \n\t\t\t //Airport oneAirport = new Airport();\n\t\t\t ArrayList<Airport> allAirports = new ArrayList<Airport>();\n\t\t\t \n\t\t\t NodeList airportlist = airports.getElementsByTagName(\"Airport\");\n\t\t\t \n\t\t\t for(int i=0; i<airportlist.getLength(); i++){\n\t\t\t Airport oneAirport = new Airport();\n\t Element airport=(Element)airportlist.item(i);\n\t /*parse attributes*/\n\t\t\t oneAirport.setCode(airport.getAttribute(\"Code\"));\n\t\t\t oneAirport.setName(airport.getAttribute(\"Name\"));\n\t\t\t /*parse child nodes*/\n\t\t\t oneAirport.setLatitude(Double.parseDouble(airport.getElementsByTagName(\"Latitude\").item(0).getTextContent()));\n\t\t\t oneAirport.setLongitude(Double.parseDouble(airport.getElementsByTagName(\"Longitude\").item(0).getTextContent()));\n\t\t\t allAirports.add(oneAirport);\n\t\t }\n\t\t\t \n\t\t\t return allAirports;\n\t\t\t}", "public void parseFile(){\n try{\n BufferedReader br = new BufferedReader(new FileReader(\"ElevatorConfig.txt\"));\n \n String fileRead;\n \n totalSimulatedTime = 1000;\n Integer.parseInt(br.readLine());\n simulatedSecondRate = 30;\n Integer.parseInt(br.readLine());\n \n for (int onFloor = 0; onFloor< 5; onFloor++){\n \n fileRead = br.readLine(); \n String[] tokenize = fileRead.split(\";\");\n for (int i = 0; i < tokenize.length; i++){\n String[] floorArrayContent = tokenize[i].split(\" \");\n \n int destinationFloor = Integer.parseInt(floorArrayContent[1]);\n int numPassengers = Integer.parseInt(floorArrayContent[0]);\n int timePeriod = Integer.parseInt(floorArrayContent[2]);\n passengerArrivals.get(onFloor).add(new PassengerArrival(numPassengers, destinationFloor, timePeriod));\n }\n }\n \n br.close();\n \n } catch(FileNotFoundException e){ \n System.out.println(e);\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n\n }", "public void run()\r\n {\n setErrors(0);\r\n if (!setStatus(\"INITIALIZING\"))\r\n {\r\n return;\r\n }\r\n\r\n String _dirAnalysis = _file.getParent();\r\n String _baseName = FileUtil.getBaseName(_file);\r\n File dirWork = new File(_dirAnalysis, _baseName + \".import.work\");\r\n File workFile = new File(dirWork.getAbsolutePath(), _file.getName());\r\n\r\n boolean completeStatus = false;\r\n try\r\n {\r\n if (!dirWork.exists() && !dirWork.mkdir())\r\n {\r\n getLogger().error(\"Failed create working folder \"+dirWork.getAbsolutePath()+\".\");\r\n return;\r\n }\r\n\r\n try\r\n {\r\n FileUtils.copyFile(_file, workFile);\r\n }\r\n catch (IOException x)\r\n {\r\n getLogger().error(\"Failed to move Mascot result file to working folder as \"+workFile.getAbsolutePath(), x);\r\n return;\r\n }\r\n\r\n // let's import the .dat file\r\n super.run();\r\n if (getErrors() == 0)\r\n {\r\n\r\n if (!workFile.delete())\r\n {\r\n getLogger().error(\"Failed to delete \" + workFile.getAbsolutePath());\r\n return;\r\n }\r\n else if (!dirWork.delete())\r\n {\r\n getLogger().error(\"Failed to delete \" + dirWork.getAbsolutePath());\r\n return;\r\n }\r\n else\r\n {\r\n setStatus(TaskStatus.complete);\r\n }\r\n completeStatus = true;\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n getLogger().error(\"MS2 import failed\", e);\r\n }\r\n finally\r\n {\r\n if (!completeStatus)\r\n {\r\n setStatus(TaskStatus.error);\r\n }\r\n if (workFile.exists())\r\n {\r\n workFile.delete();\r\n }\r\n }\r\n }", "private void initFromFile(Configuration config) throws FileNotFoundException {\n String file = config.getString(OrderFile_Type_Property_Name);\n List<List<String>> contents = FileUtils.readCsv(file);\n int index;\n for (List<String> rowContent : contents) {\n index = 0;\n String accountId = rowContent.get(index++);\n String orderId = rowContent.get(index++);\n String exchange = rowContent.get(index++);\n String stockId = rowContent.get(index++);\n String tradingDay = rowContent.get(index++);\n\n\n if (this.date == 0) {\n // 2019-11-13 00:00:00\n this.date = TimeUtils.formatTradeDate(tradingDay);\n } else if (TimeUtils.formatTradeDate(tradingDay) != date) {\n throw new InitializationException(MessageFormat.format(\"Two different trading days are sent to system, {0} and {1}.\", String.valueOf(this.date), String.valueOf(TimeUtils.formatTradeDate(tradingDay))));\n }\n\n String side = rowContent.get(index++);\n String type = rowContent.get(index++);\n double price = Double.valueOf(rowContent.get(index++));\n String algo = rowContent.get(index++);\n String startTime = rowContent.get(index++);\n String endTime = rowContent.get(index++);\n int qty = Integer.valueOf(rowContent.get(index++));\n double pov = Double.valueOf(rowContent.get(index));\n\n Order order = new Order(orderId, accountId, stockId, startTime, endTime, algo, type, price, pov, side, qty, exchange);\n this.cache.put(orderId, order);\n }\n }", "public void initializeEngines(AircraftEnum aircraftName) {\n\t\t\n\t\tswitch(aircraftName) {\n\t\tcase ATR72:\n\t\t\t_engineNumber = 2;\n\t\t\t_engineType = EngineTypeEnum.TURBOPROP;\n\t\t\t\tengineList.add(new Engine(aircraftName, \"Engine_1\", \"\",8.6100, 4.0500, 1.3200, _theAircraft));\n\t\t\t\tengineList.add(new Engine(aircraftName, \"Engine_2\", \"\",8.6100, -4.0500, 1.3200, _theAircraft));\n\t\t\tbreak;\n\t\tcase B747_100B:\n\t\t\t_engineNumber = 4;\n\t\t\t_engineType = EngineTypeEnum.TURBOFAN;\n\t\t\t\tengineList.add(new Engine(aircraftName, \"Engine_1\" , \"\", 23.770, 11.820, -2.462, _theAircraft));\n\t\t\t\tengineList.add(new Engine(aircraftName, \"Engine_1\" , \"\", 31.693, 21.951, -2.462, _theAircraft));\n\t\t\t\tengineList.add(new Engine(aircraftName, \"Engine_1\" , \"\", 23.770, -11.820, -2.462, _theAircraft));\n\t\t\t\tengineList.add(new Engine(aircraftName, \"Engine_1\" , \"\", 31.693, -21.951, -2.462, _theAircraft));\n\t\t\t\t\n\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t\tcase AGILE_DC1:\n\t\t\t_engineNumber = 2;\n\t\t\t_engineType = EngineTypeEnum.TURBOFAN;\n//\t\t\tfor (int i=0; i < _engineNumber; i++) {\n//\t\t\t\tengineList.add(new Engine(aircraftName, \"Engine_\" + i, \"\", 0.0, 0.0, 0.0, _theAircraft));\n\t\t\tengineList.add(new Engine(aircraftName, \"Engine_1\", \"\", 12.891, 4.869, -1.782, _theAircraft));\n\t\t\tengineList.add(new Engine(aircraftName, \"Engine_2\", \"\", 12.891, -4.869, -1.782, _theAircraft));\n//\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase IRON:\n\t\t\t_engineNumber = 2;\n\t\t\t_engineType = EngineTypeEnum.TURBOPROP;\n//\t\t\tfor (int i=0; i < _engineNumber; i++) {\n//\t\t\t\tengineList.add(new Engine(aircraftName, \"Engine_\" + i, \"\", 0.0, 0.0, 0.0, _theAircraft));\n\t\t\tengineList.add(new Engine(aircraftName, \"Engine_1\", \"\", 31.22, 4.4375, 1.65, _theAircraft));\n\t\t\tengineList.add(new Engine(aircraftName, \"Engine_2\", \"\", 31.22, -4.4375, 1.65, _theAircraft));\n//\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}", "@Test\n public void doImport_skipsImportIfFileNotUpdated() {\n ExternalDataReader externalDataReader = new ExternalDataReaderImpl(null);\n externalDataReader.doImport(formDefToCsvMedia);\n assertThat(dbFile.exists(), is(true));\n SQLiteDatabase db = SQLiteDatabase.openDatabase(dbFile.getAbsolutePath(), null, SQLiteDatabase.OPEN_READWRITE);\n Cursor cursor = db.rawQuery(SELECT_ALL_DATA_QUERY, null);\n assertThat(cursor.getCount(), is(3));\n\n // Purge the contents of the data table before reimporting\n db.delete(EXTERNAL_DATA_TABLE_NAME, null, null);\n assertThat(SQLiteUtils.doesTableExist(db, EXTERNAL_DATA_TABLE_NAME), is(true));\n cursor = db.rawQuery(SELECT_ALL_DATA_QUERY, null);\n assertThat(\"expected zero rows of data after purging\", cursor.getCount(), is(0));\n db.close();\n\n // Reimport\n externalDataReader = new ExternalDataReaderImpl(null);\n externalDataReader.doImport(formDefToCsvMedia);\n db = SQLiteDatabase.openDatabase(dbFile.getAbsolutePath(), null, SQLiteDatabase.OPEN_READWRITE);\n cursor = db.rawQuery(SELECT_ALL_DATA_QUERY, null);\n assertThat(\"expected zero rows of data after reimporting unchanged file\", cursor.getCount(), is(0));\n }", "@Override\n public void importCSV(File file) {\n System.out.println(\"oi\");\n System.out.println(file.isFile()+\" \"+file.getAbsolutePath());\n if(file.isFile() && file.getPath().toLowerCase().contains(\".csv\")){\n System.out.println(\"Entro\");\n try {\n final Reader reader = new FileReader(file);\n final BufferedReader bufferReader = new BufferedReader(reader);\n String[] cabecalho = bufferReader.readLine().split(\",\");\n int tipo;\n if(cabecalho.length == 3){\n if(cabecalho[2].equalsIgnoreCase(\"SIGLA\")){\n tipo = 1;\n System.out.println(\"TIPO PAIS\");\n }\n else {\n tipo = 2;\n System.out.println(\"TIPO CIDADE\");\n }\n }else {\n tipo = 3;\n System.out.println(\"TIPO ESTADO\");\n }\n \n while(true){\n String linha = bufferReader.readLine();\n if(linha == null){\n break;\n }\n String[] row = linha.split(\",\");\n switch (tipo) {\n case 1:\n Pais pais = new Pais();\n pais.setId(Long.parseLong(row[0]));\n pais.setNome(row[1]);\n pais.setSigla(row[2]);\n new PaisDaoImpl().insert(pais);\n break;\n case 2:\n Cidade cidade = new Cidade();\n cidade.setId(Long.parseLong(row[0]));\n cidade.setNome(row[1]);\n cidade.setEstado(Long.parseLong(row[2]));\n new CidadeDaoImpl().insert(cidade);\n break;\n default:\n Estado estado = new Estado();\n estado.setId(Long.parseLong(row[0]));\n estado.setNome(row[1]);\n estado.setUf(row[2]);\n estado.setPais(Long.parseLong(row[3]));\n new EstadoDaoImpl().insert(estado);\n break;\n }\n }\n \n } catch (FileNotFoundException ex) {\n Logger.getLogger(SQLUtilsImpl.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(SQLUtilsImpl.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public Auditorium(String filename) throws FileNotFoundException {\r\n\t\t//node variables\r\n\t\tint row;\r\n\t\tchar seat; \r\n\t\tboolean reserved; \r\n\t\tchar ticketType;\r\n\t\tTheaterSeat up = null;\r\n\t\tTheaterSeat down = null;\r\n\t\tTheaterSeat left = null;\r\n\t\tTheaterSeat right = null;\r\n\t\t\r\n\t\t//read from the file passed to the constructor\r\n\t\t//and fill the grid with that data\r\n\t\tFile seatingFile = new File(filename);\r\n\t\tScanner seatScanner = new Scanner(new FileInputStream(seatingFile));\r\n\t\tString firstLine = seatScanner.nextLine();\r\n\t\tnumRows = 1;\r\n\t\tnumCols = firstLine.length();\r\n\t\tString fullInput = firstLine;\r\n\t\t\r\n\t\twhile (seatScanner.hasNext()) {\r\n\t\t\tfullInput += seatScanner.nextLine();\r\n\t\t\tnumRows++;\r\n\t\t}\r\n\t\tseatScanner.close();\r\n\t\t\r\n\t\tTheaterSeat previous = null;\r\n\t\trow = 0;\r\n\t\tseat = 'A';\r\n\t\tticketType = fullInput.charAt(0);\r\n\t\tif (ticketType == '.') {\r\n\t\t\treserved = false;\r\n\t\t} else {\r\n\t\t\treserved = true;\r\n\t\t}\r\n\t\tfirst = new TheaterSeat(row, seat, reserved, ticketType, up, down, left, right);\r\n\t\tTheaterSeat current = getFirst();\r\n\t\tint sIndex = 0;\r\n\t\tint rIndex = 0;\r\n\t\tint location = 0;\r\n\t\tfor (rIndex = 0; rIndex < numRows - 1; rIndex++) { //iterate through grid\r\n\t\t\trow = rIndex;\r\n\t\t\tfor (sIndex = 0; sIndex < numCols - 1; sIndex++) {\r\n\t\t\t\t\r\n\t\t\t\t//preserve previous node\r\n\t\t\t\tprevious = current;\r\n\t\t\t\t\r\n\t\t\t\tseat = (char) (sIndex + 65);\r\n\t\t\t\tlocation = (1+rIndex)*(numCols) + sIndex;\r\n\t\t\t\tticketType = fullInput.charAt(location);\r\n\t\t\t\tif (ticketType == '.') {\r\n\t\t\t\t\treserved = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treserved = true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcurrent = new TheaterSeat(row + 1, seat, reserved, ticketType, up, down, left, right);\r\n\t\t\t\t//create up-down link\r\n\t\t\t\tprevious.setDown(current);\r\n\t\t\t\tcurrent.setUp(previous);\r\n\t\t\t\t\r\n\t\t\t\tseat = (char) (sIndex + 66);\r\n\t\t\t\tlocation = rIndex*numCols + sIndex + 1;\r\n\t\t\t\tticketType = fullInput.charAt(location);\r\n\t\t\t\tif (ticketType == '.') {\r\n\t\t\t\t\treserved = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treserved = true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcurrent = new TheaterSeat(row, seat, reserved, ticketType, up, down, left, right);\r\n\t\t\t\t//create right-left link\r\n\t\t\t\tcurrent.setLeft(previous);\r\n\t\t\t\tprevious.setRight(current);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tprevious = current;\r\n\t\t\t\r\n\t\t\tseat = (char) (sIndex + 66);\r\n\t\t\tlocation = (1 + rIndex)*numCols + sIndex;\r\n\t\t\tif (ticketType == '.') {\r\n\t\t\t\treserved = false;\r\n\t\t\t} else {\r\n\t\t\t\treserved = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurrent = new TheaterSeat(row, seat, reserved, ticketType, up, down, left, right);\r\n\t\t\t//create up-down link\r\n\t\t\tprevious.setDown(current);\r\n\t\t\tcurrent.setUp(previous);\r\n\t\t\t\r\n\t\t\tcurrent = previous;\r\n\t\t\tfor (int index = 0; index < numCols - 1; index++) {\r\n\t\t\t\tcurrent = current.getLeft();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tcurrent = current.getDown();\r\n\t\t} //end of for loop\r\n\t\t\r\n\t\tfor (sIndex = 0; sIndex < numCols - 1; sIndex++) {\r\n\t\tprevious = current;\r\n\t\tseat = (char) (sIndex + 66);\r\n\t\tlocation = (numRows - 1)*numCols + sIndex + 1;\r\n\t\tticketType = fullInput.charAt(location);\r\n\t\tif (ticketType == '.') {\r\n\t\t\treserved = false;\r\n\t\t} else {\r\n\t\t\treserved = true;\r\n\t\t}\r\n\t\t\r\n\t\tcurrent = new TheaterSeat(numRows - 1, seat, reserved, ticketType, up, down, left, right);\r\n\t\t//create right-left link\r\n\t\tcurrent.setLeft(previous);\r\n\t\tprevious.setRight(current);\r\n\t\t}\r\n\t}", "protected boolean importElements(XmlPullParser xpp, Epml epml) {\n\t\treturn false;\n\t}", "public void importConfiguration(){\n\t\t\n\t\tUnitConfiguration[] configArray = controller.importTestConfiguration();\n\t\t\n\t\tif(configArray != null){\n\t\t\tint panelCount = tabbedPane.getTabCount();\n\t\t\t\n\t\t\t//remove all units before we import new ones\n\t\t\ttestUnitCounter = 1;\n\t\t\tfor(int i = 1; i < panelCount; i++){\n\t\t\t\t\n\t\t\t\tremoveUnit(i);\n\t\t\t}\n\t\t\t\n\t\t\t//import the new configuration of remote units\n\t\t\tfor(UnitConfiguration config : configArray){\n\t\t\t\taddUnit(config.getHost(),config.getRegistryPort());\n\t\t\t}\n\t\t}else{\n\t\t\tConsoleLog.Message(\"Found any configurations\");\n\t\t}\n\t}", "public Set<Airport> loadFile(final String csvFile) throws CoreException;", "private Agent loadFromFile(String _login)\n {\n Agent agent = new Agent();\n File file = new File(_login + \".csv\");\n FileReader fr;\n BufferedReader br;\n String line;\n try {\n fr = new FileReader(file);\n br = new BufferedReader(fr);\n\n line = br.readLine();\n\n int numCients;\n { // to restrain the scope of csvData\n String[] csvData = line.split(\",\");\n agent.setID(Integer.parseInt(csvData[0]));\n agent.setName(csvData[1]);\n agent.setSalary(Double.parseDouble(csvData[2]));\n agent.setSalesBalance(Double.parseDouble(csvData[3]));\n\n numCients = Integer.parseInt(csvData[4]);\n }\n\n for(int i = 0; i<numCients; i++) {\n line = br.readLine();\n\n Client client = new Client();\n int numProp;\n\n {\n String[] csvData = line.split(\",\");\n client.setID(Integer.parseInt(csvData[0]));\n client.setName(csvData[1]);\n client.setIncome(Double.parseDouble(csvData[2]));\n\n numProp = Integer.parseInt(csvData[3]);\n }\n\n for(int j=0; j<numProp; j++)\n {\n line = br.readLine();\n\n String[] csvData = line.split(\",\");\n\n if(csvData[0].equals(\"house\")) {\n House property = new House();\n\n property.setAddress(csvData[1]);\n property.setNumRoom(Integer.parseInt(csvData[2]));\n property.setPrice(Double.parseDouble(csvData[3]));\n property.setSize(Double.parseDouble(csvData[4]));\n property.setHasGarage(Boolean.parseBoolean(csvData[5]));\n\n property.setHasGarden(Boolean.parseBoolean(csvData[6]));\n property.setHasPool(Boolean.parseBoolean(csvData[7]));\n\n client.addProperty(property);\n }\n else if(csvData[0].equals(\"apt\"))\n {\n Apartment property = new Apartment();\n\n property.setAddress(csvData[1]);\n property.setNumRoom(Integer.parseInt(csvData[2]));\n property.setPrice(Double.parseDouble(csvData[3]));\n property.setSize(Double.parseDouble(csvData[4]));\n property.setHasGarage(Boolean.parseBoolean(csvData[5]));\n\n property.setHasTerrace(Boolean.parseBoolean(csvData[6]));\n property.setHasElevator(Boolean.parseBoolean(csvData[7]));\n property.setFloor(Integer.parseInt(csvData[8]));\n property.setNumber(Integer.parseInt(csvData[9]));\n\n client.addProperty(property);\n }\n }\n\n agent.addClient(client);\n }\n fr.close();\n br.close();\n return agent;\n }\n catch (NumberFormatException nfEx) {\n JOptionPane.showMessageDialog(null, \"There was a problem when retrieving \" +\n \"the agent's data.\\n Please try again\");\n return null;\n }\n catch (IOException ioEx) {\n JOptionPane.showMessageDialog(null, \"This user doesn't exist....\");\n return null;\n }\n }", "public void loadFromDatabase(){\r\n /**\r\n * Open the file streams to the three files\r\n * Recover the state of data structures\r\n * Close the file streams\r\n */\r\n\r\n try{\r\n //Recover the state of unfinished set from unfinished.dat\r\n unfinishedFileInputStream = new FileInputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetInputStream = new ObjectInputStream(unfinishedFileInputStream);\r\n unfinished = (Set<Task>)unfinishedSetInputStream.readObject();\r\n unfinishedSetInputStream.close();\r\n unfinishedFileInputStream.close();\r\n\r\n //Recover the state of finished list from finished.dat\r\n finishedFileInputStream = new FileInputStream(FINISHED_FILE_PATH);\r\n finishedListInputStream = new ObjectInputStream(finishedFileInputStream);\r\n finished = (ArrayList<Task>)finishedListInputStream.readObject();\r\n finishedListInputStream.close();\r\n finishedFileInputStream.close();\r\n\r\n //Recover the state of activities list from activities.dat\r\n activitiesFileInputStream = new FileInputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListInputStream = new ObjectInputStream(activitiesFileInputStream);\r\n activities = (ArrayList<Activity>)activitiesListInputStream.readObject();\r\n activitiesListInputStream.close();\r\n activitiesFileInputStream.close();\r\n\r\n generateWeeklySchedule();\r\n }\r\n catch(Exception e){\r\n System.out.println(e.getMessage());\r\n }\r\n }", "@Override\n public void importItems(){\n if (DialogUtils.askYesNo(\"Confirm\", \"<html>Importing individuals will REPLACE all existing individuals.<br>Are you sure you want to do this?</html>\") == DialogUtils.NO) {\n return;\n }\n\n try {\n File file = DialogUtils.chooseFileForOpen(\"Import File\", new ExtensionsFileFilter(new String[] { \"csv\" }), null);\n if (file != null) {\n //remove current data\n MedSavantClient.PatientManager.clearPatients(LoginController.getSessionID(), ProjectController.getInstance().getCurrentProjectID());\n new ImportProgressDialog(file).showDialog();\n }\n } catch (Exception ex) {\n ClientMiscUtils.reportError(\"Unable to import individuals. Please make sure the file is in CSV format and that Hospital IDs are unique.\", ex);\n }\n }", "public Set<Airport> loadFile(final File csvFile) throws CoreException;", "private void initialize() {\n\t\t\n\t\tHashMap<String, Component> componentesImportador = new HashMap<String, Component>();\n\t\t\n\t\t\n\t\tJFrame frame = new JFrame();\n\t\tframe.setBounds(100, 100, 450, 197);\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\tframe.setVisible(true);\n\t\t\n\t\tcomponentesImportador.put(\"frame\", frame);\n\t\t\n\t\tJLabel lblTitulo = new JLabel(\"IMPORTAR\");\n\t\tlblTitulo.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblTitulo.setFont(new Font(\"Verdana\", Font.BOLD, 18));\n\t\tlblTitulo.setBounds(0, 11, 434, 33);\n\t\tframe.getContentPane().add(lblTitulo);\n\t\tcomponentesImportador.put(\"lblTitulo\", lblTitulo);\n\t\t\n\t\tJLabel lblRuta = new JLabel(\"Ruta:\");\n\t\tlblRuta.setBounds(10, 79, 46, 14);\n\t\tframe.getContentPane().add(lblRuta);\n\t\tcomponentesImportador.put(\"lblRuta\", lblRuta);\n\t\t\n\t\tJTextField txtRuta = new JTextField();\n\t\ttxtRuta.setText(\"C:\\\\\");\n\t\ttxtRuta.setBounds(69, 76, 323, 20);\n\t\tframe.getContentPane().add(txtRuta);\n\t\ttxtRuta.setColumns(10);\n\t\tcomponentesImportador.put(\"txtRuta\", txtRuta);\n\t\t\n\t\tImportadorController controlador= new ImportadorController(componentesImportador);\n\t\t\n\t\tJLabel lblSuperior = new JLabel(\"\\u00BFD\\u00F3nde se encuentra el XML?\");\n\t\tlblSuperior.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblSuperior.setBounds(10, 55, 414, 14);\n\t\tframe.getContentPane().add(lblSuperior);\n\t\tcomponentesImportador.put(\"lblSuperior\", lblSuperior);\n\t\t\t\n\n\t\tJButton btnCancelar = new JButton(\"Cancelar\");\n\t\tbtnCancelar.setBounds(236, 125, 89, 23);\n\t\tcomponentesImportador.put(\"btnCancelar\", btnCancelar);\n\t\t\n\t\tJButton btnAceptar = new JButton(\"Aceptar\");\n\t\tbtnAceptar.setBounds(335, 125, 89, 23);\n\t\tcomponentesImportador.put(\"btnAceptar\", btnAceptar);\n\t\t\n\t\tJButton btnChooser = new JButton(\"...\");\n\t\tbtnChooser.setBounds(402, 76, 22, 21);\n\n\t\tcomponentesImportador.put(\"btnChooser\", btnChooser);\n\t\t\n\t\t\n\t\tframe.getContentPane().add(btnCancelar);\n\t\tframe.getContentPane().add(btnChooser);\n\t\tframe.getContentPane().add(btnAceptar);\n\t\t\n\t\tbtnChooser.setActionCommand(\"Chooser\");\n\t\tbtnCancelar.setActionCommand(\"Cancelar\");\n\t\tbtnAceptar.setActionCommand(\"Aceptar\");\n\t\t\n\t\tbtnChooser.addActionListener(controlador);\n\t\tbtnAceptar.addActionListener(controlador);\n\t\tbtnCancelar.addActionListener(controlador);\n\t\t\t\t\n\t}", "public void testImportXML() throws RepositoryException, IOException{\n String path = \"path\";\n InputStream stream = new ByteArrayInputStream(new byte[0]);\n session.importXML(path, stream, 0);\n \n sessionControl.replay();\n sfControl.replay();\n \n jt.importXML(path, stream, 0);\n }", "private void readWeatherConditions(XmlPullParser xpp)\n throws XmlPullParserException, IOException\n {\n int eventType = xpp.next();\n while (eventType != XmlPullParser.END_DOCUMENT)\n {\n if (eventType == XmlPullParser.START_TAG)\n {\n // Read a tag <weather-conditions weather-summary=\"Mostly Cloudy\"/>\n if (xpp.getName().equalsIgnoreCase(WEATHER_CONDITIONS))\n {\n String attrValue = readAttributeValue(xpp, WEATHER_SUMMARY,\n INVALID);\n this.forecast.addCondition(attrValue);\n }\n }\n else if (eventType == XmlPullParser.END_TAG)\n {\n // exit when we get to \"</weather>\"\n if (xpp.getName().equalsIgnoreCase(WEATHER))\n break;\n }\n eventType = xpp.next();\n }\n }", "private void loadFile() {\n String xmlContent = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><atomic-mass-table mass-units=\\\"u\\\" abundance-units=\\\"Mole Fraction\\\"><entry symbol=\\\"H\\\" atomic-number=\\\"1\\\"> <natural-abundance> <mass value=\\\"1.00794\\\" error=\\\"0.00007\\\" /> <isotope mass-number=\\\"1\\\"> <mass value=\\\"1.0078250319\\\" error=\\\"0.00000000006\\\" /> <abundance value=\\\"0.999885\\\" error=\\\"0.000070\\\" /> </isotope> <isotope mass-number=\\\"2\\\"> <mass value=\\\"2.0141017779\\\" error=\\\"0.0000000006\\\" /> <abundance value=\\\"0.000115\\\" error=\\\"0.000070\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"He\\\" atomic-number=\\\"2\\\"> <natural-abundance> <mass value=\\\"4.002602\\\" error=\\\"0.000002\\\" /> <isotope mass-number=\\\"3\\\"> <mass value=\\\"3.0160293094\\\" error=\\\"0.0000000012\\\" /> <abundance value=\\\"0.00000134\\\" error=\\\"0.00000003\\\" /> </isotope> <isotope mass-number=\\\"4\\\"> <mass value=\\\"4.0026032497\\\" error=\\\"0.0000000015\\\" /> <abundance value=\\\"0.99999866\\\" error=\\\"0.00000003\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Li\\\" atomic-number=\\\"3\\\"> <natural-abundance> <mass value=\\\"6.9421\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"3\\\"> <mass value=\\\"6.0151223\\\" error=\\\"0.0000005\\\" /> <abundance value=\\\"0.0759\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"7\\\"> <mass value=\\\"7.0160041\\\" error=\\\"0.0000005\\\" /> <abundance value=\\\"0.9241\\\" error=\\\"0.0004\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Be\\\" atomic-number=\\\"4\\\"> <natural-abundance> <mass value=\\\"9.012182\\\" error=\\\"0.000003\\\" /> <isotope mass-number=\\\"9\\\"> <mass value=\\\"9.0121822\\\" error=\\\"0.0000004\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"B\\\" atomic-number=\\\"5\\\"> <natural-abundance> <mass value=\\\"10.881\\\" error=\\\"0.007\\\" /> <isotope mass-number=\\\"10\\\"> <mass value=\\\"10.0129371\\\" error=\\\"0.0000003\\\" /> <abundance value=\\\"0.199\\\" error=\\\"0.007\\\" /> </isotope> <isotope mass-number=\\\"11\\\"> <mass value=\\\"11.0093055\\\" error=\\\"0.0000004\\\" /> <abundance value=\\\"0.801\\\" error=\\\"0.007\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"C\\\" atomic-number=\\\"6\\\"> <natural-abundance> <mass value=\\\"12.0107\\\" error=\\\"0.0008\\\" /> <isotope mass-number=\\\"12\\\"> <mass value=\\\"12\\\" error=\\\"0\\\" /> <abundance value=\\\"0.9893\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"13\\\"> <mass value=\\\"13.003354838\\\" error=\\\"0.000000005\\\" /> <abundance value=\\\"0.0107\\\" error=\\\"0.0008\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"N\\\" atomic-number=\\\"7\\\"> <natural-abundance> <mass value=\\\"14.0067\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"14\\\"> <mass value=\\\"14.0030740074\\\" error=\\\"0.0000000018\\\" /> <abundance value=\\\"0.99636\\\" error=\\\"0.00020\\\" /> </isotope> <isotope mass-number=\\\"15\\\"> <mass value=\\\"15.000108973\\\" error=\\\"0.000000012\\\" /> <abundance value=\\\"0.00364\\\" error=\\\"0.00020\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"O\\\" atomic-number=\\\"8\\\"> <natural-abundance> <mass value=\\\"15.9994\\\" error=\\\"0.0003\\\" /> <isotope mass-number=\\\"16\\\"> <mass value=\\\"15.9949146223\\\" error=\\\"0.0000000025\\\" /> <abundance value=\\\"0.99759\\\" error=\\\"0.00016\\\" /> </isotope> <isotope mass-number=\\\"17\\\"> <mass value=\\\"16.99913150\\\" error=\\\"0.00000022\\\" /> <abundance value=\\\"0.00038\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"18\\\"> <mass value=\\\"17.9991604\\\" error=\\\"0.0000009\\\" /> <abundance value=\\\"0.00205\\\" error=\\\"0.00014\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"F\\\" atomic-number=\\\"9\\\"> <natural-abundance> <mass value=\\\"18.9984032\\\" error=\\\"0.0000005\\\" /> <isotope mass-number=\\\"19\\\"> <mass value=\\\"18.99840320\\\" error=\\\"0.00000007\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ne\\\" atomic-number=\\\"10\\\"> <natural-abundance> <mass value=\\\"20.1797\\\" error=\\\"0.0006\\\" /> <isotope mass-number=\\\"20\\\"> <mass value=\\\"19.992440176\\\" error=\\\"0.000000003\\\" /> <abundance value=\\\"0.9048\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"21\\\"> <mass value=\\\"20.99384674\\\" error=\\\"0.00000004\\\" /> <abundance value=\\\"0.0027\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"22\\\"> <mass value=\\\"21.99138550\\\" error=\\\"0.00000025\\\" /> <abundance value=\\\"0.0925\\\" error=\\\"0.0003\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Na\\\" atomic-number=\\\"11\\\"> <natural-abundance> <mass value=\\\"22.989770\\\" error=\\\"0.000002\\\" /> <isotope mass-number=\\\"23\\\"> <mass value=\\\"22.98976966\\\" error=\\\"0.00000026\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Mg\\\" atomic-number=\\\"12\\\"> <natural-abundance> <mass value=\\\"24.3050\\\" error=\\\"0.0006\\\" /> <isotope mass-number=\\\"24\\\"> <mass value=\\\"23.98504187\\\" error=\\\"0.00000026\\\" /> <abundance value=\\\"0.7899\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"25\\\"> <mass value=\\\"24.98583700\\\" error=\\\"0.00000026\\\" /> <abundance value=\\\"0.1000\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"26\\\"> <mass value=\\\"25.98259300\\\" error=\\\"0.00000026\\\" /> <abundance value=\\\"0.1101\\\" error=\\\"0.0003\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Al\\\" atomic-number=\\\"13\\\"> <natural-abundance> <mass value=\\\"26.981538\\\" error=\\\"0.000002\\\" /> <isotope mass-number=\\\"27\\\"> <mass value=\\\"26.98153841\\\" error=\\\"0.00000024\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Si\\\" atomic-number=\\\"14\\\"> <natural-abundance> <mass value=\\\"28.0855\\\" error=\\\"0.0003\\\" /> <isotope mass-number=\\\"28\\\"> <mass value=\\\"27.97692649\\\" error=\\\"0.00000022\\\" /> <abundance value=\\\"0.92223\\\" error=\\\"0.00019\\\" /> </isotope> <isotope mass-number=\\\"29\\\"> <mass value=\\\"28.97649468\\\" error=\\\"0.00000022\\\" /> <abundance value=\\\"0.04685\\\" error=\\\"0.00008\\\" /> </isotope> <isotope mass-number=\\\"30\\\"> <mass value=\\\"29.97377018\\\" error=\\\"0.00000022\\\" /> <abundance value=\\\"0.03092\\\" error=\\\"0.00011\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"P\\\" atomic-number=\\\"15\\\"> <natural-abundance> <mass value=\\\"30.973761\\\" error=\\\"0.000002\\\" /> <isotope mass-number=\\\"31\\\"> <mass value=\\\"30.97376149\\\" error=\\\"0.00000027\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"S\\\" atomic-number=\\\"16\\\"> <natural-abundance> <mass value=\\\"32.065\\\" error=\\\"0.005\\\" /> <isotope mass-number=\\\"32\\\"> <mass value=\\\"31.97207073\\\" error=\\\"0.00000015\\\" /> <abundance value=\\\"0.9499\\\" error=\\\"0.0026\\\" /> </isotope> <isotope mass-number=\\\"33\\\"> <mass value=\\\"32.97145854\\\" error=\\\"0.00000015\\\" /> <abundance value=\\\"0.0075\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"34\\\"> <mass value=\\\"33.96786687\\\" error=\\\"0.00000014\\\" /> <abundance value=\\\"0.0425\\\" error=\\\"0.0024\\\" /> </isotope> <isotope mass-number=\\\"36\\\"> <mass value=\\\"35.96708088\\\" error=\\\"0.00000025\\\" /> <abundance value=\\\"0.0001\\\" error=\\\"0.0001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cl\\\" atomic-number=\\\"17\\\"> <natural-abundance> <mass value=\\\"35.453\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"35\\\"> <mass value=\\\"34.96885271\\\" error=\\\"0.00000004\\\" /> <abundance value=\\\"0.7576\\\" error=\\\"0.0010\\\" /> </isotope> <isotope mass-number=\\\"37\\\"> <mass value=\\\"36.96590260\\\" error=\\\"0.00000005\\\" /> <abundance value=\\\"0.2424\\\" error=\\\"0.0010\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ar\\\" atomic-number=\\\"18\\\"> <natural-abundance> <mass value=\\\"39.948\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"36\\\"> <mass value=\\\"35.96754626\\\" error=\\\"0.00000027\\\" /> <abundance value=\\\"0.0003365\\\" error=\\\"0.000030\\\" /> </isotope> <isotope mass-number=\\\"38\\\"> <mass value=\\\"37.9627322\\\" error=\\\"0.0000005\\\" /> <abundance value=\\\"0.000632\\\" error=\\\"0.000005\\\" /> </isotope> <isotope mass-number=\\\"40\\\"> <mass value=\\\"39.962383124\\\" error=\\\"0.000000005\\\" /> <abundance value=\\\"0.996003\\\" error=\\\"0.000030\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"K\\\" atomic-number=\\\"19\\\"> <natural-abundance> <mass value=\\\"39.0983\\\" error=\\\"0.0001\\\" /> <isotope mass-number=\\\"39\\\"> <mass value=\\\"38.9637069\\\" error=\\\"0.0000003\\\" /> <abundance value=\\\"0.932581\\\" error=\\\"0.000044\\\" /> </isotope> <isotope mass-number=\\\"40\\\"> <mass value=\\\"39.96399867\\\" error=\\\"0.00000029\\\" /> <abundance value=\\\"0.000117\\\" error=\\\"0.000001\\\" /> </isotope> <isotope mass-number=\\\"41\\\"> <mass value=\\\"40.96182597\\\" error=\\\"0.00000028\\\" /> <abundance value=\\\"0.067302\\\" error=\\\"0.000044\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ca\\\" atomic-number=\\\"20\\\"> <natural-abundance> <mass value=\\\"40.078\\\" error=\\\"0.004\\\" /> <isotope mass-number=\\\"40\\\"> <mass value=\\\"39.9625912\\\" error=\\\"0.0000003\\\" /> <abundance value=\\\"0.96941\\\" error=\\\"0.00156\\\" /> </isotope> <isotope mass-number=\\\"42\\\"> <mass value=\\\"41.9586183\\\" error=\\\"0.0000004\\\" /> <abundance value=\\\"0.00647\\\" error=\\\"0.00023\\\" /> </isotope> <isotope mass-number=\\\"43\\\"> <mass value=\\\"42.9587668\\\" error=\\\"0.0000005\\\" /> <abundance value=\\\"0.00135\\\" error=\\\"0.00010\\\" /> </isotope> <isotope mass-number=\\\"44\\\"> <mass value=\\\"43.9554811\\\" error=\\\"0.0000009\\\" /> <abundance value=\\\"0.02086\\\" error=\\\"0.00110\\\" /> </isotope> <isotope mass-number=\\\"46\\\"> <mass value=\\\"45.9536927\\\" error=\\\"0.0000025\\\" /> <abundance value=\\\"0.00004\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"48\\\"> <mass value=\\\"47.952533\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00187\\\" error=\\\"0.00021\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sc\\\" atomic-number=\\\"21\\\"> <natural-abundance> <mass value=\\\"44.955910\\\" error=\\\"0.000008\\\" /> <isotope mass-number=\\\"45\\\"> <mass value=\\\"44.9559102\\\" error=\\\"0.0000012\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ti\\\" atomic-number=\\\"22\\\"> <natural-abundance> <mass value=\\\"47.867\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"46\\\"> <mass value=\\\"45.9526295\\\" error=\\\"0.0000012\\\" /> <abundance value=\\\"0.0825\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"47\\\"> <mass value=\\\"46.9517637\\\" error=\\\"0.0000010\\\" /> <abundance value=\\\"0.0744\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"48\\\"> <mass value=\\\"47.9479470\\\" error=\\\"0.0000010\\\" /> <abundance value=\\\"0.7372\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"49\\\"> <mass value=\\\"48.9478707\\\" error=\\\"0.0000010\\\" /> <abundance value=\\\"0.0541\\\" error=\\\"0.0002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"V\\\" atomic-number=\\\"23\\\"> <natural-abundance> <mass value=\\\"50.9415\\\" error=\\\"0.0001\\\" /> <isotope mass-number=\\\"50\\\"> <mass value=\\\"49.9471627\\\" error=\\\"0.0000014\\\" /> <abundance value=\\\"0.00250\\\" error=\\\"0.00004\\\" /> </isotope> <isotope mass-number=\\\"51\\\"> <mass value=\\\"50.9439635\\\" error=\\\"0.0000014\\\" /> <abundance value=\\\"0.99750\\\" error=\\\"0.00004\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cr\\\" atomic-number=\\\"24\\\"> <natural-abundance> <mass value=\\\"51.9961\\\" error=\\\"0.0006\\\" /> <isotope mass-number=\\\"50\\\"> <mass value=\\\"49.9460495\\\" error=\\\"0.0000014\\\" /> <abundance value=\\\"0.04345\\\" error=\\\"0.00013\\\" /> </isotope> <isotope mass-number=\\\"52\\\"> <mass value=\\\"51.9405115\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.83789\\\" error=\\\"0.00018\\\" /> </isotope> <isotope mass-number=\\\"53\\\"> <mass value=\\\"52.9406534\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.09501\\\" error=\\\"0.00017\\\" /> </isotope> <isotope mass-number=\\\"54\\\"> <mass value=\\\"53.938846\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.02365\\\" error=\\\"0.00007\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Mn\\\" atomic-number=\\\"25\\\"> <natural-abundance> <mass value=\\\"54.938049\\\" error=\\\"0.000009\\\" /> <isotope mass-number=\\\"55\\\"> <mass value=\\\"54.9380493\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Fe\\\" atomic-number=\\\"26\\\"> <natural-abundance> <mass value=\\\"55.845\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"54\\\"> <mass value=\\\"53.9396147\\\" error=\\\"0.0000014\\\" /> <abundance value=\\\"0.05845\\\" error=\\\"0.00035\\\" /> </isotope> <isotope mass-number=\\\"56\\\"> <mass value=\\\"55.9349418\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.91754\\\" error=\\\"0.00036\\\" /> </isotope> <isotope mass-number=\\\"57\\\"> <mass value=\\\"56.9353983\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.02119\\\" error=\\\"0.00010\\\" /> </isotope> <isotope mass-number=\\\"58\\\"> <mass value=\\\"57.9332801\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.00282\\\" error=\\\"0.00004\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Co\\\" atomic-number=\\\"27\\\"> <natural-abundance> <mass value=\\\"58.933200\\\" error=\\\"0.000009\\\" /> <isotope mass-number=\\\"59\\\"> <mass value=\\\"59.9331999\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ni\\\" atomic-number=\\\"28\\\"> <natural-abundance> <mass value=\\\"58.6934\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"58\\\"> <mass value=\\\"57.9353477\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.680769\\\" error=\\\"0.000089\\\" /> </isotope> <isotope mass-number=\\\"60\\\"> <mass value=\\\"59.9307903\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.262231\\\" error=\\\"0.000077\\\" /> </isotope> <isotope mass-number=\\\"61\\\"> <mass value=\\\"60.9310601\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.011399\\\" error=\\\"0.000006\\\" /> </isotope> <isotope mass-number=\\\"62\\\"> <mass value=\\\"61.9283484\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.0036345\\\" error=\\\"0.000017\\\" /> </isotope> <isotope mass-number=\\\"64\\\"> <mass value=\\\"63.9279692\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.009256\\\" error=\\\"0.000009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cu\\\" atomic-number=\\\"29\\\"> <natural-abundance> <mass value=\\\"63.546\\\" error=\\\"0.003\\\" /> <isotope mass-number=\\\"63\\\"> <mass value=\\\"62.9296007\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.6915\\\" error=\\\"0.0015\\\" /> </isotope> <isotope mass-number=\\\"65\\\"> <mass value=\\\"64.9277938\\\" error=\\\"0.0000019\\\" /> <abundance value=\\\"0.3085\\\" error=\\\"0.0015\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Zn\\\" atomic-number=\\\"30\\\"> <natural-abundance> <mass value=\\\"65.409\\\" error=\\\"0.004\\\" /> <isotope mass-number=\\\"64\\\"> <mass value=\\\"63.9291461\\\" error=\\\"0.0000018\\\" /> <abundance value=\\\"0.48268\\\" error=\\\"0.00321\\\" /> </isotope> <isotope mass-number=\\\"66\\\"> <mass value=\\\"65.9260364\\\" error=\\\"0.0000017\\\" /> <abundance value=\\\"0.27975\\\" error=\\\"0.00077\\\" /> </isotope> <isotope mass-number=\\\"67\\\"> <mass value=\\\"66.9271305\\\" error=\\\"0.0000017\\\" /> <abundance value=\\\"0.04102\\\" error=\\\"0.00021\\\" /> </isotope> <isotope mass-number=\\\"68\\\"> <mass value=\\\"67.9248473\\\" error=\\\"0.0000017\\\" /> <abundance value=\\\"0.19024\\\" error=\\\"0.00123\\\" /> </isotope> <isotope mass-number=\\\"70\\\"> <mass value=\\\"69.925325\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00631\\\" error=\\\"0.00009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ga\\\" atomic-number=\\\"31\\\"> <natural-abundance> <mass value=\\\"69.723\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"69\\\"> <mass value=\\\"68.925581\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.60108\\\" error=\\\"0.00009\\\" /> </isotope> <isotope mass-number=\\\"71\\\"> <mass value=\\\"70.9247073\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.39892\\\" error=\\\"0.00009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ge\\\" atomic-number=\\\"32\\\"> <natural-abundance> <mass value=\\\"72.64\\\" error=\\\"0.01\\\" /> <isotope mass-number=\\\"70\\\"> <mass value=\\\"69.9242500\\\" error=\\\"0.0000019\\\" /> <abundance value=\\\"0.2038\\\" error=\\\"0.0018\\\" /> </isotope> <isotope mass-number=\\\"72\\\"> <mass value=\\\"71.9220763\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.2731\\\" error=\\\"0.0026\\\" /> </isotope> <isotope mass-number=\\\"73\\\"> <mass value=\\\"72.9234595\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0776\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"74\\\"> <mass value=\\\"73.9211784\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.3672\\\" error=\\\"0.0015\\\" /> </isotope> <isotope mass-number=\\\"76\\\"> <mass value=\\\"75.9214029\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0783\\\" error=\\\"0.0007\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"As\\\" atomic-number=\\\"33\\\"> <natural-abundance> <mass value=\\\"74.92160\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"75\\\"> <mass value=\\\"74.9215966\\\" error=\\\"0.0000018\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Se\\\" atomic-number=\\\"34\\\"> <natural-abundance> <mass value=\\\"78.96\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"74\\\"> <mass value=\\\"73.9224767\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0089\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"76\\\"> <mass value=\\\"75.9192143\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0937\\\" error=\\\"0.0029\\\" /> </isotope> <isotope mass-number=\\\"77\\\"> <mass value=\\\"76.9199148\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0763\\\" error=\\\"0.0016\\\" /> </isotope> <isotope mass-number=\\\"78\\\"> <mass value=\\\"77.9173097\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.2377\\\" error=\\\"0.0028\\\" /> </isotope> <isotope mass-number=\\\"80\\\"> <mass value=\\\"79.9165221\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.4961\\\" error=\\\"0.0041\\\" /> </isotope> <isotope mass-number=\\\"82\\\"> <mass value=\\\"81.9167003\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.0873\\\" error=\\\"0.0022\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Br\\\" atomic-number=\\\"35\\\"> <natural-abundance> <mass value=\\\"79.904\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"79\\\"> <mass value=\\\"78.9183379\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.5069\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"81\\\"> <mass value=\\\"80.916291\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.4931\\\" error=\\\"0.0007\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Kr\\\" atomic-number=\\\"36\\\"> <natural-abundance> <mass value=\\\"83.798\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"78\\\"> <mass value=\\\"77.920388\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.00355\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"80\\\"> <mass value=\\\"79.916379\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.02286\\\" error=\\\"0.00010\\\" /> </isotope> <isotope mass-number=\\\"82\\\"> <mass value=\\\"81.9134850\\\" error=\\\"0.0000028\\\" /> <abundance value=\\\"0.11593\\\" error=\\\"0.00031\\\" /> </isotope> <isotope mass-number=\\\"83\\\"> <mass value=\\\"82.914137\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.11500\\\" error=\\\"0.00019\\\" /> </isotope> <isotope mass-number=\\\"84\\\"> <mass value=\\\"83.911508\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.56987\\\" error=\\\"0.00015\\\" /> </isotope> <isotope mass-number=\\\"86\\\"> <mass value=\\\"85.910615\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.17279\\\" error=\\\"0.00041\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Rb\\\" atomic-number=\\\"37\\\"> <natural-abundance> <mass value=\\\"85.4678\\\" error=\\\"0.0003\\\" /> <isotope mass-number=\\\"85\\\"> <mass value=\\\"84.9117924\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.7217\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"87\\\"> <mass value=\\\"86.9091858\\\" error=\\\"0.0000028\\\" /> <abundance value=\\\"0.2783\\\" error=\\\"0.0002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sr\\\" atomic-number=\\\"38\\\"> <natural-abundance> <mass value=\\\"87.62\\\" error=\\\"0.01\\\" /> <isotope mass-number=\\\"84\\\"> <mass value=\\\"83.913426\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0056\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"86\\\"> <mass value=\\\"85.9092647\\\" error=\\\"0.0000025\\\" /> <abundance value=\\\"0.0986\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"87\\\"> <mass value=\\\"86.9088816\\\" error=\\\"0.0000025\\\" /> <abundance value=\\\"0.0700\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"88\\\"> <mass value=\\\"87.9056167\\\" error=\\\"0.0000025\\\" /> <abundance value=\\\"0.8258\\\" error=\\\"0.0001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Y\\\" atomic-number=\\\"39\\\"> <natural-abundance> <mass value=\\\"88.90585\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"89\\\"> <mass value=\\\"88.9058485\\\" error=\\\"0.0000026\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Zr\\\" atomic-number=\\\"40\\\"> <natural-abundance> <mass value=\\\"91.224\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"90\\\"> <mass value=\\\"89.9047022\\\" error=\\\"0.0000024\\\" /> <abundance value=\\\"0.5145\\\" error=\\\"0.0040\\\" /> </isotope> <isotope mass-number=\\\"91\\\"> <mass value=\\\"90.9056434\\\" error=\\\"0.0000023\\\" /> <abundance value=\\\"0.1122\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"92\\\"> <mass value=\\\"91.9050386\\\" error=\\\"0.0000023\\\" /> <abundance value=\\\"0.1715\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"94\\\"> <mass value=\\\"93.9063144\\\" error=\\\"0.0000026\\\" /> <abundance value=\\\"0.1738\\\" error=\\\"0.0028\\\" /> </isotope> <isotope mass-number=\\\"96\\\"> <mass value=\\\"95.908275\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0280\\\" error=\\\"0.0009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Nb\\\" atomic-number=\\\"41\\\"> <natural-abundance> <mass value=\\\"92.90638\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"93\\\"> <mass value=\\\"92.9063762\\\" error=\\\"0.0000024\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Mo\\\" atomic-number=\\\"42\\\"> <natural-abundance> <mass value=\\\"95.94\\\" error=\\\"0.02\\\" /> <isotope mass-number=\\\"92\\\"> <mass value=\\\"91.906810\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.1477\\\" error=\\\"0.0031\\\" /> </isotope> <isotope mass-number=\\\"94\\\"> <mass value=\\\"93.9050867\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.0923\\\" error=\\\"0.0010\\\" /> </isotope> <isotope mass-number=\\\"95\\\"> <mass value=\\\"94.9058406\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.1590\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"96\\\"> <mass value=\\\"95.9046780\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.1668\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"97\\\"> <mass value=\\\"96.9030201\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.0956\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"98\\\"> <mass value=\\\"97.9054069\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.2419\\\" error=\\\"0.0026\\\" /> </isotope> <isotope mass-number=\\\"100\\\"> <mass value=\\\"99.907476\\\" error=\\\"0.000006\\\" /> <abundance value=\\\"0.0967\\\" error=\\\"0.0020\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ru\\\" atomic-number=\\\"44\\\"> <natural-abundance> <mass value=\\\"101.07\\\" error=\\\"0.02\\\" /> <isotope mass-number=\\\"96\\\"> <mass value=\\\"95.907604\\\" error=\\\"0.000009\\\" /> <abundance value=\\\"0.0554\\\" error=\\\"0.0014\\\" /> </isotope> <isotope mass-number=\\\"98\\\"> <mass value=\\\"97.905287\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.0187\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"99\\\"> <mass value=\\\"98.9059385\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\".01276\\\" error=\\\"0.0014\\\" /> </isotope> <isotope mass-number=\\\"100\\\"> <mass value=\\\"99.9042189\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.1260\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"101\\\"> <mass value=\\\"100.9055815\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.1706\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"102\\\"> <mass value=\\\"101.9043488\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.3155\\\" error=\\\"0.0014\\\" /> </isotope> <isotope mass-number=\\\"104\\\"> <mass value=\\\"103.905430\\\" error=\\\".01862\\\" /> <abundance value=\\\"0.1862\\\" error=\\\"0.0027\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Rh\\\" atomic-number=\\\"45\\\"> <natural-abundance> <mass value=\\\"1025.90550\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"103\\\"> <mass value=\\\"102.905504\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pd\\\" atomic-number=\\\"46\\\"> <natural-abundance> <mass value=\\\"106.42\\\" error=\\\"0.01\\\" /> <isotope mass-number=\\\"102\\\"> <mass value=\\\"101.905607\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0102\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"104\\\"> <mass value=\\\"103.904034\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.1114\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"105\\\"> <mass value=\\\"104.905083\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.2233\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"106\\\"> <mass value=\\\"105.903484\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.2733\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"108\\\"> <mass value=\\\"107.903895\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.2646\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"110\\\"> <mass value=\\\"109.905153\\\" error=\\\"0.000012\\\" /> <abundance value=\\\"0.1172\\\" error=\\\"0.0009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ag\\\" atomic-number=\\\"47\\\"> <natural-abundance> <mass value=\\\"107.8682\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"107\\\"> <mass value=\\\"106.905093\\\" error=\\\"0.000006\\\" /> <abundance value=\\\"0.51839\\\" error=\\\"0.00008\\\" /> </isotope> <isotope mass-number=\\\"109\\\"> <mass value=\\\"108.904756\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.48161\\\" error=\\\"0.00008\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cd\\\" atomic-number=\\\"48\\\"> <natural-abundance> <mass value=\\\"112.411\\\" error=\\\"0.008\\\" /> <isotope mass-number=\\\"106\\\"> <mass value=\\\"105.906458\\\" error=\\\"0.000006\\\" /> <abundance value=\\\"0.0125\\\" error=\\\"0.0006\\\" /> </isotope> <isotope mass-number=\\\"108\\\"> <mass value=\\\"107.904183\\\" error=\\\"0.000006\\\" /> <abundance value=\\\"0.0089\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"110\\\"> <mass value=\\\"109.903006\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1249\\\" error=\\\"0.0018\\\" /> </isotope> <isotope mass-number=\\\"111\\\"> <mass value=\\\"110.904182\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1280\\\" error=\\\"0.0012\\\" /> </isotope> <isotope mass-number=\\\"112\\\"> <mass value=\\\"111.9027577\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.2413\\\" error=\\\"0.0021\\\" /> </isotope> <isotope mass-number=\\\"113\\\"> <mass value=\\\"112.9044014\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.1222\\\" error=\\\"0.0012\\\" /> </isotope> <isotope mass-number=\\\"114\\\"> <mass value=\\\"113.9033586\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.2873\\\" error=\\\"0.0042\\\" /> </isotope> <isotope mass-number=\\\"116\\\"> <mass value=\\\"115.904756\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0749\\\" error=\\\"0.0018\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"In\\\" atomic-number=\\\"49\\\"> <natural-abundance> <mass value=\\\"114.818\\\" error=\\\"0.003\\\" /> <isotope mass-number=\\\"113\\\"> <mass value=\\\"112.904062\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0429\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"115\\\"> <mass value=\\\"114.903879\\\" error=\\\"0.000040\\\" /> <abundance value=\\\"0.9571\\\" error=\\\"0.0005\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sn\\\" atomic-number=\\\"50\\\"> <natural-abundance> <mass value=\\\"118.710\\\" error=\\\"0.007\\\" /> <isotope mass-number=\\\"112\\\"> <mass value=\\\"111.904822\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.0097\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"114\\\"> <mass value=\\\"113.902783\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0066\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"115\\\"> <mass value=\\\"114.903347\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0034\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"116\\\"> <mass value=\\\"115.901745\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1454\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"117\\\"> <mass value=\\\"116.902955\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0768\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"118\\\"> <mass value=\\\"117.901608\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2422\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"119\\\"> <mass value=\\\"118.903311\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0859\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"120\\\"> <mass value=\\\"119.9021985\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.3258\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"122\\\"> <mass value=\\\"121.9034411\\\" error=\\\"0.0000029\\\" /> <abundance value=\\\"0.0463\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"124\\\"> <mass value=\\\"123.9052745\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.0579\\\" error=\\\"0.0005\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sb\\\" atomic-number=\\\"51\\\"> <natural-abundance> <mass value=\\\"121.760\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"121\\\"> <mass value=\\\"120.9038222\\\" error=\\\"0.0000026\\\" /> <abundance value=\\\"0.5721\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"123\\\"> <mass value=\\\"122.9042160\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.4279\\\" error=\\\"0.0005\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Te\\\" atomic-number=\\\"52\\\"> <natural-abundance> <mass value=\\\"127.60\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"120\\\"> <mass value=\\\"119.904026\\\" error=\\\"0.000011\\\" /> <abundance value=\\\"0.0009\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"122\\\"> <mass value=\\\"121.9030558\\\" error=\\\"0.0000029\\\" /> <abundance value=\\\"0.0255\\\" error=\\\"0.0012\\\" /> </isotope> <isotope mass-number=\\\"123\\\"> <mass value=\\\"122.9042711\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.0089\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"124\\\"> <mass value=\\\"123.9028188\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0474\\\" error=\\\"0.0014\\\" /> </isotope> <isotope mass-number=\\\"125\\\"> <mass value=\\\"124.9044241\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.0707\\\" error=\\\"0.0015\\\" /> </isotope> <isotope mass-number=\\\"126\\\"> <mass value=\\\"125.9033049\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.1884\\\" error=\\\"0.0025\\\" /> </isotope> <isotope mass-number=\\\"128\\\"> <mass value=\\\"127.9044615\\\" error=\\\"0.0000019\\\" /> <abundance value=\\\"0.3174\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"130\\\"> <mass value=\\\"129.9062229\\\" error=\\\"0.0000021\\\" /> <abundance value=\\\"0.3408\\\" error=\\\"0.0062\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"I\\\" atomic-number=\\\"53\\\"> <natural-abundance> <mass value=\\\"126.90447\\\" error=\\\"0.00003\\\" /> <isotope mass-number=\\\"127\\\"> <mass value=\\\"126.904468\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Xe\\\" atomic-number=\\\"54\\\"> <natural-abundance> <mass value=\\\"131.293\\\" error=\\\"0.006\\\" /> <isotope mass-number=\\\"124\\\"> <mass value=\\\"123.9058954\\\" error=\\\"0.0000021\\\" /> <abundance value=\\\"0.000952\\\" error=\\\"0.000003\\\" /> </isotope> <isotope mass-number=\\\"126\\\"> <mass value=\\\"125.904268\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.000890\\\" error=\\\"0.000002\\\" /> </isotope> <isotope mass-number=\\\"128\\\"> <mass value=\\\"127.9035305\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.019102\\\" error=\\\"0.000008\\\" /> </isotope> <isotope mass-number=\\\"129\\\"> <mass value=\\\"128.9047799\\\" error=\\\"0.0000009\\\" /> <abundance value=\\\"0.264006\\\" error=\\\"0.000082\\\" /> </isotope> <isotope mass-number=\\\"130\\\"> <mass value=\\\"129.9035089\\\" error=\\\"0.0000011\\\" /> <abundance value=\\\"0.040710\\\" error=\\\"0.000013\\\" /> </isotope> <isotope mass-number=\\\"131\\\"> <mass value=\\\"130.9050828\\\" error=\\\"0.0000018\\\" /> <abundance value=\\\"0.212324\\\" error=\\\"0.000030\\\" /> </isotope> <isotope mass-number=\\\"132\\\"> <mass value=\\\"131.9041546\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.269086\\\" error=\\\"0.000033\\\" /> </isotope> <isotope mass-number=\\\"134\\\"> <mass value=\\\"133.9053945\\\" error=\\\"0.0000009\\\" /> <abundance value=\\\"0.104357\\\" error=\\\"0.000021\\\" /> </isotope> <isotope mass-number=\\\"136\\\"> <mass value=\\\"135.907220\\\" error=\\\"0.000008\\\" /> <abundance value=\\\"0.088573\\\" error=\\\"0.000044\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cs\\\" atomic-number=\\\"55\\\"> <natural-abundance> <mass value=\\\"132.90545\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"133\\\"> <mass value=\\\"132.905447\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ba\\\" atomic-number=\\\"56\\\"> <natural-abundance> <mass value=\\\"137.327\\\" error=\\\"0.007\\\" /> <isotope mass-number=\\\"130\\\"> <mass value=\\\"129.906311\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.00106\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"132\\\"> <mass value=\\\"131.905056\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.00101\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"134\\\"> <mass value=\\\"133.904504\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.02417\\\" error=\\\"0.00018\\\" /> </isotope> <isotope mass-number=\\\"135\\\"> <mass value=\\\"134.905684\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.000003\\\" error=\\\"0.00012\\\" /> </isotope> <isotope mass-number=\\\"136\\\"> <mass value=\\\"135.904571\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.07854\\\" error=\\\"0.00024\\\" /> </isotope> <isotope mass-number=\\\"137\\\"> <mass value=\\\"136.905822\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.11232\\\" error=\\\"0.00024\\\" /> </isotope> <isotope mass-number=\\\"138\\\"> <mass value=\\\"137.905242\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.71698\\\" error=\\\"0.00042\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"La\\\" atomic-number=\\\"57\\\"> <natural-abundance> <mass value=\\\"138.9055\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"138\\\"> <mass value=\\\"137.907108\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00090\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"139\\\"> <mass value=\\\"138.906349\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.99910\\\" error=\\\"0.00001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ce\\\" atomic-number=\\\"58\\\"> <natural-abundance> <mass value=\\\"140.116\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"136\\\"> <mass value=\\\"135.907140\\\" error=\\\"0.000050\\\" /> <abundance value=\\\"0.00185\\\" error=\\\"0.00002\\\" /> </isotope> <isotope mass-number=\\\"138\\\"> <mass value=\\\"137.905986\\\" error=\\\"0.000011\\\" /> <abundance value=\\\"0.00251\\\" error=\\\"0.00002\\\" /> </isotope> <isotope mass-number=\\\"140\\\"> <mass value=\\\"139.905\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.88450\\\" error=\\\"0.00051\\\" /> </isotope> <isotope mass-number=\\\"142\\\"> <mass value=\\\"141.909241\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.11114\\\" error=\\\"0.00051\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pr\\\" atomic-number=\\\"59\\\"> <natural-abundance> <mass value=\\\"140.90765\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"141\\\"> <mass value=\\\"140.907648\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Nd\\\" atomic-number=\\\"60\\\"> <natural-abundance> <mass value=\\\"144.24\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"142\\\"> <mass value=\\\"141.907719\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.272\\\" error=\\\"0.005\\\" /> </isotope> <isotope mass-number=\\\"143\\\"> <mass value=\\\"142.909810\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.122\\\" error=\\\"0.002\\\" /> </isotope> <isotope mass-number=\\\"144\\\"> <mass value=\\\"143.910083\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.238\\\" error=\\\"0.003\\\" /> </isotope> <isotope mass-number=\\\"145\\\"> <mass value=\\\"144.912569\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.083\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"146\\\"> <mass value=\\\"145.913113\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.172\\\" error=\\\"0.003\\\" /> </isotope> <isotope mass-number=\\\"148\\\"> <mass value=\\\"147.916889\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.057\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"150\\\"> <mass value=\\\"149.920887\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.056\\\" error=\\\"0.002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sm\\\" atomic-number=\\\"62\\\"> <natural-abundance> <mass value=\\\"150.36\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"144\\\"> <mass value=\\\"143.911996\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0307\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"147\\\"> <mass value=\\\"146.914894\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1499\\\" error=\\\"0.0018\\\" /> </isotope> <isotope mass-number=\\\"148\\\"> <mass value=\\\"147.914818\\\" error=\\\"0.1124\\\" /> <abundance value=\\\"0.1124\\\" error=\\\"0.0010\\\" /> </isotope> <isotope mass-number=\\\"149\\\"> <mass value=\\\"148.917180\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1382\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"150\\\"> <mass value=\\\"149.917272\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0738\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"152\\\"> <mass value=\\\"151.919729\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2675\\\" error=\\\"0.0016\\\" /> </isotope> <isotope mass-number=\\\"154\\\"> <mass value=\\\"153.922206\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2275\\\" error=\\\"0.0029\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Eu\\\" atomic-number=\\\"63\\\"> <natural-abundance> <mass value=\\\"151.964\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"151\\\"> <mass value=\\\"150.919846\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.4781\\\" error=\\\"0.0006\\\" /> </isotope> <isotope mass-number=\\\"153\\\"> <mass value=\\\"152.921227\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.5219\\\" error=\\\"0.0006\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Gd\\\" atomic-number=\\\"64\\\"> <natural-abundance> <mass value=\\\"157.25\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"152\\\"> <mass value=\\\"151.919789\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0020\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"154\\\"> <mass value=\\\"153.920862\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0218\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"155\\\"> <mass value=\\\"154.922619\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1480\\\" error=\\\"0.0012\\\" /> </isotope> <isotope mass-number=\\\"156\\\"> <mass value=\\\"155.922120\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2047\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"157\\\"> <mass value=\\\"156.923957\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1565\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"158\\\"> <mass value=\\\"157.924101\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2484\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"160\\\"> <mass value=\\\"159.927051\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2186\\\" error=\\\"0.0019\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Tb\\\" atomic-number=\\\"65\\\"> <natural-abundance> <mass value=\\\"158.92534\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"159\\\"> <mass value=\\\"158.925343\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Dy\\\" atomic-number=\\\"66\\\"> <natural-abundance> <mass value=\\\"162.500\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"156\\\"> <mass value=\\\"155.924278\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.00056\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"158\\\"> <mass value=\\\"157.924405\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00095\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"160\\\"> <mass value=\\\"159.925194\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.02329\\\" error=\\\"0.00018\\\" /> </isotope> <isotope mass-number=\\\"161\\\"> <mass value=\\\"160.926930\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.18889\\\" error=\\\"0.00042\\\" /> </isotope> <isotope mass-number=\\\"162\\\"> <mass value=\\\"161.926795\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.25475\\\" error=\\\"0.00036\\\" /> </isotope> <isotope mass-number=\\\"163\\\"> <mass value=\\\"162.928728\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.24896\\\" error=\\\"0.00042\\\" /> </isotope> <isotope mass-number=\\\"164\\\"> <mass value=\\\"163.929171\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.28260\\\" error=\\\"0.00054\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ho\\\" atomic-number=\\\"67\\\"> <natural-abundance> <mass value=\\\"164.93032\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"165\\\"> <mass value=\\\"164.930319\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Er\\\" atomic-number=\\\"68\\\"> <natural-abundance> <mass value=\\\"167.259\\\" error=\\\"0.003\\\" /> <isotope mass-number=\\\"162\\\"> <mass value=\\\"161.928775\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00139\\\" error=\\\"0.00005\\\" /> </isotope> <isotope mass-number=\\\"164\\\"> <mass value=\\\"163.929197\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.01601\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"166\\\"> <mass value=\\\"165.930290\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.33503\\\" error=\\\"0.00036\\\" /> </isotope> <isotope mass-number=\\\"167\\\"> <mass value=\\\"166.932046\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.22869\\\" error=\\\"0.00009\\\" /> </isotope> <isotope mass-number=\\\"168\\\"> <mass value=\\\"167.932368\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.26978\\\" error=\\\"0.00018\\\" /> </isotope> <isotope mass-number=\\\"170\\\"> <mass value=\\\"169.935461\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.14910\\\" error=\\\"0.00036\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Tm\\\" atomic-number=\\\"69\\\"> <natural-abundance> <mass value=\\\"168.93421\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"169\\\"> <mass value=\\\"168.934211\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Yb\\\" atomic-number=\\\"70\\\"> <natural-abundance> <mass value=\\\"173.04\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"168\\\"> <mass value=\\\"167.933895\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.0013\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"170\\\"> <mass value=\\\"169.934759\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0304\\\" error=\\\"0.0015\\\" /> </isotope> <isotope mass-number=\\\"171\\\"> <mass value=\\\"170.936323\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1428\\\" error=\\\"0.0057\\\" /> </isotope> <isotope mass-number=\\\"172\\\"> <mass value=\\\"171.936378\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2183\\\" error=\\\"0.0067\\\" /> </isotope> <isotope mass-number=\\\"173\\\"> <mass value=\\\"172.938207\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1613\\\" error=\\\"0.0027\\\" /> </isotope> <isotope mass-number=\\\"174\\\"> <mass value=\\\"173.938858\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.3183\\\" error=\\\"0.0092\\\" /> </isotope> <isotope mass-number=\\\"176\\\"> <mass value=\\\"175.942569\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1276\\\" error=\\\"0.0041\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Lu\\\" atomic-number=\\\"71\\\"> <natural-abundance> <mass value=\\\"174.967\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"175\\\"> <mass value=\\\"174.9407682\\\" error=\\\"0.0000028\\\" /> <abundance value=\\\"0.9741\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"176\\\"> <mass value=\\\"175.9426827\\\" error=\\\"0.0000028\\\" /> <abundance value=\\\"0.0259\\\" error=\\\"0.0002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Hf\\\" atomic-number=\\\"72\\\"> <natural-abundance> <mass value=\\\"178.49\\\" error=\\\"0.02\\\" /> <isotope mass-number=\\\"174\\\"> <mass value=\\\"173.940042\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0016\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"176\\\"> <mass value=\\\"175.941403\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0526\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"177\\\"> <mass value=\\\"176.9432204\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.1860\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"178\\\"> <mass value=\\\"177.9436981\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.2728\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"179\\\"> <mass value=\\\"178.9488154\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.1362\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"180\\\"> <mass value=\\\"179.9465488\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.3508\\\" error=\\\"0.0016\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ta\\\" atomic-number=\\\"73\\\"> <natural-abundance> <mass value=\\\"180.9479\\\" error=\\\"0.0001\\\" /> <isotope mass-number=\\\"180\\\"> <mass value=\\\"179.947466\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.00012\\\" error=\\\"0.00002\\\" /> </isotope> <isotope mass-number=\\\"181\\\"> <mass value=\\\"180.947996\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.99988\\\" error=\\\"0.00002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"W\\\" atomic-number=\\\"74\\\"> <natural-abundance> <mass value=\\\"183.84\\\" error=\\\"0.01\\\" /> <isotope mass-number=\\\"180\\\"> <mass value=\\\"179.946706\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.0012\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"182\\\"> <mass value=\\\"181.948205\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.265\\\" error=\\\"0.0016\\\" /> </isotope> <isotope mass-number=\\\"183\\\"> <mass value=\\\"182.9502242\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.1431\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"184\\\"> <mass value=\\\"183.9509323\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.3064\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"186\\\"> <mass value=\\\"185.954362\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2843\\\" error=\\\"0.0019\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Re\\\" atomic-number=\\\"75\\\"> <natural-abundance> <mass value=\\\"186.207\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"185\\\"> <mass value=\\\"184.952955\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.3740\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"187\\\"> <mass value=\\\"186.9557505\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.6260\\\" error=\\\"0.0002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Os\\\" atomic-number=\\\"76\\\"> <natural-abundance> <mass value=\\\"190.23\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"184\\\"> <mass value=\\\"183.952491\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0002\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"186\\\"> <mass value=\\\"185.953838\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0159\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"187\\\"> <mass value=\\\"186.9557476\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.0196\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"188\\\"> <mass value=\\\"187.9558357\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.1324\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"189\\\"> <mass value=\\\"188.958145\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1615\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"190\\\"> <mass value=\\\"189.958445\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2626\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"192\\\"> <mass value=\\\"191.961479\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.4078\\\" error=\\\"0.0019\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ir\\\" atomic-number=\\\"77\\\"> <natural-abundance> <mass value=\\\"192.217\\\" error=\\\"0.003\\\" /> <isotope mass-number=\\\"191\\\"> <mass value=\\\"190.960591\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.373\\\" error=\\\"0.002\\\" /> </isotope> <isotope mass-number=\\\"193\\\"> <mass value=\\\"192.962923\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.627\\\" error=\\\"0.002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pt\\\" atomic-number=\\\"78\\\"> <natural-abundance> <mass value=\\\"195.078\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"190\\\"> <mass value=\\\"189.959930\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.00014\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"192\\\"> <mass value=\\\"191.961035\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00782\\\" error=\\\"0.00007\\\" /> </isotope> <isotope mass-number=\\\"194\\\"> <mass value=\\\"193.962663\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.32967\\\" error=\\\"0.00099\\\" /> </isotope> <isotope mass-number=\\\"195\\\"> <mass value=\\\"194.964774\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.33832\\\" error=\\\"0.00010\\\" /> </isotope> <isotope mass-number=\\\"196\\\"> <mass value=\\\"195.964934\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.25242\\\" error=\\\"0.00041\\\" /> </isotope> <isotope mass-number=\\\"198\\\"> <mass value=\\\"197.967875\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.07163\\\" error=\\\"0.00055\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Au\\\" atomic-number=\\\"79\\\"> <natural-abundance> <mass value=\\\"196.96655\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"197\\\"> <mass value=\\\"196.966551\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Hg\\\" atomic-number=\\\"80\\\"> <natural-abundance> <mass value=\\\"200.59\\\" error=\\\"0.02\\\" /> <isotope mass-number=\\\"196\\\"> <mass value=\\\"195.965814\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0015\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"198\\\"> <mass value=\\\"197.966752\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0997\\\" error=\\\"0.0020\\\" /> </isotope> <isotope mass-number=\\\"199\\\"> <mass value=\\\"198.968262\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1687\\\" error=\\\"0.0022\\\" /> </isotope> <isotope mass-number=\\\"200\\\"> <mass value=\\\"199.968309\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2310\\\" error=\\\"0.0019\\\" /> </isotope> <isotope mass-number=\\\"201\\\"> <mass value=\\\"200.970285\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1318\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"202\\\"> <mass value=\\\"201.970625\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2986\\\" error=\\\"0.0026\\\" /> </isotope> <isotope mass-number=\\\"204\\\"> <mass value=\\\"203.973475\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0687\\\" error=\\\"0.0015\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Tl\\\" atomic-number=\\\"81\\\"> <natural-abundance> <mass value=\\\"204.3833\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"203\\\"> <mass value=\\\"202.972329\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2952\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"205\\\"> <mass value=\\\"204.974412\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.7048\\\" error=\\\"0.0001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pb\\\" atomic-number=\\\"82\\\"> <natural-abundance> <mass value=\\\"207.2\\\" error=\\\"0.1\\\" /> <isotope mass-number=\\\"204\\\"> <mass value=\\\"203.973028\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.014\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"206\\\"> <mass value=\\\"205.974449\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.241\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"207\\\"> <mass value=\\\"206.975880\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.221\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"208\\\"> <mass value=\\\"207.976636\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.524\\\" error=\\\"0.001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Bi\\\" atomic-number=\\\"83\\\"> <natural-abundance> <mass value=\\\"208.98038\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"209\\\"> <mass value=\\\"208.980384\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Th\\\" atomic-number=\\\"90\\\"> <natural-abundance> <mass value=\\\"232.0381\\\" error=\\\"0.0001\\\" /> <isotope mass-number=\\\"232\\\"> <mass value=\\\"232.0380495\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pa\\\" atomic-number=\\\"91\\\"> <natural-abundance> <mass value=\\\"231.03588\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"231\\\"> <mass value=\\\"231.03588\\\" error=\\\"0.00002\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"U\\\" atomic-number=\\\"92\\\"> <natural-abundance> <mass value=\\\"238.02891\\\" error=\\\"0.00003\\\" /> <isotope mass-number=\\\"234\\\"> <mass value=\\\"234.0409447\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.000054\\\" error=\\\"0.000005\\\" /> </isotope> <isotope mass-number=\\\"235\\\"> <mass value=\\\"235.0439222\\\" error=\\\"0.0000021\\\" /> <abundance value=\\\"0.007204\\\" error=\\\"0.000006\\\" /> </isotope> <isotope mass-number=\\\"238\\\"> <mass value=\\\"238.0507835\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.992742\\\" error=\\\"0.000010\\\" /> </isotope> </natural-abundance> </entry></atomic-mass-table>\";\n try {\n// this.document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(in);\n this.document = XMLParser.parse(xmlContent);\n } catch (Exception e) {\n throw new RuntimeException(\"Error reading atomic_system.xml.\");\n }\n\n NodeList nodes = document.getElementsByTagName(\"entry\");\n\n for (int i = 0; i < nodes.getLength(); i++) {\n Node node = nodes.item(i);\n\n String symbol = node.getAttributes().getNamedItem(\"symbol\").getNodeValue();\n\n entries.put(symbol, new Entry(node));\n }\n }", "private void processAce ()\n{\n // Set the .ace input file name.\n ace_file.setFileName ( fileName );\n\n // Open the .ace input file.\n ace_file.openFile ();\n\n // Set the XML file name.\n xml_file.setFileName ( fileName + \".xml\" );\n\n // Open the XML file for writing.\n xml_file.open_XML_file ();\n\n // Write the XML file header.\n xml_file.write_XML_header ();\n\n // Process the .ace summary line.\n processSummary ();\n\n // Process the Phrap assembled contigs.\n processContigs ();\n\n // Complete the XML file.\n xml_file.write_XML_footer ();\n xml_file.close_XML ();\n\n // Close the .ace input file.\n ace_file.closeFile ();\n\n // Close the XML file.\n xml_file.closeFile ();\n}", "private void importData() {\n Sheet sheet;\n Row row;\n int lastRowNum;\n // Discover how many sheets there are in the workbook....\n int numSheets = this.workbook.getNumberOfSheets();\n // and then iterate through them.\n for (int i = 0; i < numSheets; i++) {\n\n // Get a reference to a sheet and check to see if it contains\n // any rows.\n sheet = this.workbook.getSheetAt(i);\n if (sheet.getPhysicalNumberOfRows() > 0) {\n lastRowNum = sheet.getLastRowNum();\n for (int j = 1; j <= lastRowNum; j++) {\n row = sheet.getRow(j);\n this.rowToRenddet(row);\n }\n }\n }\n }", "public void load() throws IOException {\r\n File file = new File(this.filename);\r\n //if file exist.\r\n if (file.exists() && !file.isDirectory()) {\r\n ObjectInputStream is = null;\r\n try {\r\n //opening and reaind the source file\r\n is = new ObjectInputStream(new FileInputStream(this.filename));\r\n SettingsFile temp = (SettingsFile) is.readObject();\r\n //import the loaded file data to the current core.SettingsFile\r\n this.boardSize = temp.getBoardSize();\r\n this.firstPlayer = temp.getFirstPlayer();\r\n this.secondPlayer = temp.getSecondPlayer();\r\n this.player1Color = temp.getPlayer1Color();\r\n this.player2Color = temp.getPlayer2Color();\r\n } catch (IOException e) {\r\n System.out.println(\"Error while loading\");\r\n } catch (ClassNotFoundException e) {\r\n System.out.println(\"Problem with class\");\r\n } finally {\r\n if (is != null) {\r\n is.close();\r\n }\r\n }\r\n }\r\n //if no file, set default settings.\r\n else {\r\n save(SIZE, FIRST_PLAYER, SECOND_PLAYER, PLAYER1COLOR, PLAYER2COLOR);\r\n }\r\n }", "public void parseFile(String filePath) {\r\n\r\n\t\t// get the file content\r\n\t\tString fileContent = getFileContent(filePath);\r\n\r\n\t\tJSONObject flightEnvObj = new JSONObject(fileContent);\r\n\r\n\t\tairports = flightEnvObj.getJSONObject(\"airports\");\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tJSONObject bufferGeometry = flightEnvObj.getJSONObject(\"bufferGeometry\");\r\n\t\twaypoints = flightEnvObj.getJSONObject(\"pathPoints\");\r\n\t\troutes = flightEnvObj.getJSONObject(\"paths\");\r\n\r\n\t\t_airportsFeatures = airports.getJSONArray(\"features\");\r\n\t\t_waypointsFeatures = waypoints.getJSONArray(\"features\");\r\n\t\t_routesFeatures = routes.getJSONArray(\"features\");\r\n\r\n\t\t// call private method\r\n\t\tgenerateLayerAirports();\r\n\t\tgenerateLayerWaypoints();\r\n\t\tgenerateLayerRoutes();\r\n\r\n\t}", "public void parseXml(String file) {\n\n try {\n\n debug(\"\\n\\nIn the beginning God created the heaven and the world...\\n\\n\");\n\n File fXmlFile = new File(\"./levels/\" + file);\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n Document doc = dBuilder.parse(fXmlFile);\n\n doc.getDocumentElement().normalize();\n debug(\"Chosen entity: \" + doc.getDocumentElement().getNodeName());\n\n NodeList placeList = doc.getElementsByTagName(\"place\");\n NodeList passageList = doc.getElementsByTagName(\"passage\");\n NodeList furnitureList = doc.getElementsByTagName(\"furniture\");\n NodeList storyList = doc.getElementsByTagName(\"story\");\n\n // Create object arrays\n ArrayList<Place> places = new ArrayList<>();\n ArrayList<Item> items = new ArrayList<>();\n ArrayList<Passage> passages = new ArrayList<>();\n ArrayList<Furniture> furnitures = new ArrayList<Furniture>();\n\n // parse story text\n Node storyNode = storyList.item(0);\n Element storyElement = (Element) storyNode;\n debug(\"Intro: \" + storyElement.getElementsByTagName(\"introduction\").item(0).getTextContent());\n debug(\"Level: \" + storyElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"Version: \" + storyElement.getElementsByTagName(\"version\").item(0).getTextContent());\n // add story elements to world\n world.setIntroduction(\n storyElement.getElementsByTagName(\"introduction\").item(0).getTextContent());\n world.setLevelName(storyElement.getElementsByTagName(\"name\").item(0).getTextContent());\n world.setLevelVersion(storyElement.getElementsByTagName(\"version\").item(0).getTextContent());\n\n // parse all existing Places\n for (int placeCounter = 0; placeCounter < placeList.getLength(); placeCounter++) {\n Node placeNode = placeList.item(placeCounter);\n\n debug(\"\\nCurrent Element: \" + placeNode.getNodeName());\n\n if (placeNode.getNodeType() == Node.ELEMENT_NODE) {\n Element placeElement = (Element) placeNode;\n\n debug(\"- Ending: \" + placeElement.getAttribute(\"end\"));\n debug(\"- id: \" + placeElement.getAttribute(\"id\"));\n debug(\"- Name: \" + placeElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"- Description: \"\n + placeElement.getElementsByTagName(\"description\").item(0).getTextContent());\n\n // Create Places.\n places.add(new Place(placeElement.getElementsByTagName(\"name\").item(0).getTextContent(),\n placeElement.getElementsByTagName(\"description\").item(0).getTextContent().replace(\"\\\\n\", \"\\n\")));\n\n // add EndingPlace to World, set endingText to Places' Description\n if (placeElement.getAttribute(\"end\").equals(\"bad\")) {\n world.addBadEnding(places.get(placeCounter),\n places.get(placeCounter).getDescription());\n } else if(placeElement.getAttribute(\"end\").equals(\"good\")) {\n world.addGoodEnding(places.get(placeCounter),\n places.get(placeCounter).getDescription());\n }\n \n // parse all existing Place Items\n NodeList itemList = placeElement.getElementsByTagName(\"item\");\n\n for (int itemCounter = 0; itemCounter < itemList.getLength(); itemCounter++) {\n Node itemNode = itemList.item(itemCounter);\n\n Element itemElement = (Element) itemNode;\n\n debug(\"- Item\" + itemCounter + \":\");\n debug(\"- - Name: \" + itemElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"- - Description: \"\n + itemElement.getElementsByTagName(\"description\").item(0).getTextContent());\n\n // Create items.\n items.add(new Item(itemElement.getElementsByTagName(\"name\").item(0).getTextContent(),\n itemElement.getElementsByTagName(\"description\").item(0).getTextContent()));\n // Set items in current place.\n places.get(placeCounter).addObjectToPlace(getIncludedItem(itemElement, items));\n\n }\n }\n }\n\n // parse all furniture\n for (int furnitureCounter = 0; furnitureCounter < furnitureList\n .getLength(); furnitureCounter++) {\n Node furnitureNode = furnitureList.item(furnitureCounter);\n\n Element furnitureElement = (Element) furnitureNode;\n\n debug(\"\\nCurrent Element: \" + furnitureNode.getNodeName());\n\n debug(\"- Furniture\" + furnitureCounter);\n debug(\"- - In Place: \"\n + furnitureElement.getElementsByTagName(\"in-place\").item(0).getTextContent());\n debug(\n \"- - Name: \" + furnitureElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"- - Description: \"\n + furnitureElement.getElementsByTagName(\"description\").item(0).getTextContent());\n\n // Create furniture objects\n furnitures.add(\n new Furniture(furnitureElement.getElementsByTagName(\"name\").item(0).getTextContent(), // name\n furnitureElement.getElementsByTagName(\"description\").item(0).getTextContent(), // description\n furnitureElement.getElementsByTagName(\"in-place\").item(0).getTextContent()));\n\n NodeList furnitureItemList = furnitureElement.getElementsByTagName(\"content-item\");\n\n // parse all Furniture Items\n for (int furnitureItemCounter = 0; furnitureItemCounter < furnitureItemList\n .getLength(); furnitureItemCounter++) {\n Node furnitureItemNode = furnitureItemList.item(furnitureItemCounter);\n\n Element furnitureItemElement = (Element) furnitureItemNode;\n\n debug(\"- - Content Items:\");\n debug(\"- - - Name: \"\n + furnitureItemElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"- - - Description: \"\n + furnitureItemElement.getElementsByTagName(\"description\").item(0).getTextContent());\n\n addItems(furnitureItemElement, furnitures, items, furnitureCounter);\n\n }\n\n NodeList furnitureObstacleList = furnitureElement.getElementsByTagName(\"obstacle\");\n\n // parse all Furniture Obstacles\n for (int furnitureObstacleCounter = 0; furnitureObstacleCounter < furnitureObstacleList\n .getLength(); furnitureObstacleCounter++) {\n Node furnitureObstacleNode = furnitureObstacleList.item(furnitureObstacleCounter);\n\n Element furnitureObstacleElement = (Element) furnitureObstacleNode;\n\n debug(\"- - Obstacle:\");\n debug(\"- - - Description: \" + furnitureObstacleElement.getElementsByTagName(\"description\")\n .item(0).getTextContent());\n debug(\"- - - Resolution: \" + furnitureObstacleElement.getElementsByTagName(\"resolution\")\n .item(0).getTextContent());\n // debug(\"- - - Requirement: \" +\n // furnitureObstacleElement.getElementsByTagName(\"requiredItem\").item(0).getTextContent());\n\n // create furniture obstacle\n if (furnitureObstacleElement.getAttribute(\"type\").equals(\"double\")) {\n // double Item obstacle\n furnitures.get(furnitureCounter)\n .setObstalce(new DoubleItemObstacle(\"\",\n furnitureObstacleElement.getElementsByTagName(\"description\").item(0)\n .getTextContent(),\n furnitureObstacleElement.getElementsByTagName(\"resolution\").item(0)\n .getTextContent(),\n getRequiredItem(items,\n furnitureObstacleElement.getElementsByTagName(\"requiredItem\").item(0)\n .getTextContent()),\n getRequiredItem(items, furnitureObstacleElement\n .getElementsByTagName(\"additionalItem\").item(0).getTextContent())));\n\n } else if (furnitureObstacleElement.getAttribute(\"type\").equals(\"riddle\")) {\n // riddle Obstacle\n furnitures.get(furnitureCounter)\n .setObstalce(new RiddleObstacle(\"\",\n furnitureObstacleElement.getElementsByTagName(\"description\").item(0)\n .getTextContent(),\n furnitureObstacleElement.getElementsByTagName(\"resolution\").item(0)\n .getTextContent(),\n furnitureObstacleElement.getElementsByTagName(\"requiredAnswer\").item(0)\n .getTextContent()));\n\n } else {\n // normal Obstacle\n furnitures.get(furnitureCounter)\n .setObstalce(new ItemObstacle(\"\",\n furnitureObstacleElement.getElementsByTagName(\"description\").item(0)\n .getTextContent(),\n furnitureObstacleElement.getElementsByTagName(\"resolution\").item(0)\n .getTextContent(),\n getRequiredItem(items, furnitureObstacleElement\n .getElementsByTagName(\"requiredItem\").item(0).getTextContent())));\n }\n // add damage points to obstacle\n if (!furnitureObstacleElement.getAttribute(\"damage\").equals(\"\")) {\n passages.get(furnitureCounter).getObstacle()\n .setDamagepoints(Integer.parseInt(furnitureObstacleElement.getAttribute(\"damage\")));\n }\n\n }\n\n }\n\n // Add current furniture to its containing Place\n setFurnitureInPlace(furnitures, places);\n\n // parse all existing passages\n for (int passageCounter = 0; passageCounter < passageList.getLength(); passageCounter++) {\n Node passageNode = passageList.item(passageCounter);\n\n debug(\"\\nCurrent Element: \" + passageNode.getNodeName());\n\n if (passageNode.getNodeType() == Node.ELEMENT_NODE) {\n Element passageElement = (Element) passageNode;\n\n debug(\"- id: \" + passageElement.getAttribute(\"id\"));\n debug(\"- Name: \" + passageElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"- Description: \"\n + passageElement.getElementsByTagName(\"description\").item(0).getTextContent());\n debug(\"- Comes from: \"\n + passageElement.getElementsByTagName(\"comeFrom\").item(0).getTextContent());\n debug(\"- Connects to: \"\n + passageElement.getElementsByTagName(\"connectTo\").item(0).getTextContent());\n\n // Create Passage with connected Places.\n passages\n .add(new Passage(passageElement.getElementsByTagName(\"name\").item(0).getTextContent(),\n passageElement.getElementsByTagName(\"description\").item(0).getTextContent(),\n getFromPlace(passageElement, places), // from this Place\n getFollowPlace(passageElement, places)) // to that Place\n );\n\n // parse all existing Passage Obstacles\n NodeList obstacleList = passageElement.getElementsByTagName(\"obstacle\");\n\n for (int obstacleCounter = 0; obstacleCounter < obstacleList\n .getLength(); obstacleCounter++) {\n Node obstacleNode = obstacleList.item(obstacleCounter);\n\n Element obstacleElement = (Element) obstacleNode;\n\n debug(\"- Obstacle\" + passageCounter + \":\");\n debug(\"- - Description: \"\n + obstacleElement.getElementsByTagName(\"description\").item(0).getTextContent());\n debug(\"- - Resolution: \"\n + obstacleElement.getElementsByTagName(\"resolution\").item(0).getTextContent());\n // debug(\"- - Required Item: \" +\n // obstacleElement.getElementsByTagName(\"requiredItem\").item(0).getTextContent());\n\n // Create the obstacle for each passage.\n if (obstacleElement.getAttribute(\"type\").equals(\"double\")) {\n // double Item obstacle\n passages.get(passageCounter)\n .setObstacle(new DoubleItemObstacle(\"\",\n obstacleElement.getElementsByTagName(\"description\").item(0).getTextContent(),\n obstacleElement.getElementsByTagName(\"resolution\").item(0).getTextContent(),\n getRequiredItem(items,\n obstacleElement.getElementsByTagName(\"requiredItem\").item(0)\n .getTextContent()),\n getRequiredItem(items, obstacleElement.getElementsByTagName(\"additionalItem\")\n .item(0).getTextContent())));\n\n } else if (obstacleElement.getAttribute(\"type\").equals(\"riddle\")) {\n // riddle Obstacle\n passages.get(passageCounter).setObstacle(new RiddleObstacle(\"\",\n obstacleElement.getElementsByTagName(\"description\").item(0).getTextContent(),\n obstacleElement.getElementsByTagName(\"resolution\").item(0).getTextContent(),\n obstacleElement.getElementsByTagName(\"requiredAnswer\").item(0).getTextContent()));\n\n } else {\n // normal Obstacle\n passages.get(passageCounter)\n .setObstacle(new ItemObstacle(\"\",\n obstacleElement.getElementsByTagName(\"description\").item(0).getTextContent(),\n obstacleElement.getElementsByTagName(\"resolution\").item(0).getTextContent(),\n getRequiredItem(items, obstacleElement.getElementsByTagName(\"requiredItem\")\n .item(0).getTextContent())));\n }\n\n // add damage points to obstacle\n if (!obstacleElement.getAttribute(\"damage\").equals(\"\")) {\n passages.get(passageCounter).getObstacle()\n .setDamagepoints(Integer.parseInt(obstacleElement.getAttribute(\"damage\")));\n }\n\n\n }\n }\n }\n\n startingPlace = places.get(0);\n\n // Add Places to GameWorld\n addPlacesToWorld(places, world);\n\n // set starting Place in GameWorld\n if (world.getStartingPlace() == null) {\n world.setStartingPlace(startingPlace);\n }\n\n debug(\"\\n\\n\");\n debug(\"World has successfully been created! God saw all that he had made, and it was good.\");\n debug(\"\\n\\n\\n\\n\");\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public void readEquipment() {\n try {\n FileInputStream fileIn = new FileInputStream(\"temp/equipment.ser\");\n ObjectInputStream in = new ObjectInputStream(fileIn);\n equipment = (HashMap<String, Equipment>) in.readObject();\n in.close();\n fileIn.close();\n } catch (IOException e) {\n equipment = new HashMap<>();\n } catch (ClassNotFoundException c) {\n System.out.println(\"Class HashMap not found\");\n c.printStackTrace();\n return;\n }\n }", "@Override\r\n\tpublic void initializeFromFile(File inputXmlFile) {\n\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\r\n\t\ttry {\r\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\r\n\t\t\tDocument doc = builder.parse(inputXmlFile);\r\n\t\t\tNodeList xmlNodeList;\r\n\t\t\tNodeList xmlEdgeList;\r\n\t\t\txmlNodeList = doc.getElementsByTagName(\"node\");\r\n\r\n\t\t\tfor(int i=0;i<xmlNodeList.getLength();i++) {\r\n\r\n\t\t\t\tNode p=xmlNodeList.item(i);\r\n\t\t\t\tElement xmlNode =(Element) p;\r\n\t\t\t\tNodeList.add(xmlNode);\r\n\t\t\t\tNodeMap.put(Integer.parseInt(xmlNode.getAttribute(\"id\")),xmlNode);\r\n\r\n\r\n\t\t\t\t}\r\n\t\t\txmlEdgeList = doc.getElementsByTagName(\"edge\");\r\n\r\n\r\n\t\t\tfor(int j=0;j<xmlEdgeList.getLength();j++) {\r\n\t\t\t\tNode p = xmlEdgeList.item(j);\r\n\t\t\t\tElement xmlNode = (Element) p;\r\n\t\t\t\tEdgeList.add(xmlNode);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (ParserConfigurationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (SAXException 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\r\n\t}", "public void readFile() \n\t{\n\t\tArrayList<String> tempStations = new ArrayList<>();\n\t\t//create arraylist local variable tempStations which will hold the list of stations temporarily for a specific line to be added to the stations hashmap \n\n\t\tString mtrSystemFile = \"MTRsystem_partial.csv\";\n\t\t//store the csv file name in a string\n\t\tFile file = new File(mtrSystemFile);\n\t\t//create a file object for the MTRSystems csv file\n\n\t\ttry \n\t\t{\n\t\t\tScanner inputStream = new Scanner(file);\n\t\t\t//pass the file through to new scanner object to be scanned\n\n\t\t\twhile (inputStream.hasNext())\n\t\t\t//so long as the scanner object has another token to read from the csv file\n\t\t\t{\n\t\t\t\tString line = inputStream.nextLine();\n\t\t\t\t//store the next line in the string variable\n\t\t\t\tcells = line.split(\",\");\n\t\t\t\t//split each line into cells separated by a comma\n\t\t\t\tint celli = 1;\n\t\t\t\t//assign int index to 1, so that only stations are read excluding line name stored at position 0\n\n\t\t\t\twhile (celli <= cells.length - 1)\n\t\t\t\t//whilst the index is less than or equal the last position of the array\n\t\t\t\t{\n\t\t\t\t\tif (celli == 1 || celli == cells.length - 1)\n\t\t\t\t\t//if the index is at the second position in the array or at the last\n\t\t\t\t\t{\n\t\t\t\t\t\tallTermini.add((cells[celli]));\n\t\t\t\t\t\t//add termini to the ArrayList\n\t\t\t\t\t}\n\t\t\t\t\ttempStations.add(cells[celli]);\n\t\t\t\t\t//add station to the ArrayList\n\t\t\t\t\tcelli++;\n\t\t\t\t}\n\n\t\t\t\taddToStations(cells[0], tempStations);\n\t\t\t\t//add the line name and the list of stations for that line to the hashmap\n\t\t\t\ttempStations.clear();\n\t\t\t\t//Clear the temporary list for the next line\n\n\t\t\t\tcells = null;\n\t\t\t}\n\t\t\tinputStream.close();\n\t\t} catch (FileNotFoundException e) \n\t\t{\n\t\t\tSystem.out.println(\"file not found\");\n\t\t}\n\t}", "public int parseAdditionalConfig(List<String> lines, int line_i) {\n RTGraphComponent mycomp = (RTGraphComponent) getRTComponent();\n // Parse the extents\n if (lines.get(line_i).startsWith(\"#AC extents|\")) {\n StringTokenizer st = new StringTokenizer(lines.get(line_i++),\"|\");\n st.nextToken();\n extents = new Rectangle2D.Double(Double.parseDouble(st.nextToken()),\n Double.parseDouble(st.nextToken()),\n\t\t\t\t Double.parseDouble(st.nextToken()),\n\t\t\t\t Double.parseDouble(st.nextToken()));\n }\n // Parse the retained nodes\n if (lines.get(line_i).startsWith(\"#AC retain|\")) {\n StringTokenizer st = new StringTokenizer(lines.get(line_i++),\"|\"); st.nextToken();\n Set<String> new_retained_nodes = new HashSet<String>();\n while (st.hasMoreTokens()) new_retained_nodes.add(Utils.decFmURL(st.nextToken()));\n if (retained_nodes != null) {\n retained_nodes.clear();\n retained_nodes.addAll(new_retained_nodes);\n } else retained_nodes = new_retained_nodes;\n }\n // Parse the sticky labels\n if (lines.get(line_i).startsWith(\"#AC sticky|\")) {\n StringTokenizer st = new StringTokenizer(lines.get(line_i++),\"|\"); st.nextToken();\n Set<String> new_sticky_labels = new HashSet<String>();\n while (st.hasMoreTokens()) new_sticky_labels.add(Utils.decFmURL(st.nextToken()));\n if (mycomp.sticky_labels != null) {\n mycomp.sticky_labels.clear();\n mycomp.sticky_labels.addAll(new_sticky_labels);\n } else mycomp.sticky_labels = new_sticky_labels;\n }\n // Parse the coordinates\n while (lines.get(line_i).startsWith(\"#AC wxy|\")) {\n StringTokenizer st = new StringTokenizer(lines.get(line_i++),\"|\"); st.nextToken();\n String entity = Utils.decFmURL(st.nextToken());\n double x = Double.parseDouble(st.nextToken()),\n y = Double.parseDouble(st.nextToken());\n entity_to_wxy.put(entity, new Point2D.Double(x,y));\n }\n if (lines.get(line_i).equals(\"#AC graphend\")) line_i++;\n else throw new RuntimeException(\"Incorrect Ending For LinkNode Parser \\\"\" + lines.get(line_i) + \"\\\"\");\n\n // Apply the settings\n newBundlesRoot(getRTParent().getRootBundles());\n transform();\n return line_i;\n }", "Map<SportEquipment, Integer> fill(String address) throws FileNotFoundException {\n\n File f = new File(System.getProperty(Strings.USER_DIR) + Strings.SRC + address);\n Scanner s = null;\n int lineNumber = 0;\n goods = new TreeMap<SportEquipment, Integer>();\n\n try {\n s = new Scanner(f);\n\n //defines category\n while (s.hasNextLine()) {\n\n String line = s.nextLine();\n lineNumber++; //counts lines for log to define the places of possible mistakes\n\n try {\n String[] parts = line.split(Strings.REGEX);\n Category category = null;\n switch (parts[0].trim()) {\n case Strings.TENNIS:\n category = Category.TENNIS;\n break;\n case Strings.FOOTBALL:\n category = Category.FOOTBALL;\n break;\n case Strings.CHESS:\n category = Category.CHESS;\n break;\n case Strings.GYMNASTICS:\n category = Category.GYMNASTICS;\n break;\n case Strings.SWIMMING:\n category = Category.SWIMMING;\n break;\n default:\n throw new EnumConstantNotPresentException(Category.class, parts[0]);\n }\n\n String title = parts[1].trim(); //defines good's name\n double price = Double.valueOf(parts[2].trim()); //defines price\n int amount = Integer.valueOf(parts[3].trim()); //defines available amount\n\n if (amount <= 0 || title.length() < 3) {\n throw new NullPointerException();\n }\n\n goods.put(new SportEquipment(category, parts[1], price), amount); //creates a mapping\n\n } catch (EnumConstantNotPresentException e) {\n Reporter.getInstance().printProblem(e.enumType() + Strings.SPACE + e.constantName() +\n Strings.ENUM_NOT_EXIST + lineNumber);\n\n } catch (IndexOutOfBoundsException e) {\n Reporter.getInstance().printProblem(Strings.LACK_OF_DATA + lineNumber);\n\n } catch (NumberFormatException e) {\n Reporter.getInstance().printProblem(Strings.WRONG_NUMBER_DATA + lineNumber);\n\n } catch (NullPointerException e) {\n Reporter.getInstance().printProblem(Strings.NULL_NEGATIVE + lineNumber);\n }\n\n }\n return goods;\n\n } finally {\n s.close(); //closes Scanner in order to release the file \"Goods.txt\" and let the Reporter overwrite it\n }\n }", "private void reloadRadioStationFromRawXML(){\n //Log.i(LOG_TAG, \"reloadRadioStationFromRawXML\");\n try {\n String filePath = owner.getBaseContext().getFilesDir() + \"/\" + \"radios.xml\";\n File fXmlFile = new File(filePath);\n fXmlFile.delete();\n getDataSource();\n } catch (Exception e) {\n //TODO FireBase report\n e.printStackTrace();\n }\n }", "@SuppressWarnings(\"resource\")\n\tpublic void loadSetupConfig() throws IOException, BadConfigFormatException { \t// Method to read in rooms from legend and store them in a map\n\t\tFileReader setupInput = new FileReader(setupConfigFile);\t\t\t\t\t\t\t// File reader to parse the setup file\n\t\tScanner input = new Scanner(setupInput);\t\t\t\t\t\t\t\t\t\t\t// Scanner to use the data from the File Reader\n\n\t\twhile(input.hasNextLine()) {\n\t\t\tString currentLine = input.nextLine();\t\t\t\t\t\t\t\t\t\t\t// Grabs the next line from the setup file\n\t\t\tString list[] = currentLine.split(\", \"); \t\t\t\t\t\t\t\t\t\t// Need to get ahold of the final letter and .put it with the preceding string\n\t\t\tif(list.length > 1) {\n\t\t\t\tif(list[0].equalsIgnoreCase(\"Room\") || list[0].equalsIgnoreCase(\"Space\")) { // Catches all of the strings that begin with a Monacre for a room\n\t\t\t\t\tchar tempKey = list[2].charAt(0);\t\t\t\t\t\t\t\t\t\t// creating a temporary roomMap key\n\t\t\t\t\tRoom tempRoom = new Room(list[1]);\t\t\t\t\t\t\t\t\t\t// creating a temporary roomMap room\n\t\t\t\t\troomMap.put(tempKey, tempRoom);\t\t\t\t\t\t\t\t\t\t\t// adding those temporary values to the room map\n\t\t\t\t} else {\n\t\t\t\t\tthrow new BadConfigFormatException(\"incorrectly labeled space in setup file.\"); // Custom exception for BadConfigFormatException\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//setupInput.close();\n\t}", "private void importXMLSchema(Import bpelImport) {\n \tString namespace = bpelImport.getNamespace();\n \tString location = bpelImport.getLocation();\n \tif (location == null) {\n mLogger.severe(\"Unable to import schema document, import location is null \" + bpelImport);\n throw new XMLParseVisitorException(\"Unable to import schema document, import location is null \" + bpelImport);\n }\n \t\n \tLazyImportVisitorService vService = (LazyImportVisitorService) getVisitorService();\n \tBPELParseContext bpelParseContext = vService.getBPELParseContext();\n \tIXSDResolver xsdResolver = bpelParseContext.getXSDResolver();\n \t\n \tif(xsdResolver == null) {\n \t\tmLogger.severe(\"Unable to import schema document, must specify XSD Resolver \" + bpelImport);\n throw new XMLParseVisitorException(\"Unable to import schema document, must specify XSD Resolver \" + bpelImport);\n \t}\n \t\n \ttry {\n\t \tXMLSchema xsdDocument = xsdResolver.resolve(namespace, location);\n\t \n\t if(xsdDocument == null) {\n\t \tmLogger.severe(\"Unable to import schema document for import \" + bpelImport);\n\t throw new XMLParseVisitorException(\"Unable to import schema document for import \" + bpelImport);\t\n\t }\n\t \n\t bpelImport.setImportedObject(xsdDocument);\n \n } catch (EInsightModelException e) {\n mLogger.log(Level.SEVERE, \"Unable to import xsd document for import \" + bpelImport, e);\n throw new XMLParseVisitorException(\"Unable to import xsd document for import \" + bpelImport, e);\n }\n \n }", "private void importEvents(File toLoad) {\n\t\tif (toLoad.getName().endsWith(\".ics\")) {\n\t\t\ttry {\n\t\t\t\tthis.calendar.loadCalendar(toLoad);\n\t\t\t\tthis.showWeek(new GregorianCalendar());\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tnew JErrorFrame(e.getMessage());\n\t\t\t} catch (IOException e) {\n\t\t\t\tnew JErrorFrame(e.getMessage());\n\t\t\t} catch (CorruptedCalendarFileException e) {\n\t\t\t\tnew JErrorFrame(e.getMessage());\n\t\t\t}\n\t\t} else {\n\t\t\tnew JErrorFrame(\n\t\t\t\t\t\"The file type is incorrect, only .ics files are accepted\");\n\t\t}\n\t}", "public void updateConditions() {\n\n weatherTower = new WeatherTower();\n String newWeather = weatherTower.getWeather(coordinates); // this is the currentWeather algorythm\n\n switch (newWeather) {\n\n case WeatherType.SUN:\n coordinates.setLongitude(coordinates.getLongitude() + 2);\n coordinates.setHeight(coordinates.getHeight() + 4);\n message = \"Baloon# \" + this.getName() + \"(\" + this.getId() + \"): \" + \"It is so sunny and hot.\";\n System.out.println(\"message\");\n try(PrintWriter pw = new PrintWriter(new FileOutputStream(new File(\"outputFile.txt\"), true))){\n pw.println(message);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n break;\n\n case WeatherType.RAIN:\n coordinates.setLatitude(coordinates.getLatitude() - 5);\n message = \"Baloon#\" + this.getName() + \"(\" + this.getId() + \"): \" + \"Damn you rain! You messed up my baloon.\";\n System.out.println(\"message\");\n try(PrintWriter pw = new PrintWriter(new FileOutputStream(new File(\"outputFile.txt\"), true))){\n pw.println(message);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n break;\n\n case WeatherType.FOG:\n coordinates.setLatitude(coordinates.getLatitude() - 3);\n message = \"Baloon#\" + this.getName() + \"(\" + this.getId() + \"): \" + \"Even though it's fog, let's take some pics!\";\n System.out.println(\"message\");\n try(PrintWriter pw = new PrintWriter(new FileOutputStream(new File(\"outputFile.txt\"), true))){\n pw.println(message);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n break;\n\n case WeatherType.SNOW:\n coordinates.setHeight(coordinates.getHeight() - 15);\n message = \"Baloon#\" + this.getName() + \"(\" + this.getId() + \"): \" + \" It's snowing. We're gonna crash.\\n\";\n System.out.println(\"message\");\n try(PrintWriter pw = new PrintWriter(new FileOutputStream(new File(\"outputFile.txt\"), true))){\n pw.println(message);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n break;\n }\n }", "@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}", "public static void main( String[] args ) throws UnirestException, InterruptedException\n {\n AirControl Air = new AirControl();\n Air.SetAll(147,\"on\",\"22\",\"off\",\"fraco\");\n Air.GetParams(197);\n //number:3 -> auto\n //number:2 -> fraco\n //number:1 -> medio\n //number:0 -> forte\n }", "@Override\n public HashMap<String, Airport> findAll() {\n\n List<City> cities = cityDao.findAll(0);\n\n airportFile = new File(AirportDao.class.getClassLoader().getResource(\"airports.txt\").getPath());\n try {\n FlightFileReader.consumeNonEmptyLinesFromFile(airportFile, line -> {\n String[] params = line.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\", -1);\n\n String airportID = params[0].replace(\"\\\"\", \"\");\n String airportIATA = params[4].replace(\"\\\"\", \"\");\n String airportICAO = params[5].replace(\"\\\"\", \"\");\n String airportMapKey = (airportIATA.isEmpty() && airportICAO.isEmpty()) ? airportID : (airportIATA.equals(\"\\\\N\") ? airportICAO : airportIATA);\n try {\n if (isCityAvailable(cities, params[2].replace(\"\\\"\", \"\"))) {\n airportsMap.put(airportMapKey, Airport.builder()\n .airportId(Integer.parseInt(params[0]))\n .name(params[1].replace(\"\\\"\", \"\"))\n .city(params[2].replace(\"\\\"\", \"\"))\n .country(params[3].replace(\"\\\"\", \"\"))\n .iata(params[4].replace(\"\\\"\", \"\"))\n .icao(params[5].replace(\"\\\"\", \"\"))\n .latitude(Double.parseDouble(params[6]))\n .longitude(Double.parseDouble(params[7]))\n .altitude(Double.parseDouble(params[8]))\n .timezone(params[9])\n .dst(params[10].replace(\"\\\"\", \"\"))\n .tz(params[11].replace(\"\\\"\", \"\"))\n .type(params[12].replace(\"\\\"\", \"\"))\n .source(params[13].replace(\"\\\"\", \"\"))\n .build());\n }\n } catch (Exception ex) {\n lgr.log(Level.SEVERE, ex.getMessage(), ex);\n }\n });\n } catch (Exception ex) {\n lgr.log(Level.SEVERE, ex.getMessage(), ex);\n }\n return airportsMap;\n }", "protected void importAttributes(XmlPullParser xpp, Epml epml) {\n\t}", "void loadData() {\n\n // update if\n // station does not exist OR\n // the station exists and should be updated\n // don't update if the depth is rejected, regardless of the above 2\n\n String tmpStationId = \"\";\n if (dataType == CURRENTS) {\n tmpStationId = currents.getStationId(\"\");\n } else if (dataType == SEDIMENT) {\n tmpStationId = sedphy.getStationId(\"\");\n } else if ((dataType == WATER) || (dataType == WATERWOD)) {\n tmpStationId = watphy.getStationId(\"\");\n } // if (dataType == CURRENTS)\n if (dbg3) System.out.println(\"<br>loadData: tmpStationId = \" + tmpStationId);\n if (dbg3) System.out.println(\"<br>loadData: rejectDepth = \" + rejectDepth);\n if (dbg3) System.out.println(\"<br>loadData: stationExists = \" + stationExists);\n if (dbg3) System.out.println(\"<br>loadData: stationUpdated = \" + stationUpdated);\n if (dbg3) System.out.println(\"<br>loadData: dataExists = \" + dataExists);\n if (dbg3) System.out.println(\"<br>loadData: if = \" +\n (!\"\".equals(tmpStationId) && !rejectDepth &&\n (!stationExists || stationUpdated || !dataExists)));\n if (dbg3) System.out.println(\"<br>loadData: dataType = \" + dataType);\n\n//<br>loadData: tmpStationId = WOD007919212\n//<br>loadData: rejectDepth = false\n//<br>loadData: stationExists = true\n//<br>loadData: stationUpdated = false\n//<br>loadData: dataExists = true\n\n if (!\"\".equals(tmpStationId) && !rejectDepth &&\n (!stationExists || stationUpdated || !dataExists || (thisSubdesCount == 0))) {\n\n // was it a duplicate station with a different station-id?\n // as we can't update station-id's in oracle (used as FK elsewhere),\n // we have to update the watphy record's station id\n if (dbg4) System.out.println(\"<br>loadData: stationIDs = \" +\n station.getStationId(\"\") + \" \" + tmpStationId);\n //if (!station.getStationId(\"\").equals(watphy.getStationId(\"\"))) {\n if (!station.getStationId(\"\").equals(tmpStationId)) {\n if (dataType == CURRENTS) {\n currents.setStationId(station.getStationId(\"\"));\n } else if (dataType == SEDIMENT) {\n sedphy.setStationId(station.getStationId(\"\"));\n } else if ((dataType == WATER) || (dataType == WATERWOD)) {\n if (dbg4) System.out.println(\"<br>loadData: put watphy = \" + watphy);\n watphy.setStationId(station.getStationId(\"\"));\n if (dbg4) System.out.println(\"<br>loadData: put watphy = \" + watphy);\n } // if (dataType == CURRENTS)\n } // if (!station.getStationId(\"\").equals(tmpStationId))\n\n if (dataType == CURRENTS) {\n\n // insert the currents record\n if (dbg4) System.out.println(\"<br>loadData: put currents1 = \" +\n currents);\n try {\n currents.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put currents1 = \" + currents);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + currents.getInsStr());\n e.printStackTrace();\n } // try-catch\n\n //common2.DbAccessC.commit();\n if (dbg4) System.out.println(\"<br>loadData: put currents2 = \" +\n currents);\n //dataCodeEnd = currents.getCode();\n //if (dbg3) System.out.println(\"<br>loadData: put dataCodeEnd = \" + dataCodeEnd);\n currentsCount++;\n\n currents = new MrnCurrents();\n\n // set initial values for currents\n currents.setSpldattim(startDateTime);\n currents.setSubdes(subdes);\n\n } else if (dataType == SEDIMENT) {\n\n // set default values\n sedphy.setDeviceCode(1); // == unknown\n sedphy.setMethodCode(1); // == unknown\n sedphy.setStandardCode(1); // == unknown\n\n // insert the sedphy and child records\n if (dbg4) System.out.println(\"<br>loadData: put sedphy1 = \" + sedphy);\n try {\n sedphy.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put sedphy1 = \" + sedphy);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + sedphy.getInsStr());\n e.printStackTrace();\n } // try-catch\n\n //common2.DbAccessC.commit();\n if (dbg3) System.out.println(\"<br>loadData: put sedphy2 = \" + sedphy);\n dataCodeEnd = sedphy.getCode();\n if (dbg3) System.out.println(\"<br>loadData: put dataCodeEnd = \" + dataCodeEnd);\n\n //sedphyCount++;\n\n if (!sedchem1.isNullRecord()) {\n sedchem1.setSedphyCode(dataCodeEnd);\n try {\n sedchem1.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put sedchem1 = \" + sedchem1);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + sedchem1.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put sedchem1 = \" + sedchem1);\n sedchem1Count++;\n } // if (!sedchem1.isNullRecord()\n\n if (!sedchem2.isNullRecord()) {\n sedchem2.setSedphyCode(dataCodeEnd);\n try {\n sedchem2.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put sedchem2 = \" + sedchem2);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + sedchem2.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put sedchem2 = \" + sedchem2);\n sedchem2Count++;\n } // if (!sedchem2.isNullRecord()\n\n if (!sedpol1.isNullRecord()) {\n sedpol1.setSedphyCode(dataCodeEnd);\n try {\n sedpol1.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put sedpol1 = \" + sedpol1);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + sedpol1.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put sedpol1 = \" + sedpol1);\n sedpol1Count++;\n } // if (!sedpol1.isNullRecord()\n\n if (!sedpol2.isNullRecord()) {\n sedpol2.setSedphyCode(dataCodeEnd);\n try {\n sedpol2.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put sedpol2 = \" + sedpol2);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + sedpol2.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put sedpol2 = \" + sedpol2);\n sedpol2Count++;\n } // if (!sedpol2.isNullRecord()\n\n sedphy = new MrnSedphy();\n sedchem1 = new MrnSedchem1();\n sedchem2 = new MrnSedchem2();\n sedpol1 = new MrnSedpol1();\n sedpol2 = new MrnSedpol2();\n\n // set initial values for sedphy\n sedphy.setSpldattim(startDateTime);\n sedphy.setSubdes(subdes);\n\n } else if ((dataType == WATER) || (dataType == WATERWOD)) {\n\n // set default values\n watphy.setDeviceCode(1); // == unknown\n watphy.setMethodCode(1); // == unknown\n watphy.setStandardCode(1); // == unknown\n\n // insert the watphy and child records\n if (dbg4) System.out.println(\"<br>loadData: put watphy1 = \" + watphy);\n try {\n watphy.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put watphy1 = \" + watphy);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + watphy.getInsStr());\n e.printStackTrace();\n } // try-catch\n\n //common2.DbAccessC.commit();\n if (dbg3) System.out.println(\"<br>loadData: put watphy2 = \" + watphy);\n dataCodeEnd = watphy.getCode();\n if (dbg3) System.out.println(\"<br>loadData: put dataCodeEnd = \" + dataCodeEnd);\n\n watphyCount++;\n\n if (dbg4) System.out.println(\"<br>loadData: put watProfQC = \" + watProfQC);\n if (!watProfQC.isNullRecord()) {\n watProfQC.setStationId(station.getStationId(\"\"));\n watProfQC.setSubdes(watphy.getSubdes(\"\"));\n if (dbg4) System.out.println(\"<br>loadData: put watProfQC = \" + watProfQC);\n try {\n watProfQC.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put watProfQC1 = \" + watProfQC);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + watProfQC.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put watProfQC = \" + watProfQC);\n } // if (!watProfQC.isNullRecord()\n\n if (dbg4) System.out.println(\"<br>loadData: put watQC = \" + watQC);\n if (!watQC.isNullRecord()) {\n try {\n watQC.setWatphyCode(dataCodeEnd);\n watQC.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put watQC = \" + watQC);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + watQC.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put watQC = \" + watQC);\n } // if (!watQC.isNullRecord())\n\n if (!watchem1.isNullRecord()) {\n watchem1.setWatphyCode(dataCodeEnd);\n try {\n watchem1.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put watchem1 = \" + watchem1);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + watchem1.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put watchem1 = \" + watchem1);\n watchem1Count++;\n } // if (!watchem1.isNullRecord()\n\n if (!watchem2.isNullRecord()) {\n watchem2.setWatphyCode(dataCodeEnd);\n try {\n watchem2.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put watchem2 = \" + watchem2);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + watchem2.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put watchem2 = \" + watchem2);\n watchem2Count++;\n } // if (!watchem2.isNullRecord()\n\n if (!watchl.isNullRecord()) {\n watchl.setWatphyCode(dataCodeEnd);\n try {\n watchl.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put watchl = \" + watchl);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + watchl.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put watchl = \" + watchl);\n watchlCount++;\n } // if (!watchl.isNullRecord())\n\n if (!watnut.isNullRecord()) {\n watnut.setWatphyCode(dataCodeEnd);\n try {\n watnut.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put watnut = \" + watnut);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + watnut.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put watnut = \" + watnut);\n watnutCount++;\n } // if (!watnut.isNullRecord())\n\n if (!watpol1.isNullRecord()) {\n watpol1.setWatphyCode(dataCodeEnd);\n try {\n watpol1.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put watpol1 = \" + watpol1);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + watpol1.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put watpol1 = \" + watpol1);\n watpol1Count++;\n } // if (!watpol1.isNullRecord()\n\n if (!watpol2.isNullRecord()) {\n watpol2.setWatphyCode(dataCodeEnd);\n try {\n watpol2.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put watpol2 = \" + watpol2);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + watpol2.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put watpol2 = \" + watpol2);\n watpol2Count++;\n } // if (!watpol2.isNullRecord()\n\n watphy = new MrnWatphy();\n watchem1 = new MrnWatchem1();\n watchem2 = new MrnWatchem2();\n watchl = new MrnWatchl();\n watnut = new MrnWatnut();\n watpol1 = new MrnWatpol1();\n watpol2 = new MrnWatpol2();\n\n watProfQC = new MrnWatprofqc();\n watQC = new MrnWatqc();\n\n // set initial values for watphy\n watphy.setSpldattim(startDateTime);\n watphy.setSubdes(subdes);\n\n } // if (dataType == CURRENTS)\n\n } // if (!rejectDepth && (!stationExists || stationUpdated))\n }", "private void initOntology() {\n\n\tontology = ModelFactory.createDefaultModel();\n\t\t\t\n\ttry \n\t{\n\t\t//ontology.read(new FileInputStream(\"ontology.ttl\"),null,\"TTL\");\n\t\tontology.read(new FileInputStream(\"Aminer-data.ttl\"),null,\"TTL\");\n\t\t//ontology.read(new FileInputStream(\"SO data.ttl\"),null,\"TTL\");\n\t} \n\tcatch (FileNotFoundException e) \n\t{\n\t\tSystem.out.println(\"Error creating ontology model\" +e.getMessage());\n\t\te.printStackTrace();\n\t}\n\t\t\t\n\t\t\n\t}", "public void initAttendances() {\n\t\t\n\t\tFileReader attendancesReader = null;\n\t\ttry\t{\n\t\t\ttry {\n\t\t\t\tattendancesReader = new FileReader(attendancesFile);\n\t\t\t\tScanner attendancesScanner = new Scanner(attendancesReader);\n\n\t\t\t\twhile (attendancesScanner.hasNextLine() ) {\n\t\t\t\t\tString attendancesLine = attendancesScanner.nextLine();\n\t\t\t\t\tString [] attendanceTokens = attendancesLine.split(\"\\\\s+\");\n\t\t\t\t\tString currentClassID = attendanceTokens[0];\n\n\t\t\t\t\tfc = fitnessProg.getFitnessClassWithID(currentClassID);\n\t\t\t\t\tint attendance1 = Integer.parseInt(attendanceTokens[1]);\n\t\t\t\t\tint attendance2 = Integer.parseInt(attendanceTokens[2]);\n\t\t\t\t\tint attendance3 = Integer.parseInt(attendanceTokens[3]);\n\t\t\t\t\tint attendance4 = Integer.parseInt(attendanceTokens[4]);\n\t\t\t\t\tint attendance5 = Integer.parseInt(attendanceTokens[5]);\n\t\t\t\t\tint [] passAttendances = {attendance1, attendance2, attendance3, attendance4, attendance5};\n\t\t\t\t\tfc.setAttendanceRecords(passAttendances);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tfinally {\n\n\t\t\t\tif (attendancesReader != null) {\n\t\t\t\t\tattendancesReader.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\tcatch (IOException ioe) {\n\t\t\tJOptionPane.showMessageDialog(null, \"File not found\",\n\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE);\n\n\t\t}\n\t\tcatch (InputMismatchException e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Invalid file content\",\n\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t}\t\n\t}", "private void loadOrder(LocalDate date) throws PersistenceException{\n orders.clear();\n ORDER_FILE = \"Order_\"+ date+\".txt\";\n Scanner scanner;\n File file = new File(ORDER_FILE);\n if(file.exists()){\n \n \n try {\n scanner = new Scanner(\n new BufferedReader(\n new FileReader(ORDER_FILE)));\n } catch (FileNotFoundException e) {\n throw new PersistenceException(\n \"-_- Could not load data into memory.\",e);\n } \n scanner.nextLine();\n String currentLine;\n String[] currentTokens = new String[13]; \n while (scanner.hasNextLine()) {\n currentLine = scanner.nextLine();\n currentTokens = currentLine.split(DELIMITER);\n \n\n Order currentOrder = new Order(Integer.parseInt((currentTokens[0])));\n \n currentOrder.setOrderDate(LocalDate.parse(currentTokens[1]));\n currentOrder.setClientName(currentTokens[2]);\n currentOrder.setState(currentTokens[3]);\n currentOrder.setStateTax(new BigDecimal(currentTokens[4]));\n currentOrder.setProduct(currentTokens[5]);\n currentOrder.setArea(new BigDecimal(currentTokens[6]));\n currentOrder.setMaterialCost(new BigDecimal(currentTokens[7]));\n currentOrder.setLaborCost(new BigDecimal(currentTokens[8]));\n currentOrder.setTotalMaterialCost(new BigDecimal(currentTokens[9]));\n currentOrder.setTotalLaborCost(new BigDecimal(currentTokens[10]));\n currentOrder.setTotalTax(new BigDecimal(currentTokens[11]));\n currentOrder.setTotalCost(new BigDecimal(currentTokens[12]));\n \n orders.put(currentOrder.getOrderNumber(), currentOrder);\n }\n scanner.close();\n } else{\n try{\n file.createNewFile();\n } catch (IOException ex){\n throw new PersistenceException(\"Error! No orders from that date.\", ex);\n }\n }\n }", "@Test\n public void readAndApply() {\n StorageDelegator delegator = App.getDelegator();\n Way w = (Way) delegator.getOsmElement(Way.NAME, 210558045L);\n Node n = (Node) delegator.getOsmElement(Node.NAME, 416426220L);\n Relation r = (Relation) delegator.getOsmElement(Relation.NAME, 1638705L);\n\n checkInitialState(delegator);\n\n // apply OSC file\n TestUtils.clickMenuButton(device, \"Transfer\", false, false);\n TestUtils.clickText(device, false, \"File\", false, false);\n TestUtils.clickText(device, false, \"Apply changes from OSC file\", false, false);\n //\n TestUtils.selectFile(device, main, null, OSC_FILE, false);\n\n TestUtils.findText(device, false, \"Loading\", 2000); // spinner appears\n TestUtils.textGone(device, \"Loading\", 10000);// spinner goes away\n\n // check new data state\n Assert.assertNotNull(delegator.getApiStorage().getOsmElement(Way.NAME, 210558043L));\n Assert.assertEquals(OsmElement.STATE_DELETED, delegator.getApiStorage().getOsmElement(Way.NAME, 210558043L).getState());\n Assert.assertNotNull(delegator.getApiStorage().getOsmElement(Node.NAME, 2206392996L));\n Assert.assertEquals(OsmElement.STATE_DELETED, delegator.getApiStorage().getOsmElement(Node.NAME, 2206392996L).getState());\n Assert.assertNotNull(delegator.getApiStorage().getOsmElement(Node.NAME, 2206392994L));\n Assert.assertEquals(OsmElement.STATE_DELETED, delegator.getApiStorage().getOsmElement(Node.NAME, 2206392994L).getState());\n Assert.assertNotNull(delegator.getApiStorage().getOsmElement(Node.NAME, 2206392992L));\n Assert.assertEquals(OsmElement.STATE_DELETED, delegator.getApiStorage().getOsmElement(Node.NAME, 2206392992L).getState());\n Assert.assertNotNull(delegator.getApiStorage().getOsmElement(Node.NAME, 2206392993L));\n Assert.assertEquals(OsmElement.STATE_DELETED, delegator.getApiStorage().getOsmElement(Node.NAME, 2206392993L).getState());\n Assert.assertNotNull(delegator.getApiStorage().getOsmElement(Node.NAME, 2206392996L));\n Assert.assertEquals(OsmElement.STATE_DELETED, delegator.getApiStorage().getOsmElement(Node.NAME, 2206392996L).getState());\n\n // placeholder ids are renumbered on input so we need to find the Way some other way\n List<Way> ways = delegator.getCurrentStorage().getWays(new BoundingBox(8.3891745, 47.3899902, 8.3894486, 47.3901275));\n for (Way way : ways) {\n if (way.getOsmId() < 0) {\n w = way;\n }\n }\n Assert.assertNotNull(w);\n Assert.assertNotNull(delegator.getApiStorage().getOsmElement(Way.NAME, w.getOsmId()));\n Assert.assertEquals(OsmElement.STATE_CREATED, w.getState());\n Assert.assertEquals(4, w.getNodes().size());\n Assert.assertTrue(w.isClosed());\n Assert.assertTrue(w.hasTag(\"name\", \"new\"));\n\n w = (Way) delegator.getApiStorage().getOsmElement(Way.NAME, 210558045L);\n Assert.assertNotNull(w);\n Assert.assertEquals(OsmElement.STATE_MODIFIED, w.getState());\n Assert.assertTrue(w.hasTag(\"addr:housenumber\", \"444\"));\n\n n = (Node) delegator.getApiStorage().getOsmElement(Node.NAME, 416426220L);\n Assert.assertNotNull(n);\n Assert.assertEquals(OsmElement.STATE_MODIFIED, n.getState());\n Assert.assertEquals(47.3898126D, n.getLat() / 1E7D, 0.00000001);\n Assert.assertEquals(8.3894851D, n.getLon() / 1E7D, 0.00000001);\n\n r = (Relation) delegator.getOsmElement(Relation.NAME, 1638705L);\n Assert.assertEquals(OsmElement.STATE_MODIFIED, r.getState());\n Assert.assertNull(r.getMember(Way.NAME, 119104094L));\n\n TestUtils.unlock(device);\n Assert.assertTrue(TestUtils.clickMenuButton(device, context.getString(R.string.undo), false, false));\n TestUtils.clickText(device, false, \"OK\", true, false);\n try {\n Thread.sleep(5000); // NOSONAR\n } catch (InterruptedException e) {\n }\n checkInitialState(delegator);\n }", "public Aircraft() {\n id = ++nextId;\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}", "public void testImportXMLFailure() throws ParserConfigurationException, IOException {\n testInvalidXML(INVALID_XML_TEST_GPX);\n }", "public getForecast() {\n\t\t\n\t\t\n\t\tString finalePrevisioni; //stringa dove metteremo le previsioni\n\t\t\n\t\tFileReader f= null;\n try {\n f =new FileReader(\"Previsioni.txt\");\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n /*\n * quello che facciamo è vedere se la data nel nostro file cosrripsonde alla data di oggi\n */\n \n\n BufferedReader b;\n b=new BufferedReader(f);\n \n String MeteoCorrente = \"\";\n String line = \"\";\n \n try {\n while((line = b.readLine())!=null) {\n MeteoCorrente += line;\n if (MeteoCorrente.length()==19) break;\n // ci basta leggere questi caratteri per scoprire la data\n }\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n \n \n try {\n\t\t\tb.close();\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n \n\t\t\n\t\t\n\t\tString dataFile = MeteoCorrente.substring(9,19);\n\t\t\n\t\t//data di oggi\n \n\t\tDateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"yyyy-MM-dd\"); \n\t\tLocalDateTime now = LocalDateTime.now(); \n\t\t\n\t\tString dataOggi = (String) dtf.format(now);\n\t\t\n\t\t//se le date sono diverse\n\t\t\n\t\tif (!(dataFile.equals(dataOggi))) {\n\t\t\n\t\t//si aggiorna il file di appoggio così da avere i dati sul meteo aggiornati\t\n\t\t// essendo nello stesso package posso invocare il metodo senza dover importare la classe visto che sia\n\t\t//la classe che il metodo sono public\n\t updateWeeklyForecast.update();\n\t\t\t\n\t\tString parte1 = MeteoCorrente.substring(0,9);\n\t\t//si aggiorna la data\n\t\tString parte2 = dataOggi;\n\t\t//le nuove previsoni vengono aggiunte per prime così che ci aiuti nel prelevare i dati più aggiornati\n\t\t//nei metodi successivi\n\t\tString parte3 = MeteoCorrente.substring(19,35);\n\t\t\t\n \n \n\t\tString meteo2 = MeteoCorrente.substring(35);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tFileReader fi= null;\n try {\n fi =new FileReader(\"appoggio.txt\");\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n //appoggio\n\n BufferedReader a;\n a=new BufferedReader(fi);\n \n String meteo = \"\";\n String lin = \"\";\n \n try {\n while((lin = a.readLine())!=null) {\n meteo += lin;\n }\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n \n \n //essendo sotto forma di array rimuoviamo le parentesi quadre\n \n String meteo3 = meteo.substring(1, meteo.length()-1);\n \n File file = new File(\"Previsioni.txt\");\n\t\t\n\t\t FileWriter fileWriter = null;\n\t\t try {\n\t\t fileWriter = new FileWriter(file);\n\t\t } catch (IOException e) {\n\t\t \n\t\t e.printStackTrace();\n\t\t }\n\t\t \n\t\t BufferedWriter bufferedWriter = null;\n\t\t bufferedWriter=new BufferedWriter(fileWriter);\n\t\t \n\t\t //uniamo le varie stringhe così da formare un JSONObject\n\t\t //(a virgola ha questo scopo, infatti noi abbiamo già aggiunto i dati e questo ci aiuta)\n\t\t //(se invece il file fosse vuoto la virgola ci avrebbe creato dei problemi nelle varie codifiche)\n\t\t \n\t\t finalePrevisioni = parte1 + parte2 + parte3 + meteo3 + \", \" + meteo2;\n\t\t \n\t\t \n\t\t try {\n\t\t \tbufferedWriter.write(finalePrevisioni);\n\t\t \t\n\t\t } catch (IOException e) {\n\t\t // TODO Auto-generated catch block\n\t\t e.printStackTrace();\n\t\t }\n\t\t try\n\t\t {\n\t\t if ( bufferedWriter != null)\n\t\t bufferedWriter.close( );\n\t\t }\n\t\t catch ( IOException e) {e.printStackTrace();}\n\t\ttry {\n\t\t\tfileWriter.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\t\n \n\t\n\t\t}\n\t\telse{ // caso in cui il file è già agiornato\n\t\t\t\n\t\t\t\n\t try {\n\t f =new FileReader(\"Previsioni.txt\");\n\t } catch (FileNotFoundException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t }\n\n\t \n\n\n\t BufferedReader c;\n\t c=new BufferedReader(f);\n\t \n\t MeteoCorrente = \"\";\n\t line = \"\";\n\t \n\t \n\t try {\n\t while((line = c.readLine())!=null) {\n\t MeteoCorrente += line;\n\t \n\t }\n\t } catch (IOException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t }\n\t finalePrevisioni = MeteoCorrente;\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//prendiamo ora il JSONObject di Previsioni e preleviamo il JSONArry con le previsioni\n\t\t\n\t\tJSONParser parser = new JSONParser();\n\t\tObject obj = null;\n\t\ttry {\n\t\t\tobj = parser.parse(finalePrevisioni);\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tJSONObject jsonObject = (JSONObject) obj;\n\t\t\n\t\tthis.previsioni =(JSONArray) jsonObject.get(\"previsioni\");\n\t\t\n\n\t}", "public abstract void importState(ConnectionsController.QueueOfLines lines);" ]
[ "0.61119103", "0.54574174", "0.51795894", "0.512282", "0.51218414", "0.5093368", "0.5083196", "0.50820154", "0.50742745", "0.5058799", "0.50409293", "0.50398636", "0.50210077", "0.4997167", "0.49877638", "0.4978585", "0.49766535", "0.49640948", "0.49344966", "0.49194124", "0.4886504", "0.4869104", "0.48688832", "0.4840789", "0.48253134", "0.48248592", "0.48183337", "0.48142135", "0.48110327", "0.48108867", "0.48043078", "0.47831187", "0.4767464", "0.47485015", "0.47457147", "0.47431153", "0.47402957", "0.47073814", "0.47072533", "0.47018537", "0.46972355", "0.4694603", "0.4692559", "0.469113", "0.46738112", "0.46692118", "0.46541798", "0.46454364", "0.4616615", "0.46141806", "0.4606972", "0.46027845", "0.45863566", "0.45745766", "0.45739982", "0.45704174", "0.45686018", "0.4566857", "0.45616615", "0.45549336", "0.45503238", "0.45448214", "0.45319027", "0.4526466", "0.45165426", "0.45112187", "0.45108467", "0.44935587", "0.44807762", "0.4475453", "0.44727004", "0.44673994", "0.44560704", "0.4453736", "0.44270146", "0.44233835", "0.44094655", "0.4406751", "0.44041118", "0.44040033", "0.44033232", "0.43973497", "0.4396904", "0.4391485", "0.43913105", "0.438986", "0.43897235", "0.43883774", "0.43865305", "0.43814436", "0.43795404", "0.43710902", "0.4371003", "0.43701258", "0.4369459", "0.43648157", "0.4362647", "0.43595263", "0.43558824", "0.43512788" ]
0.75005233
0
Get the titles of the charts, with an optional header at the start.
public static String[] getChartTitles(List<PopChart> chartData, boolean addHeader) { String[] list = new String[!addHeader ? chartData.size() : (1 + chartData.size())]; int index = 0; if (addHeader) { list[index++] = "Select a chart"; } for (PopChart chart : chartData) { list[index++] = chart.getTitle(); } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] getTitles() {\n\t\tif (results == null)\n\t\t\treturn null;\n\t\tWebSearchResult[] resultsArray = results.listResults();\n\t\tString[] titles = new String[resultsArray.length];\n\t\tfor (int i = 0; i < titles.length; i++) {\n\t\t\ttitles[i] = resultsArray[i].getTitle();\n\t\t}\n\t\treturn titles;\n\t}", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "String getAllTitlesDataQuery(String graph);", "public String[] getTitle() {\r\n return title;\r\n }", "public java.lang.String getTitle();", "public static void readTitles() {\n System.out.println(\"Reading titles...\");\n ConfigurationSection config = plugin.getConfig().getConfigurationSection(\"titles\");\n System.out.println(\"Acquired configuration section \" + (config == null));\n Set<String> keys = config.getKeys(false);\n\n System.out.println(keys.size());\n\n for(String titleName : keys) {\n // System.out.println(titleName);\n String title = config.getString(titleName + \".Title\");\n char icon = ' ';\n int length = config.getInt(titleName + \".Characters\");\n int customModelData = config.getInt(titleName + \".CustomModelData\");\n\n Title t = new Title(titleName, title, icon, length, customModelData);\n\n titles.put(titleName, t);\n\n System.out.println(titles.get(titleName).toString());\n }\n }", "public String getXAxisTitle() {\n return xAxisTitle;\n }", "@Override\n\tprotected String[] getExportTitles() {\n\t\treturn null;\n\t}", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getChartTitle() {\r\n if (chartTitle != null) {\r\n return chartTitle;\r\n }\r\n ValueBinding vb = getValueBinding(\"chartTitle\");\r\n return vb != null ? (String) vb.getValue(getFacesContext()) :\r\n DEFAULT_CHART_TITLE;\r\n }", "@JSProperty(\"title\")\n @Nullable\n ZAxisTitleOptions getTitle();", "public String[] getTitlesArray() {\n return mTitlesArray;\n }", "public static String[] getDicomExportAETitles() {\n\t\tif (xml == null) return new String[0];\n\t\treturn dicomExportAETitles;\n\t}", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "@Override\n protected String[] getExportTitles() {\n return null;\n }", "@Override\n protected String[] getExportTitles() {\n return null;\n }", "@Override\n protected String[] getExportTitles() {\n return null;\n }", "public List<String> getTitles() {\n List<String> list = new ArrayList<>(((List<Entry>) Router.callRouter(this.entries, Entries.class, \"getEntry\", null, null)).size());\n for (Entry entry : this.entries.getEntry()) {\n list.add(entry.getTitle());\n }\n return list;\n }", "public String getTitle( ) {\n return null;\r\n }", "@GET(\"w/api.php?action=query\" +\n // Retrieve title links\n \"&prop=links\" +\n // Retrieve links in the main page\n \"&titles=メインページ\" +\n // Only return articles (Not users or meta pages)\n \"&plnamespace=0\" +\n // Return a limit number defined in companion object\n \"&pllimit=\" + titleLimits +\n // Return in json format\n \"&format=json\" +\n // Return new json format\n \"&formatversion=2\")\n Call<WikiTitlesJSONResponse> requestDailyTitles();", "public ExcelSimpleWriter<?> header(List<String> titles) {\n this.titles = titles;\n return this;\n }", "public List<Div> getHeaders()\n {\n if (headers == null)\n {\n headers = new ArrayList<>();\n }\n return headers;\n }", "public XSSFRichTextString getTitleText() {\n\t\tif(! chart.isSetTitle()) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// TODO Do properly\n\t\tCTTitle title = chart.getTitle();\n\n\t\tStringBuffer text = new StringBuffer();\n\t\tXmlObject[] t = title\n\t\t\t.selectPath(\"declare namespace a='\"+XSSFDrawing.NAMESPACE_A+\"' .//a:t\");\n\t\tfor (int m = 0; m < t.length; m++) {\n\t\t\tNodeList kids = t[m].getDomNode().getChildNodes();\n\t\t\tfinal int count = kids.getLength();\n\t\t\tfor (int n = 0; n < count; n++) {\n\t\t\t\tNode kid = kids.item(n);\n\t\t\t\tif (kid instanceof Text) {\n\t\t\t\t\ttext.append(kid.getNodeValue());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn new XSSFRichTextString(text.toString());\n\t}", "public String getTitle()\n {\n return \"Test XY Data\";\n }", "public String getTitle(){\n return titlesText;\n }", "public String[] getTitleOptions() {\n\t\treturn titleOptions;\n\t}", "public ListOfOnixDataComposite<TitleElement, JonixTitleElement> titleElements() {\n _initialize();\n return titleElements;\n }", "public void listTitles() {\n for (int i = 0; i < books.length; i++) {\n System.out.println(\"The title of book\" + (i + 1) + \": \" + books[i].getTitle());\n }\n }", "@NotNull\n String getTitle();", "@Override\r\n\t\tpublic String getTitle()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "@GetMapping(value = \"/getReportTitles\", produces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic @ResponseBody JsonObject getAllReportTitles(@RequestParam String source, @RequestParam String userName)\n\t\t\tthrows InsightsCustomException {\n\t\ttry {\n\t\t\tJsonArray titleList = emailConfiguartionService.getAllReportTitles(source, userName);\n\t\t\treturn PlatformServiceUtil.buildSuccessResponseWithData(titleList);\n\t\t} catch (InsightsCustomException e) {\n\t\t\tlog.error(e);\n\t\t\treturn PlatformServiceUtil.buildFailureResponse(\"Unable to retrieve report details.\");\n\t\t}\n\n\t}", "@Override\n public CharSequence getPageTitle(int position) {\n return titles[position];\n }", "com.google.analytics.data.v1alpha.PivotDimensionHeader getPivotDimensionHeaders(int index);", "@Override\n\tpublic String getTitle() {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}", "@Override\r\n\tpublic String getTitle() {\n\t\treturn null;\r\n\t}", "@Override\n public CharSequence getPageTitle(int position) {\n return titles[position];\n }", "@Override\n public CharSequence getPageTitle(int position) {\n return titles[position];\n }", "@Override\n\tpublic String getTitle() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getTitle() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getTitle() {\n\t\treturn null;\n\t}", "public String getTitle() {\n addParameter(\"title.number\" , iBundle.getString(\"reminderreport.title.date\") );\n\n return iBundle.getString(\"reminderreport.title\");\n }", "Collection<MoviesTitles> getMoviesTitles();", "public String getTitle() {\n return null;\n }", "@NonNull\n String getTitle() throws Exception;", "@Override\n\tpublic java.lang.String getTitle() {\n\t\treturn _dictData.getTitle();\n\t}", "public synchronized String[] getSectionTitles() {\n if (props == null) {\n try {\n reload();\n } catch (Fault f) {\n // should this maybe be a JavaTestError?\n return null;\n }\n }\n\n // look for what we need from easiest to hardest source\n String names = PropertyArray.get(props, SECTIONS);\n\n if (names != null) {\n // it is cached\n return StringArray.split(names);\n } else if (sections != null) {\n // TR is not immutable yet, probably\n int numSections = getSectionCount();\n String[] data = new String[numSections];\n\n for (int i = 0; i < numSections; i++) {\n data[i] = sections[i].getTitle();\n }\n\n return data;\n } else {\n // hum, bad. No sections exist and this data isn't cached\n // the test probably has not run\n return null;\n }\n }", "IDisplayString getTitle();", "public String getTitle()\r\n\t{\r\n\t\treturn TITLE;\r\n\t}", "@Override\r\n\tpublic String getTitle() {\n\t\treturn title;\r\n\t}", "public String getTitle() {\n\t\t\n\treturn driver.getTitle();\n\t\n\t}", "@Override\n\tpublic String getTitle(Locale locale) {\n\t\treturn _dataset.getTitle();\n\t}", "public String getXaxisTitle() {\r\n if (xaxisTitle != null) {\r\n return xaxisTitle;\r\n }\r\n ValueBinding vb = getValueBinding(\"xaxisTitle\");\r\n return vb != null ? (String) vb.getValue(getFacesContext()) :\r\n DEFAULT_XAXIS_TITLE;\r\n }", "@Override\n\tpublic int getTitle() {\n\t\treturn 0;\n\t}", "public String getTitle() {\n return \"\";\n }", "public String getTitle() {\n \t\treturn getWebDriver().getTitle();\n \t}", "@Override\n\tprotected String getHeaderTitle() {\n\t\treturn \"\";\n\t}", "public String getTitle() {\n return titleName;\n }", "private RGridBagLayoutPane getTitlePane() {\n if (titlePane == null) {\n titlePane = new RGridBagLayoutPane();\n titlePane.setName(\"titlePane\");\n titlePane.setStyleProperties(\"{/fill \\\"HORIZONTAL\\\"/weightY \\\"0\\\"}\");\n titlePane.add(getHeaderPane(), new com.ulcjava.base.application.GridBagConstraints(0, 0, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n }\n return titlePane;\n }", "public String getTitle() {\n \t\treturn title;\n \t}", "@Value.Default\n public Dict getTitle() {\n\treturn Dict.of();\n }", "@Override\r\n public String getTitle()\r\n {\n return null;\r\n }", "@Override\n\tpublic WebElement[] getGroupStoryTitle() {\n\t\treturn null;\n\t}", "public String getTitle() {\n return bufTitle;\n }", "public String getTitleFormula() {\n\t if(! chart.isSetTitle()) {\n\t return null;\n\t }\n\n\t CTTitle title = chart.getTitle();\n\t \n\t if (! title.isSetTx()) {\n\t return null;\n\t }\n\t \n\t CTTx tx = title.getTx();\n\t \n\t if (! tx.isSetStrRef()) {\n\t return null;\n\t }\n\t \n\t return tx.getStrRef().getF();\n\t}", "@AutoEscape\n\tpublic String getTitle();" ]
[ "0.61426544", "0.59701896", "0.59701896", "0.59701896", "0.59701896", "0.59701896", "0.59357095", "0.5932342", "0.5912649", "0.58865494", "0.5829553", "0.5821503", "0.5811877", "0.5811877", "0.5811877", "0.5811877", "0.5811877", "0.5811877", "0.5811877", "0.5811877", "0.5811877", "0.5811877", "0.5811877", "0.5811877", "0.5811877", "0.5811877", "0.5811877", "0.5811877", "0.5811877", "0.5811877", "0.5805794", "0.5800051", "0.5780435", "0.5778685", "0.577528", "0.577528", "0.577528", "0.577528", "0.577528", "0.577528", "0.577528", "0.577528", "0.577528", "0.577528", "0.577528", "0.577528", "0.577528", "0.577528", "0.577528", "0.57425094", "0.57425094", "0.57425094", "0.5728042", "0.57054716", "0.5697861", "0.56965727", "0.5672683", "0.5671636", "0.5625349", "0.5592117", "0.5564141", "0.5560088", "0.5559257", "0.55539995", "0.55446655", "0.55339915", "0.5511145", "0.55082816", "0.5502582", "0.5493823", "0.5455672", "0.5455672", "0.5455616", "0.5455616", "0.5455616", "0.5443664", "0.5443038", "0.5431912", "0.54264504", "0.5410939", "0.5392853", "0.53924024", "0.538049", "0.5371275", "0.53688955", "0.534681", "0.5345687", "0.53414106", "0.53386337", "0.5333136", "0.5318261", "0.5318043", "0.53177285", "0.5316536", "0.5312797", "0.5312071", "0.53004307", "0.5298545", "0.5296951", "0.5295482" ]
0.76513696
0
Nothing to do here, but declare it for subclasses that load data on demand
protected void loadData() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void loadData();", "public abstract void loadData();", "public abstract void loadData();", "@Override\r\n\tprotected void load() {\n\t\t\r\n\t}", "abstract void initializeNeededData();", "@Override\n public void load() {\n }", "protected @Override\r\n abstract void initData();", "@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\tprotected void load() {\n\n\t}", "@Override\n\tprotected void load() {\n\n\t}", "private void initDataLoader() {\n\t}", "private void loadData() {\n\t\tOptional<ServerData> loaded_data = dataSaver.load();\n\t\tif (loaded_data.isPresent()) {\n\t\t\tdata = loaded_data.get();\n\t\t} else {\n\t\t\tdata = new ServerData();\n\t\t}\n\t}", "@Override\n\t\tvoid loadData() throws IOException {\n\t\t\tsuper.loadData();\n\t\t}", "@Override\n public void load() {\n }", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "@Override\n protected void initData() {\n }", "@Override\n protected void initData() {\n }", "@Override\r\n\tpublic void load() {\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t}", "public void loadData ( ) {\n\t\tinvokeSafe ( \"loadData\" );\n\t}", "public abstract void load();", "@Override\n\tprotected void initData(){\n\t\tsuper.initData();\n\t}", "@Override\r\n\tprotected void initLoad() {\n\r\n\t}", "@Override\r\n\tpublic void load() {\n\r\n\t}", "@Override\n void load(String data) {\n }", "protected abstract void retrievedata();", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "public abstract void loaded();", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\r\n\tpublic void initData() {\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "private void InitData() {\n\t}", "private void initData() {\n\t}", "void loadData();", "void loadData();", "public void load() {\n\t}", "private void initData() {\n }", "@Override\n\t\t\t\t\tpublic void beginLoad(int type) {\n\n\t\t\t\t\t}", "@Override\r\n\tpublic void load() {\n\t\ts.load();\r\n\r\n\t}", "@Override\n\tpublic void initData() {\n\n\n\n\t}", "private void initData() {\n\n }", "private static void load(){\n }", "@Override\n\tpublic void initData() {\n\t\t\n\t}", "public void load() {\n }", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tpublic void initData() {\n\n\t}", "public abstract void loadFromDatabase();", "public void loadAllUserData(){\n\n }", "protected abstract void loadItemsInternal();", "public void initData() {\n }", "public void initData() {\n }", "@Override\n\tpublic void loadData(Bundle bundle) {\n\t}", "public void load() ;", "public static void populateData() {\n\n }", "public static void load() {\n }", "private void initData(){\n\n }", "@Override\n\t\t\tprotected PaginationResponseData load() {\n\t\t\t\treturn null;\n\n\t\t\t}", "private ProcessedDynamicData( ) {\r\n super();\r\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "public void InitData() {\n }", "void loadData() throws SerializerException;", "@Override\n public void load() throws IOException, ClassNotFoundException {\n \n }", "public void load() {\n handleLoad(false, false);\n }", "public abstract ResourceDataSet loadResources() ;", "private void loadUserData() {\n\t\tuserData = new UserData();\n }", "public void initData(){\r\n \r\n }", "public abstract Object getCustomData();", "private void loadData() {\n //load general data\n Settings.loadSettings();\n\n this.spCrawlTimeout.setValue(Settings.CRAWL_TIMEOUT / 1000);\n this.spRetryPolicy.setValue(Settings.RETRY_POLICY);\n this.spRecrawlInterval.setValue(Settings.RECRAWL_TIME / 3600000);\n this.spRecrawlCheckTime.setValue(Settings.RECRAWL_CHECK_TIME / 60000);\n }", "private void initData() {\n\t\tnamesInfo = new NameSurferDataBase(fileName);\n\n\t}", "public void loadData() {\n\t\tbookingRequestList = bookingRequestDAO.getAllBookingRequests();\n\t\tcabDetailList = cabDAO.getAllCabs();\n\t}", "void massiveModeLoading( File dataPath );", "private void initData() {\n requestServerToGetInformation();\n }", "private TigerData() {\n initFields();\n }", "@Override\r\n\tpublic void initialLoad() throws IOException {\n\t\t\r\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 }", "public void loadFirstData() throws Exception {\n\t}", "public abstract void load() throws IOException;", "@Override\n\tpublic D loadInBackground() {\n\t\tmData = createData();\n\t\treturn mData;\n\t}", "public abstract Object getData();", "private RowData() {\n initFields();\n }", "@Override\r\n protected void fetchData() {\n\r\n }", "@Override\n\t\t\t\t\t\t\t\t\tpublic void downLoadBegin() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}", "public static void SelfCallForLoading() {\n\t}", "void populateData();", "public void load();", "public void load();" ]
[ "0.81656873", "0.7965385", "0.7965385", "0.7273338", "0.72556996", "0.7157632", "0.7128649", "0.7119317", "0.7119317", "0.7119317", "0.70896596", "0.70896596", "0.7086318", "0.70655906", "0.7057073", "0.7032239", "0.70210534", "0.6989957", "0.6989957", "0.6985586", "0.6976337", "0.6976337", "0.6976337", "0.6976337", "0.6976337", "0.6976337", "0.69493055", "0.69487303", "0.6945236", "0.69403005", "0.6915449", "0.68721974", "0.68443274", "0.6831002", "0.6820862", "0.6817571", "0.6782879", "0.67740995", "0.67740995", "0.67160004", "0.67148215", "0.66990584", "0.6694732", "0.6694732", "0.66631395", "0.6658895", "0.6631172", "0.6631172", "0.66226083", "0.6620963", "0.6608521", "0.66064435", "0.6602216", "0.65984315", "0.6591053", "0.65789425", "0.656919", "0.6566361", "0.6566361", "0.6566361", "0.6548901", "0.65373176", "0.65285003", "0.6490884", "0.6490884", "0.64878696", "0.6441124", "0.6433982", "0.6421916", "0.6414099", "0.64033866", "0.6382383", "0.6374321", "0.63705057", "0.6366252", "0.63526237", "0.631978", "0.6269098", "0.62586045", "0.6235347", "0.62265706", "0.62252563", "0.6195851", "0.61729753", "0.61607254", "0.6154121", "0.61519843", "0.6135018", "0.6118978", "0.6113124", "0.61083823", "0.609395", "0.60912275", "0.60853606", "0.6064215", "0.6060961", "0.6058451", "0.6050328", "0.6049714", "0.6049714" ]
0.8036351
1
Load the data, if necessary
private JFreeChart getBarChart() { loadData(); // Create the vertical bar chart final JFreeChart chart = ChartFactory.createBarChart(getTitle(), "", "", getCategoryDataset(), PlotOrientation.HORIZONTAL, false, true, false); final CategoryPlot categoryplot = (CategoryPlot) chart.getPlot(); categoryplot.setRangeAxisLocation(AxisLocation.BOTTOM_OR_LEFT); categoryplot.setRangePannable(true); categoryplot.setNoDataMessage("No data available"); final BarRenderer barrenderer = (BarRenderer) categoryplot.getRenderer(); barrenderer.setItemLabelAnchorOffset(9D); barrenderer.setBaseItemLabelsVisible(true); barrenderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator()); // barrenderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator("{1} = {2}", new DecimalFormat("0"))); final CategoryAxis categoryaxis = categoryplot.getDomainAxis(); categoryaxis.setCategoryMargin(0.25D); categoryaxis.setUpperMargin(0.02D); categoryaxis.setLowerMargin(0.02D); final NumberAxis numberaxis = (NumberAxis) categoryplot.getRangeAxis(); numberaxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); numberaxis.setUpperMargin(0.10000000000000001D); ChartUtilities.applyCurrentTheme(chart); // if (useLegend()) // { // // pieplot.setLegendLabelGenerator(new StandardPieSectionLabelGenerator("{0} ({1})")); // chart.getLegend().setPosition(RectangleEdge.RIGHT); // // pieplot.setLegendLabelToolTipGenerator(new StandardPieSectionLabelGenerator("{0}: {2}%")); // } return chart; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void loadData()\n {\n }", "private void loadData() {\n\t\tOptional<ServerData> loaded_data = dataSaver.load();\n\t\tif (loaded_data.isPresent()) {\n\t\t\tdata = loaded_data.get();\n\t\t} else {\n\t\t\tdata = new ServerData();\n\t\t}\n\t}", "protected abstract void loadData();", "void loadData();", "void loadData();", "public void loadData ( ) {\n\t\tinvokeSafe ( \"loadData\" );\n\t}", "public abstract void loadData();", "public abstract void loadData();", "private void initDataLoader() {\n\t}", "public void loadData() {\n\t\tbookingRequestList = bookingRequestDAO.getAllBookingRequests();\n\t\tcabDetailList = cabDAO.getAllCabs();\n\t}", "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 //load general data\n Settings.loadSettings();\n\n this.spCrawlTimeout.setValue(Settings.CRAWL_TIMEOUT / 1000);\n this.spRetryPolicy.setValue(Settings.RETRY_POLICY);\n this.spRecrawlInterval.setValue(Settings.RECRAWL_TIME / 3600000);\n this.spRecrawlCheckTime.setValue(Settings.RECRAWL_CHECK_TIME / 60000);\n }", "public void load() {\n handleLoad(false, false);\n }", "@Override\n\t\tvoid loadData() throws IOException {\n\t\t\tsuper.loadData();\n\t\t}", "public void load() {\n\t}", "public void load()\n\t{\n\t\tfor(String s : playerData.getConfig().getKeys(false))\n\t\t{\n\t\t\tPlayerData pd = new PlayerData(playerData, s);\n\t\t\tpd.load();\n\t\t\tdataMap.put(s, pd);\n\t\t}\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 loadData() {\n\t\tlogger.trace(\"loadData() is called\");\n\t\t\n\t\ttry {\n\t\t\tFileInputStream fileIn = new FileInputStream(\"server-info.dat\");\n\t\t\tObjectInputStream in = new ObjectInputStream(fileIn);\n\t\t\tjokeFile = (String ) in.readObject();\n\t\t\tkkServerPort = (int) in.readObject();\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\tjokeFile = \"kk-jokes.txt\";\n\t\t\tkkServerPort = 5555;\n\t\t\t//e.printStackTrace();\n\t\t\tSystem.err.println(\"server-info.dat file is likely missing but it should be created automatically when this app is closed.\");\n\t\t\tlogger.info(\"server-info.dat file is likely missing but it should be created automatically when this app is closed.\");\n\t\t}\t\n\t}", "@Override\n\tpublic void loadData() throws FileNotFoundException {\n\t\tthis.getPromoShare();\n\t}", "private void reloadData() {\n if (DataFile == null)\n DataFile = new File(dataFolder, DATAFILENAME);\n Data = YamlConfiguration.loadConfiguration(DataFile);\n }", "void massiveModeLoading( File dataPath );", "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 }", "@Override\r\n\tpublic void load() {\n\t\ts.load();\r\n\r\n\t}", "@Override\r\n\tprotected void load() {\n\t\t\r\n\t}", "private void loadData() {\n FileInputStream fis;\n\n try {\n fis = openFileInput(DATA_FILE);\n user = (User) new JsonReader(fis).readObject();\n fis.close();\n } catch(Exception e) {\n Log.i(\"Exception :\", e.toString());\n }\n }", "public void load() {\n }", "public void loadFirstData() throws Exception {\n\t}", "private void loadUser() {\n File dataFile = new File(getFilesDir().getPath() + \"/\" + DATA_FILE);\n\n if(dataFile.exists()) {\n loadData();\n } else { // First time CigCount is launched\n user = new User();\n }\n }", "private void loadData() {\n this.financeDataList = new ArrayList<>();\n }", "private void initData() {\n\t}", "private void loadData() {\n Log.d(LOG_TAG, \"loadData()\");\n /* If the device does not have an internet connection, then... */\n if (!NetworkUtils.hasInternetConnection(this)){\n showErrorMessage(true);\n return;\n }\n /* Make the View for the data visible and hide the error message */\n showDataView();\n\n /* Fetch the data from the web asynchronous using Retrofit */\n TMDBApi the_movie_database_api = new TMDBApi(new FetchDataTaskCompleteListener());\n /* Start the network transactions */\n the_movie_database_api.start(sortOrderCurrent);\n\n /* Display the loading indicator */\n displayLoadingIndicator(true);\n }", "public void loadData() {\n if (this.model != null) {\n\n this.dataLayout.setVisibility(View.VISIBLE);\n this.emptyText.setVisibility(View.GONE);\n\n\n if (this.model.getSolution() != null) {\n this.solutionView.setText(this.model.getSolution());\n }\n if (this.model.getArguments() != null) {\n this.argumentsView.setText(this.model.getArguments());\n }\n if (this.model.getQuestion() != null) {\n this.questionView.setText(\n String.valueOf(this.model.getQuestion().getId()));\n }\n } else {\n this.dataLayout.setVisibility(View.GONE);\n this.emptyText.setVisibility(View.VISIBLE);\n }\n }", "public void load() ;", "void loadData() throws SerializerException;", "public void loadPersistence() {\n\t\tFile file = new File(\"data.txt\");\n\t\tif (file.length() == 0) { // no persistent data to use\n\t\t\treturn;\n\t\t}\n\t\tdeserializeFile(file);\n\t\tloadPersistentSettings();\n\t}", "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 }", "abstract void initializeNeededData();", "private void loadUserData() {\n\t\tuserData = new UserData();\n }", "private void initData() {\n }", "private void loadData() {\r\n\t\talert(\"Loading data ...\\n\");\r\n \r\n // ---- categories------\r\n my.addCategory(new Category(\"1\", \"VIP\"));\r\n my.addCategory(new Category(\"2\", \"Regular\"));\r\n my.addCategory(new Category(\"3\", \"Premium\"));\r\n my.addCategory(new Category(\"4\", \"Mierder\"));\r\n \r\n my.loadData();\r\n \r\n\t }", "public static void load() {\n load(false);\n }", "public static void load() {\n }", "private void loadData()\r\n\t{\r\n\t\taddProduct(\"Area\", \"Education\");\r\n\t\taddProduct(\"Area\", \"Environment\");\r\n\t\taddProduct(\"Area\", \"Health\");\r\n\r\n\t\taddProduct(\"Domain\", \"Documentation\");\r\n\t\taddProduct(\"Domain\", \"Project Activity\");\r\n\t\taddProduct(\"Domain\", \"Technology\");\r\n\r\n\t\taddProduct(\"City\", \"Bangalore\");\r\n\t\taddProduct(\"City\", \"Hyderabad\");\r\n\t\taddProduct(\"City\", \"Lucknow\");\r\n\r\n\t\taddProduct(\"Activity_Type\", \"Onsite\");\r\n\t\taddProduct(\"Activity_Type\", \"Offsite\");\r\n\r\n\t}", "private void loadData()\n {\n try\n {\n //Reads in the data from default file\n System.out.println(\"ATTEMPTING TO LOAD\");\n allGroups = (ArrayList<CharacterGroup>)serial.Deserialize(\"All-Groups.dat\");\n System.out.println(\"LOADED\");\n loadSuccessful = true;\n \n //If read is successful, save backup file in case of corruption\n try\n {\n System.out.println(\"SAVING BACKUP\");\n serial.Serialize(allGroups, \"All-Groups-backup.dat\");\n System.out.println(\"BACKUP SAVED\");\n } catch (IOException e)\n {\n System.out.println(\"FAILED TO WRITE BACKUP DATA\");\n }\n } catch (IOException e)\n {\n //If loading from default file fails, first try loading from backup file\n System.out.println(\"READING FROM DEFAULT FAILED\");\n try\n {\n System.out.println(\"ATTEMPTING TO READ FROM BACKUP\");\n allGroups = (ArrayList<CharacterGroup>)serial.Deserialize(\"All-Groups-backup\");\n System.out.println(\"READING FROM BACKUP SUCCESSFUL\");\n loadSuccessful = true;\n } catch (IOException ex)\n {\n //If reading from backup fails aswell generate default data\n System.out.println(\"READING FROM BACKUP FAILED\");\n allGroups = new ArrayList();\n } catch (ClassNotFoundException ex){}\n } catch (ClassNotFoundException e){}\n }", "@Override\r\n\tpublic void load() {\n\t}", "@Override\n\tpublic void loadData(Bundle bundle) {\n\t}", "private void initData() {\n\t\tnamesInfo = new NameSurferDataBase(fileName);\n\n\t}", "boolean canLoadData();", "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}", "private void loadData(){\n Dh.refresh();\n }", "private void InitData() {\n\t}", "@Override\n public void load() {\n }", "public void loadObjData() {\n this.updateGeometryAndUVs(SquareCoords, UVCoords, DrawOrder);\n SquareCoords = new float[0];\n UVCoords = new float[0];\n DrawOrder = new int[0];\n }", "@Override\n\tprotected void load() {\n\n\t}", "@Override\n\tprotected void load() {\n\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}", "private void loadPersistedData() {\n IntegerRange storedAutoStartOnDisconnectDelayRange =\n AUTOSTART_ON_DISCONNECT_DELAY_RANGE_SETTING.load(mDeviceDict);\n if (storedAutoStartOnDisconnectDelayRange != null) {\n mPilotingItf.getAutoStartOnDisconnectDelay().updateBounds(storedAutoStartOnDisconnectDelayRange);\n }\n\n DoubleRange endingHoveringAltitudeRange = ENDING_HOVERING_ALTITUDE_RANGE_SETTING.load(mDeviceDict);\n if (endingHoveringAltitudeRange != null) {\n mPilotingItf.getEndingHoveringAltitude().updateBounds(endingHoveringAltitudeRange);\n }\n\n DoubleRange minAltitudeRange = MIN_ALTITUDE_RANGE_SETTING.load(mDeviceDict);\n if (minAltitudeRange != null) {\n mPilotingItf.getMinAltitude().updateBounds(minAltitudeRange);\n }\n\n applyPresets();\n }", "private synchronized void initializeData() {\n\n System.out.println(\"En inicializar datos\");\n // Only perform initialization once per app lifetime. If initialization has already been\n // performed, we have nothing to do in this method.\n if (mInitialized) return;\n mInitialized = true;\n\n mExecutors.diskIO().execute(() -> {\n if (isFetchNeeded()) {\n System.out.println(\"Se necesita actualizar, fetch is needed\");\n startFetchPublicacionService();\n }\n });\n }", "private void load() {\r\n\t\tswitch (this.stepPanel.getStep()) {\r\n\t\tcase StepPanel.STEP_HOST_GRAPH:\r\n\t\t\tloadGraph(StepPanel.STEP_HOST_GRAPH);\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_STOP_GRAPH:\r\n\t\t\tloadGraph(StepPanel.STEP_STOP_GRAPH);\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_CRITICAL_PAIRS:\r\n\t\t\tloadPairs();\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_FINISH:\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "private void initData() {\n\n }", "private static void load(){\n }", "@Override\n public void load() {\n }", "@Override\r\n\tpublic void load() {\n\r\n\t}", "private void reloadData() throws IOException\n {\n /* Reload data from file, if it is modified after last scan */\n long mtime = loader.getModificationTime();\n if (mtime < lastKnownMtime) {\n return;\n }\n lastKnownMtime = mtime;\n\n InputStream in = loader.getInputStream();\n BufferedReader bin = new BufferedReader(new InputStreamReader(in));\n cache.clear();\n String line;\n while ((line = bin.readLine()) != null) {\n try {\n Map<String, Object> tuple = reader.readValue(line);\n updateLookupCache(tuple);\n } catch (JsonProcessingException parseExp) {\n logger.info(\"Unable to parse line {}\", line);\n }\n }\n IOUtils.closeQuietly(bin);\n IOUtils.closeQuietly(in);\n }", "public void load();", "public void load();", "private void loadDataFromDatabase() {\n mSwipeRefreshLayout.setRefreshing(true);\n mPresenter.loadDataFromDatabase();\n }", "@Override\r\n\tprotected void initLoad() {\n\r\n\t}", "@Override\n void loadData() {\n langConfigFile = new File(plugin.getDataFolder() + \"/messages.yml\");\n // Attempt to read the config in the config file.\n langConfig = YamlConfiguration.loadConfiguration(langConfigFile);\n // If the config file is null (due to the config file being invalid or not there) create a new one.\n // If the file doesnt exist, populate it from the template.\n if (!langConfigFile.exists()) {\n langConfigFile = new File(plugin.getDataFolder() + \"/messages.yml\");\n langConfig = YamlConfiguration.loadConfiguration(new InputStreamReader(plugin.getResource(\"messages.yml\")));\n saveData();\n }\n }", "public abstract void load();", "@Override\n\tpublic D loadInBackground() {\n\t\tmData = createData();\n\t\treturn mData;\n\t}", "@EventListener(ApplicationReadyEvent.class)\n\tpublic void loadData() {\n\t\tList<AppUser> allUsers = appUserRepository.findAll();\n\t\tList<Customer> allCustomers = customerRepository.findAll();\n\t\tList<Part> allPArts = partRepository.findAll();\n\n\t\tif (allUsers.size() == 0 && allCustomers.size() == 0 && allPArts.size() == 0) {\n\t\t\tSystem.out.println(\"Pre-populating the database with test data\");\n\n\t\t\tResourceDatabasePopulator resourceDatabasePopulator = new ResourceDatabasePopulator(\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t\t\"UTF-8\",\n\t\t\t\tnew ClassPathResource(\"data.sql\"));\n\t\t\tresourceDatabasePopulator.execute(dataSource);\n\t\t}\n\t\tSystem.out.println(\"Application successfully started!\");\n\t}", "@Override\n void load(String data) {\n }", "public void initData() {\n }", "public void initData() {\n }", "public void refreshData(){ \n \t\tif(!mIsFirstRun){\n \t if(mDb == null) mDb = new Sqlite(this.getContext());\n \t if(!mDb.isOpen()) mDb.openRead();\n \t \n \t\t\tgetLoaderManager().restartLoader(0,null,this);\n \t\t}else mIsFirstRun = false;\n \t}", "void load();", "void load();", "protected boolean initLocalData() {\n return true;\n }", "public void loadFromDatabase(){\r\n /**\r\n * Open the file streams to the three files\r\n * Recover the state of data structures\r\n * Close the file streams\r\n */\r\n\r\n try{\r\n //Recover the state of unfinished set from unfinished.dat\r\n unfinishedFileInputStream = new FileInputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetInputStream = new ObjectInputStream(unfinishedFileInputStream);\r\n unfinished = (Set<Task>)unfinishedSetInputStream.readObject();\r\n unfinishedSetInputStream.close();\r\n unfinishedFileInputStream.close();\r\n\r\n //Recover the state of finished list from finished.dat\r\n finishedFileInputStream = new FileInputStream(FINISHED_FILE_PATH);\r\n finishedListInputStream = new ObjectInputStream(finishedFileInputStream);\r\n finished = (ArrayList<Task>)finishedListInputStream.readObject();\r\n finishedListInputStream.close();\r\n finishedFileInputStream.close();\r\n\r\n //Recover the state of activities list from activities.dat\r\n activitiesFileInputStream = new FileInputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListInputStream = new ObjectInputStream(activitiesFileInputStream);\r\n activities = (ArrayList<Activity>)activitiesListInputStream.readObject();\r\n activitiesListInputStream.close();\r\n activitiesFileInputStream.close();\r\n\r\n generateWeeklySchedule();\r\n }\r\n catch(Exception e){\r\n System.out.println(e.getMessage());\r\n }\r\n }", "public void loadAllUserData(){\n\n }", "private void loadData(){\n updateDateTimeText();\n\n mLoadingDialog = DialogUtil.createLoadingDialog(getActivity(), getString(R.string.loading_dialog_in_progress));\n mLoadingDialog.show();\n // Call API to get the schedules\n mPresenter.loadAllExaminationSchedulesForSpecificDate(mMyDate.generateDateString(AppConstants.DATE_FORMAT_YYYY_MM_DD));\n }", "void populateData();", "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 }", "public void initializeData() {\n _currentDataAll = _purityReportData.getAll();\n }", "private void loadData() {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);\n String fromSymbols = sharedPreferences.getString(getString(R.string.cryto_key), getString(R.string.cryto_value));\n String toSymbols = sharedPreferences.getString(getString(R.string.currencies_key), getString(R.string.currencies_value));\n new FetchUrlTask().execute(fromSymbols, toSymbols);\n sharedPreferences.registerOnSharedPreferenceChangeListener(this);\n }", "protected void loadData() {\n refreshview.setRefreshing(true);\n //小区ID\\t帐号\\t消息类型ID\\t开始时间\\t结束时间\n // ZganLoginService.toGetServerData(26, 0, 2, String.format(\"%s\\t%s\\t%s\\t%s\\t%d\", PreferenceUtil.getUserName(), msgtype, \"2015-01-01\", nowdate, pageindex), handler);\n //ZganCommunityService.toGetServerData(26, 0, 2, String.format(\"%s\\t%s\\t%s\\t%s\\t%d\", PreferenceUtil.getUserName(), msgtype, \"2015-01-01\", nowdate, pageindex), handler);\n ZganCommunityService.toGetServerData(40, String.format(\"%s\\t%s\\t%s\\t%s\", PreferenceUtil.getUserName(), funcPage.gettype_id(), String.format(\"@id=22,@page_id=%s,@page=%s\",funcPage.getpage_id(),pageindex), \"22\"), handler);\n }", "public void load (){\n load(MAX_PREZ);\n }", "private void loadDataOnFirst(){\n updateDateTimeText();\n\n mPbLoading.setVisibility(View.VISIBLE);\n mCalendarListView.setVisibility(View.GONE);\n\n // Call API to get the schedules\n mPresenter.loadAllExaminationSchedulesForSpecificDate(mMyDate.generateDateString(AppConstants.DATE_FORMAT_YYYY_MM_DD));\n }", "public static void populateData() {\n\n }", "private void loadFieldGuideData() {\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tLog.d(TAG, \"Loading data via loadData()\");\n\t\t\t\t\t\tloadData();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}).start();\n\t\t}", "@Override\n public void run() {\n ArticleHeaders.loadData(getApplicationContext());\n CustomerHeaders.loadData(getApplicationContext());\n OrderReasons.loadData(getApplicationContext());\n }", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "public void loadDataFromFile() {\n startX = 0;\n startY = 540;\n\n }" ]
[ "0.81632406", "0.80745375", "0.8047743", "0.77141607", "0.77141607", "0.77054745", "0.767114", "0.767114", "0.7311536", "0.72100997", "0.72080255", "0.7197452", "0.7167984", "0.7129897", "0.7051257", "0.7026415", "0.7019144", "0.70051676", "0.69865763", "0.69440806", "0.69306743", "0.6923227", "0.6917961", "0.690406", "0.6899613", "0.6897228", "0.6890996", "0.6864393", "0.68435097", "0.6825721", "0.6818075", "0.68158495", "0.68135685", "0.6802209", "0.6794931", "0.67840236", "0.6757604", "0.67446196", "0.6740772", "0.67343736", "0.6728101", "0.67182696", "0.6712663", "0.670798", "0.6694951", "0.66909045", "0.6690317", "0.66761637", "0.6666999", "0.66610825", "0.66559136", "0.66479737", "0.6647192", "0.6636539", "0.6636539", "0.66362476", "0.66362476", "0.66362476", "0.66238683", "0.6622636", "0.6621512", "0.6616533", "0.66143304", "0.66131306", "0.6601566", "0.65981424", "0.6580179", "0.6580179", "0.6536117", "0.6525552", "0.6520822", "0.6519167", "0.65000755", "0.6498925", "0.64810514", "0.6480058", "0.6480058", "0.6454018", "0.64525485", "0.64525485", "0.6449639", "0.6447756", "0.6435275", "0.6419501", "0.6419126", "0.64185816", "0.64161915", "0.6406395", "0.64029276", "0.64009374", "0.6368049", "0.6367928", "0.6345123", "0.63402015", "0.63363194", "0.63363194", "0.63363194", "0.63363194", "0.63363194", "0.63363194", "0.63348365" ]
0.0
-1
Load the data, if necessary
private JFreeChart getPieChart() { loadData(); // Create a chart and return it final JFreeChart chart = ChartFactory.createPieChart(getTitle(), getPieDataset(), useLegend(), useTooltips(), useURLs()); // Customize the labels and legend final PiePlot pieplot = (PiePlot) chart.getPlot(); pieplot.setLabelGenerator(new StandardPieSectionLabelGenerator("{0} ({2})")); // pieplot.setSimpleLabels(true); pieplot.setNoDataMessage("No data available"); if (useLegend()) { pieplot.setLegendLabelGenerator(new StandardPieSectionLabelGenerator("{0} ({1})")); chart.getLegend().setPosition(RectangleEdge.RIGHT); // pieplot.setLegendLabelToolTipGenerator(new StandardPieSectionLabelGenerator("{0}: {2}%")); } return chart; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void loadData()\n {\n }", "private void loadData() {\n\t\tOptional<ServerData> loaded_data = dataSaver.load();\n\t\tif (loaded_data.isPresent()) {\n\t\t\tdata = loaded_data.get();\n\t\t} else {\n\t\t\tdata = new ServerData();\n\t\t}\n\t}", "protected abstract void loadData();", "void loadData();", "void loadData();", "public void loadData ( ) {\n\t\tinvokeSafe ( \"loadData\" );\n\t}", "public abstract void loadData();", "public abstract void loadData();", "private void initDataLoader() {\n\t}", "public void loadData() {\n\t\tbookingRequestList = bookingRequestDAO.getAllBookingRequests();\n\t\tcabDetailList = cabDAO.getAllCabs();\n\t}", "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 //load general data\n Settings.loadSettings();\n\n this.spCrawlTimeout.setValue(Settings.CRAWL_TIMEOUT / 1000);\n this.spRetryPolicy.setValue(Settings.RETRY_POLICY);\n this.spRecrawlInterval.setValue(Settings.RECRAWL_TIME / 3600000);\n this.spRecrawlCheckTime.setValue(Settings.RECRAWL_CHECK_TIME / 60000);\n }", "public void load() {\n handleLoad(false, false);\n }", "@Override\n\t\tvoid loadData() throws IOException {\n\t\t\tsuper.loadData();\n\t\t}", "public void load() {\n\t}", "public void load()\n\t{\n\t\tfor(String s : playerData.getConfig().getKeys(false))\n\t\t{\n\t\t\tPlayerData pd = new PlayerData(playerData, s);\n\t\t\tpd.load();\n\t\t\tdataMap.put(s, pd);\n\t\t}\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 loadData() {\n\t\tlogger.trace(\"loadData() is called\");\n\t\t\n\t\ttry {\n\t\t\tFileInputStream fileIn = new FileInputStream(\"server-info.dat\");\n\t\t\tObjectInputStream in = new ObjectInputStream(fileIn);\n\t\t\tjokeFile = (String ) in.readObject();\n\t\t\tkkServerPort = (int) in.readObject();\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\tjokeFile = \"kk-jokes.txt\";\n\t\t\tkkServerPort = 5555;\n\t\t\t//e.printStackTrace();\n\t\t\tSystem.err.println(\"server-info.dat file is likely missing but it should be created automatically when this app is closed.\");\n\t\t\tlogger.info(\"server-info.dat file is likely missing but it should be created automatically when this app is closed.\");\n\t\t}\t\n\t}", "@Override\n\tpublic void loadData() throws FileNotFoundException {\n\t\tthis.getPromoShare();\n\t}", "private void reloadData() {\n if (DataFile == null)\n DataFile = new File(dataFolder, DATAFILENAME);\n Data = YamlConfiguration.loadConfiguration(DataFile);\n }", "void massiveModeLoading( File dataPath );", "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 }", "@Override\r\n\tpublic void load() {\n\t\ts.load();\r\n\r\n\t}", "@Override\r\n\tprotected void load() {\n\t\t\r\n\t}", "private void loadData() {\n FileInputStream fis;\n\n try {\n fis = openFileInput(DATA_FILE);\n user = (User) new JsonReader(fis).readObject();\n fis.close();\n } catch(Exception e) {\n Log.i(\"Exception :\", e.toString());\n }\n }", "public void load() {\n }", "public void loadFirstData() throws Exception {\n\t}", "private void loadUser() {\n File dataFile = new File(getFilesDir().getPath() + \"/\" + DATA_FILE);\n\n if(dataFile.exists()) {\n loadData();\n } else { // First time CigCount is launched\n user = new User();\n }\n }", "private void loadData() {\n this.financeDataList = new ArrayList<>();\n }", "private void initData() {\n\t}", "private void loadData() {\n Log.d(LOG_TAG, \"loadData()\");\n /* If the device does not have an internet connection, then... */\n if (!NetworkUtils.hasInternetConnection(this)){\n showErrorMessage(true);\n return;\n }\n /* Make the View for the data visible and hide the error message */\n showDataView();\n\n /* Fetch the data from the web asynchronous using Retrofit */\n TMDBApi the_movie_database_api = new TMDBApi(new FetchDataTaskCompleteListener());\n /* Start the network transactions */\n the_movie_database_api.start(sortOrderCurrent);\n\n /* Display the loading indicator */\n displayLoadingIndicator(true);\n }", "public void loadData() {\n if (this.model != null) {\n\n this.dataLayout.setVisibility(View.VISIBLE);\n this.emptyText.setVisibility(View.GONE);\n\n\n if (this.model.getSolution() != null) {\n this.solutionView.setText(this.model.getSolution());\n }\n if (this.model.getArguments() != null) {\n this.argumentsView.setText(this.model.getArguments());\n }\n if (this.model.getQuestion() != null) {\n this.questionView.setText(\n String.valueOf(this.model.getQuestion().getId()));\n }\n } else {\n this.dataLayout.setVisibility(View.GONE);\n this.emptyText.setVisibility(View.VISIBLE);\n }\n }", "public void load() ;", "void loadData() throws SerializerException;", "public void loadPersistence() {\n\t\tFile file = new File(\"data.txt\");\n\t\tif (file.length() == 0) { // no persistent data to use\n\t\t\treturn;\n\t\t}\n\t\tdeserializeFile(file);\n\t\tloadPersistentSettings();\n\t}", "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 }", "abstract void initializeNeededData();", "private void loadUserData() {\n\t\tuserData = new UserData();\n }", "private void initData() {\n }", "private void loadData() {\r\n\t\talert(\"Loading data ...\\n\");\r\n \r\n // ---- categories------\r\n my.addCategory(new Category(\"1\", \"VIP\"));\r\n my.addCategory(new Category(\"2\", \"Regular\"));\r\n my.addCategory(new Category(\"3\", \"Premium\"));\r\n my.addCategory(new Category(\"4\", \"Mierder\"));\r\n \r\n my.loadData();\r\n \r\n\t }", "public static void load() {\n load(false);\n }", "public static void load() {\n }", "private void loadData()\r\n\t{\r\n\t\taddProduct(\"Area\", \"Education\");\r\n\t\taddProduct(\"Area\", \"Environment\");\r\n\t\taddProduct(\"Area\", \"Health\");\r\n\r\n\t\taddProduct(\"Domain\", \"Documentation\");\r\n\t\taddProduct(\"Domain\", \"Project Activity\");\r\n\t\taddProduct(\"Domain\", \"Technology\");\r\n\r\n\t\taddProduct(\"City\", \"Bangalore\");\r\n\t\taddProduct(\"City\", \"Hyderabad\");\r\n\t\taddProduct(\"City\", \"Lucknow\");\r\n\r\n\t\taddProduct(\"Activity_Type\", \"Onsite\");\r\n\t\taddProduct(\"Activity_Type\", \"Offsite\");\r\n\r\n\t}", "private void loadData()\n {\n try\n {\n //Reads in the data from default file\n System.out.println(\"ATTEMPTING TO LOAD\");\n allGroups = (ArrayList<CharacterGroup>)serial.Deserialize(\"All-Groups.dat\");\n System.out.println(\"LOADED\");\n loadSuccessful = true;\n \n //If read is successful, save backup file in case of corruption\n try\n {\n System.out.println(\"SAVING BACKUP\");\n serial.Serialize(allGroups, \"All-Groups-backup.dat\");\n System.out.println(\"BACKUP SAVED\");\n } catch (IOException e)\n {\n System.out.println(\"FAILED TO WRITE BACKUP DATA\");\n }\n } catch (IOException e)\n {\n //If loading from default file fails, first try loading from backup file\n System.out.println(\"READING FROM DEFAULT FAILED\");\n try\n {\n System.out.println(\"ATTEMPTING TO READ FROM BACKUP\");\n allGroups = (ArrayList<CharacterGroup>)serial.Deserialize(\"All-Groups-backup\");\n System.out.println(\"READING FROM BACKUP SUCCESSFUL\");\n loadSuccessful = true;\n } catch (IOException ex)\n {\n //If reading from backup fails aswell generate default data\n System.out.println(\"READING FROM BACKUP FAILED\");\n allGroups = new ArrayList();\n } catch (ClassNotFoundException ex){}\n } catch (ClassNotFoundException e){}\n }", "@Override\r\n\tpublic void load() {\n\t}", "@Override\n\tpublic void loadData(Bundle bundle) {\n\t}", "private void initData() {\n\t\tnamesInfo = new NameSurferDataBase(fileName);\n\n\t}", "boolean canLoadData();", "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}", "private void loadData(){\n Dh.refresh();\n }", "private void InitData() {\n\t}", "public void loadObjData() {\n this.updateGeometryAndUVs(SquareCoords, UVCoords, DrawOrder);\n SquareCoords = new float[0];\n UVCoords = new float[0];\n DrawOrder = new int[0];\n }", "@Override\n public void load() {\n }", "@Override\n\tprotected void load() {\n\n\t}", "@Override\n\tprotected void load() {\n\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}", "private void loadPersistedData() {\n IntegerRange storedAutoStartOnDisconnectDelayRange =\n AUTOSTART_ON_DISCONNECT_DELAY_RANGE_SETTING.load(mDeviceDict);\n if (storedAutoStartOnDisconnectDelayRange != null) {\n mPilotingItf.getAutoStartOnDisconnectDelay().updateBounds(storedAutoStartOnDisconnectDelayRange);\n }\n\n DoubleRange endingHoveringAltitudeRange = ENDING_HOVERING_ALTITUDE_RANGE_SETTING.load(mDeviceDict);\n if (endingHoveringAltitudeRange != null) {\n mPilotingItf.getEndingHoveringAltitude().updateBounds(endingHoveringAltitudeRange);\n }\n\n DoubleRange minAltitudeRange = MIN_ALTITUDE_RANGE_SETTING.load(mDeviceDict);\n if (minAltitudeRange != null) {\n mPilotingItf.getMinAltitude().updateBounds(minAltitudeRange);\n }\n\n applyPresets();\n }", "private synchronized void initializeData() {\n\n System.out.println(\"En inicializar datos\");\n // Only perform initialization once per app lifetime. If initialization has already been\n // performed, we have nothing to do in this method.\n if (mInitialized) return;\n mInitialized = true;\n\n mExecutors.diskIO().execute(() -> {\n if (isFetchNeeded()) {\n System.out.println(\"Se necesita actualizar, fetch is needed\");\n startFetchPublicacionService();\n }\n });\n }", "private void load() {\r\n\t\tswitch (this.stepPanel.getStep()) {\r\n\t\tcase StepPanel.STEP_HOST_GRAPH:\r\n\t\t\tloadGraph(StepPanel.STEP_HOST_GRAPH);\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_STOP_GRAPH:\r\n\t\t\tloadGraph(StepPanel.STEP_STOP_GRAPH);\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_CRITICAL_PAIRS:\r\n\t\t\tloadPairs();\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_FINISH:\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "private void initData() {\n\n }", "private static void load(){\n }", "@Override\n public void load() {\n }", "@Override\r\n\tpublic void load() {\n\r\n\t}", "private void reloadData() throws IOException\n {\n /* Reload data from file, if it is modified after last scan */\n long mtime = loader.getModificationTime();\n if (mtime < lastKnownMtime) {\n return;\n }\n lastKnownMtime = mtime;\n\n InputStream in = loader.getInputStream();\n BufferedReader bin = new BufferedReader(new InputStreamReader(in));\n cache.clear();\n String line;\n while ((line = bin.readLine()) != null) {\n try {\n Map<String, Object> tuple = reader.readValue(line);\n updateLookupCache(tuple);\n } catch (JsonProcessingException parseExp) {\n logger.info(\"Unable to parse line {}\", line);\n }\n }\n IOUtils.closeQuietly(bin);\n IOUtils.closeQuietly(in);\n }", "public void load();", "public void load();", "private void loadDataFromDatabase() {\n mSwipeRefreshLayout.setRefreshing(true);\n mPresenter.loadDataFromDatabase();\n }", "@Override\r\n\tprotected void initLoad() {\n\r\n\t}", "@Override\n void loadData() {\n langConfigFile = new File(plugin.getDataFolder() + \"/messages.yml\");\n // Attempt to read the config in the config file.\n langConfig = YamlConfiguration.loadConfiguration(langConfigFile);\n // If the config file is null (due to the config file being invalid or not there) create a new one.\n // If the file doesnt exist, populate it from the template.\n if (!langConfigFile.exists()) {\n langConfigFile = new File(plugin.getDataFolder() + \"/messages.yml\");\n langConfig = YamlConfiguration.loadConfiguration(new InputStreamReader(plugin.getResource(\"messages.yml\")));\n saveData();\n }\n }", "public abstract void load();", "@Override\n\tpublic D loadInBackground() {\n\t\tmData = createData();\n\t\treturn mData;\n\t}", "@EventListener(ApplicationReadyEvent.class)\n\tpublic void loadData() {\n\t\tList<AppUser> allUsers = appUserRepository.findAll();\n\t\tList<Customer> allCustomers = customerRepository.findAll();\n\t\tList<Part> allPArts = partRepository.findAll();\n\n\t\tif (allUsers.size() == 0 && allCustomers.size() == 0 && allPArts.size() == 0) {\n\t\t\tSystem.out.println(\"Pre-populating the database with test data\");\n\n\t\t\tResourceDatabasePopulator resourceDatabasePopulator = new ResourceDatabasePopulator(\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t\t\"UTF-8\",\n\t\t\t\tnew ClassPathResource(\"data.sql\"));\n\t\t\tresourceDatabasePopulator.execute(dataSource);\n\t\t}\n\t\tSystem.out.println(\"Application successfully started!\");\n\t}", "public void initData() {\n }", "public void initData() {\n }", "@Override\n void load(String data) {\n }", "public void refreshData(){ \n \t\tif(!mIsFirstRun){\n \t if(mDb == null) mDb = new Sqlite(this.getContext());\n \t if(!mDb.isOpen()) mDb.openRead();\n \t \n \t\t\tgetLoaderManager().restartLoader(0,null,this);\n \t\t}else mIsFirstRun = false;\n \t}", "void load();", "void load();", "protected boolean initLocalData() {\n return true;\n }", "public void loadFromDatabase(){\r\n /**\r\n * Open the file streams to the three files\r\n * Recover the state of data structures\r\n * Close the file streams\r\n */\r\n\r\n try{\r\n //Recover the state of unfinished set from unfinished.dat\r\n unfinishedFileInputStream = new FileInputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetInputStream = new ObjectInputStream(unfinishedFileInputStream);\r\n unfinished = (Set<Task>)unfinishedSetInputStream.readObject();\r\n unfinishedSetInputStream.close();\r\n unfinishedFileInputStream.close();\r\n\r\n //Recover the state of finished list from finished.dat\r\n finishedFileInputStream = new FileInputStream(FINISHED_FILE_PATH);\r\n finishedListInputStream = new ObjectInputStream(finishedFileInputStream);\r\n finished = (ArrayList<Task>)finishedListInputStream.readObject();\r\n finishedListInputStream.close();\r\n finishedFileInputStream.close();\r\n\r\n //Recover the state of activities list from activities.dat\r\n activitiesFileInputStream = new FileInputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListInputStream = new ObjectInputStream(activitiesFileInputStream);\r\n activities = (ArrayList<Activity>)activitiesListInputStream.readObject();\r\n activitiesListInputStream.close();\r\n activitiesFileInputStream.close();\r\n\r\n generateWeeklySchedule();\r\n }\r\n catch(Exception e){\r\n System.out.println(e.getMessage());\r\n }\r\n }", "public void loadAllUserData(){\n\n }", "private void loadData(){\n updateDateTimeText();\n\n mLoadingDialog = DialogUtil.createLoadingDialog(getActivity(), getString(R.string.loading_dialog_in_progress));\n mLoadingDialog.show();\n // Call API to get the schedules\n mPresenter.loadAllExaminationSchedulesForSpecificDate(mMyDate.generateDateString(AppConstants.DATE_FORMAT_YYYY_MM_DD));\n }", "void populateData();", "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 }", "public void initializeData() {\n _currentDataAll = _purityReportData.getAll();\n }", "private void loadData() {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);\n String fromSymbols = sharedPreferences.getString(getString(R.string.cryto_key), getString(R.string.cryto_value));\n String toSymbols = sharedPreferences.getString(getString(R.string.currencies_key), getString(R.string.currencies_value));\n new FetchUrlTask().execute(fromSymbols, toSymbols);\n sharedPreferences.registerOnSharedPreferenceChangeListener(this);\n }", "protected void loadData() {\n refreshview.setRefreshing(true);\n //小区ID\\t帐号\\t消息类型ID\\t开始时间\\t结束时间\n // ZganLoginService.toGetServerData(26, 0, 2, String.format(\"%s\\t%s\\t%s\\t%s\\t%d\", PreferenceUtil.getUserName(), msgtype, \"2015-01-01\", nowdate, pageindex), handler);\n //ZganCommunityService.toGetServerData(26, 0, 2, String.format(\"%s\\t%s\\t%s\\t%s\\t%d\", PreferenceUtil.getUserName(), msgtype, \"2015-01-01\", nowdate, pageindex), handler);\n ZganCommunityService.toGetServerData(40, String.format(\"%s\\t%s\\t%s\\t%s\", PreferenceUtil.getUserName(), funcPage.gettype_id(), String.format(\"@id=22,@page_id=%s,@page=%s\",funcPage.getpage_id(),pageindex), \"22\"), handler);\n }", "public void load (){\n load(MAX_PREZ);\n }", "private void loadDataOnFirst(){\n updateDateTimeText();\n\n mPbLoading.setVisibility(View.VISIBLE);\n mCalendarListView.setVisibility(View.GONE);\n\n // Call API to get the schedules\n mPresenter.loadAllExaminationSchedulesForSpecificDate(mMyDate.generateDateString(AppConstants.DATE_FORMAT_YYYY_MM_DD));\n }", "public static void populateData() {\n\n }", "private void loadFieldGuideData() {\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tLog.d(TAG, \"Loading data via loadData()\");\n\t\t\t\t\t\tloadData();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}).start();\n\t\t}", "@Override\n public void run() {\n ArticleHeaders.loadData(getApplicationContext());\n CustomerHeaders.loadData(getApplicationContext());\n OrderReasons.loadData(getApplicationContext());\n }", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "public void loadDataFromFile() {\n startX = 0;\n startY = 540;\n\n }" ]
[ "0.8163035", "0.8074418", "0.804742", "0.77141476", "0.77141476", "0.7705287", "0.7670667", "0.7670667", "0.7311227", "0.72103363", "0.72079045", "0.71979225", "0.7167437", "0.7129454", "0.70502144", "0.7026352", "0.70184386", "0.7005353", "0.69857997", "0.6943849", "0.693063", "0.6922696", "0.69167954", "0.69028085", "0.68999374", "0.68961847", "0.68906933", "0.68647176", "0.68432754", "0.6825671", "0.68185836", "0.6816277", "0.6812444", "0.6800965", "0.67946607", "0.6784106", "0.67571735", "0.6744631", "0.67408293", "0.6734943", "0.67274183", "0.6717543", "0.6712709", "0.6707516", "0.66935915", "0.6690591", "0.66898674", "0.6675376", "0.66673476", "0.6661418", "0.6655615", "0.66471946", "0.66466254", "0.6635227", "0.6635227", "0.6634904", "0.6634904", "0.6634904", "0.6623372", "0.6622749", "0.6620676", "0.6616481", "0.66132295", "0.66117805", "0.66001284", "0.6598208", "0.657921", "0.657921", "0.65357476", "0.6524274", "0.65211606", "0.6517911", "0.6500332", "0.64991474", "0.6480141", "0.6480141", "0.6479742", "0.6453487", "0.64515024", "0.64515024", "0.6449083", "0.6446385", "0.6434497", "0.64198697", "0.6418974", "0.64187247", "0.64167756", "0.6406341", "0.6403865", "0.6400892", "0.6368541", "0.6367712", "0.63455266", "0.6340377", "0.6335769", "0.6335769", "0.6335769", "0.6335769", "0.6335769", "0.6335769", "0.6335395" ]
0.0
-1
Date date = new Date(1000000L); Date date=new Date(116,2,15);
public static void main(String[] args) { System.out.println(new Date().getTime()); // 2016-12-16 11:48:08 Calendar calendar = Calendar.getInstance(); calendar.set(2016, 11, 16, 12, 0, 1); System.out.println(calendar.getTime()); Date date=new Date(); SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); System.out.println(simpleDateFormat.format(date)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n int i =2003;\n long d = 13220100526L;\n System.out.println(new Date(d));\n System.out.println(i / 20 + (i % 20 > 0 ? 1 : 0));\n }", "public void setDate(long date)\r\n/* 199: */ {\r\n/* 200:299 */ setDate(\"Date\", date);\r\n/* 201: */ }", "public void setDate(long date) {\r\n\t\tthis.date = new Date(date);\r\n\t}", "public void setDate(long value) {\n this.date = value;\n }", "private AbsTime(Date date)\n {\n // The value of 3506716800000000L is the BAT as at midnight on\n // 1-Jan-1970, which is the base of the time that the system\n // gives us. It has to be adjusted for leap seconds though.\n itsValue = date.getTime() * 1000L + DUTC.get() * 1000000L + 3506716800000000L;\n }", "public static Date LongTotime(Long lDate)\n\t{\n\t\tif(lDate==0)\n\t\t\treturn new Date(1970,1,1);\n\t\telse\n\t\t\treturn new Date(lDate);\n\t}", "@Test\n public void dateUtilTest() {\n String orgStr = \"2016-01-05 10:00:17\";\n Date orgDate = new Date(1451959217000L);\n Assert.assertTrue(DateStrValueConvert.dateFormat(orgDate).equals(orgStr));\n Assert.assertTrue(DateStrValueConvert.dateConvert(orgStr).equals(orgDate));\n }", "static public java.util.Date getDate(double seconds){\n\treturn new java.util.Date(1000L * ((long)(seconds))); \n }", "public Date getNormalizedDate(Date date)\n/* */ {\n/* 208 */ return new Date(date.getTime());\n/* */ }", "public static void main(String[] args) {\n\t\tDate dd = new Date();\r\n\t\tSystem.out.println(dd);//Fri Feb 07 16:09:49 CST 2020\r\n\t\tSystem.out.println(dd.getTime());//1581063032540 返回long类型的System.currentTimeMillis()\r\n\t\tlong theTime = System.currentTimeMillis();\r\n\t\tDate cc = new Date(theTime);\r\n\t\t//将System.currentTimeMillis转化为Date\r\n\t\tSystem.out.println(cc);//Fri Feb 07 16:12:19 CST 2020\r\n\t\tSystem.out.println(cc.getTime());\r\n\t}", "public static void main(String[] args) {\r\n\t\tDate now = new Date();\r\n\t\tSimpleDateFormat sdf = \r\n\t\tnew SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\tString str = sdf.format(now);\r\n\tSystem.out.println(str);\r\n\tlong time = now.getTime();\r\n\ttime += 48954644;\r\n\tnow.setTime(time);\r\n\tSystem.out.println(sdf.format(now));\r\n\tDate dat = null;\r\n\ttry {\r\n\t\tdat = sdf.parse(str);\r\n\t} catch (ParseException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t}\r\n\tSystem.out.println(dat);\r\n\t\r\n\r\n}", "public MyDate(long inElapsedTime)\n {\n //put in logic here\n elapsedTime = inElapsedTime;\n this.setDate(elapsedTime);\n }", "public Date(){\n\t\tyear=0;\n\t\tmonth=0;\n\t\tday=0;\n\t}", "public static Date convertToDate(long value) {\r\n return new Date(value);\r\n }", "public static void main1(String[] args) throws ParseException {\n\t\t\n\t\tint value = 1431509431;\n\n\t\tint year = value * 1000 / 10000;\n\t\tint month = (value * 1000 % 10000) / 100;\n\t\tint day = value * 1000 % 100;\n\t\tDate date = new GregorianCalendar(year, month, day).getTime();\n\t\t\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tSystem.out.println(sdf.format(date));\n\t}", "long getDate();", "public void setDate(long date) {\n\t\tthis.date = date;\n\t}", "public MyDate(){\n this.day = 0;\n this.month = 0;\n this.year = 0;\n }", "public Sad(){\n\t\tthis.date = new Date(System.currentTimeMillis());\n\t}", "@Test\n\tpublic void testDate2() {\n\t\ttry {\n\t\t\tfinal Date date = ParadoxDate.getDateFromParadoxDate(36160);\n\t\t\tfinal Calendar calendar = Calendar.getInstance();\n\t\t\tcalendar.setTime(date);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.DATE) == 1);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.MONTH) == 0);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.YEAR) == 100);\n\t\t} catch (final Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(System.currentTimeMillis()); // Quantos Milisegundos desde data 01/01/1970\n\t\t\n\t\t// Data Atual\n\t\tDate agora = new Date();\n\t\tSystem.out.println(\"Data Atual: \"+agora);\n\t\t\n\t\tDate data = new Date(1_000_000_000_000L);\n\t\tSystem.out.println(\"Data com 1.000.000.000.000ms: \"+data);\n\t\t\n\t\t// METODOS\n\t\tdata.getTime();\n\t\tdata.setTime(1_000_000_000_000L);\n\t\tSystem.out.println(data.compareTo(agora)); // -1 para anterior, 0 para igual, +1 para posterior\n\t\t\n\t\t// GregorianCalendar\n\t\tCalendar c = Calendar.getInstance();\n\t\tc.set(1980, Calendar.FEBRUARY, 12);\n\t\tSystem.out.println(c.getTime());\n\t\tSystem.out.println(c.get(Calendar.YEAR)); // Ano\n\t\tSystem.out.println(c.get(Calendar.MONTH)); // Mes 0 - 11\n\t\tSystem.out.println(c.get(Calendar.DAY_OF_MONTH)); // Dia do mes\n\t\t\n\t\tc.set(Calendar.YEAR,2016); // Altera o Ano\n\t\tc.set(Calendar.MONTH, 10); // Altera o Mes 0 - 11\n\t\tc.set(Calendar.DAY_OF_MONTH, 24); // Altera o Dia do mes\n\t\tSystem.out.println(c.getTime());\n\t\t\n\t\tc.clear(Calendar.MINUTE); // limpa minutos\n\t\tc.clear(Calendar.SECOND); // limpa segundos\n\t\tSystem.out.println(c.getTime());\n\t\t\n\t\tc.add(Calendar.DAY_OF_MONTH,1); // adiciona dias (avança o mes e ano)\n\t\tc.add(Calendar.YEAR,1); // adiciona o ano \n\t\tSystem.out.println(c.getTime());\n\t\t\n\t\tc.roll(Calendar.DAY_OF_MONTH,20); // adiciona dias (não avança o mes e ano)\n\t\tSystem.out.println(c.getTime());\n\t\t\n\t\t// Saudação com Bom dia, Boa arde ou Boa noite\n\t\tCalendar c1 = Calendar.getInstance();\n\t\tint hora = c1.get(Calendar.HOUR_OF_DAY);\n\t\tSystem.out.println(hora);\n\t\tif(hora <= 12){\n\t\t\tSystem.out.println(\"Bom Dia\");\n\t\t} else if(hora > 12 && hora < 18){\n\t\t\tSystem.out.println(\"Boa Tarde\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Boa Noite\");\n\t\t}\n\t\t\n\n\t}", "public static void main(String[] args) {\n\n\t\t SimpleDateFormat sf = new SimpleDateFormat(\"yyyyMMddHHmmssSSS\");\n\t\t// for(int i=0; i<100; i++) {\n\t\t// String strDT = sf.format(new Date(System.currentTimeMillis()));\n\t\t// System.out.println(strDT);\n\t\t// }\n\n\t\t\n\t\tDate oldDate = new Date();\n\t\tCalendar gcal = new GregorianCalendar();\n\t\tgcal.setTime(oldDate);\n\t\tgcal.add(Calendar.SECOND, -4468);\n\t\tDate newDate = gcal.getTime();\n\t\tSystem.out.println(sf.format(oldDate));\n\t\tSystem.out.println(sf.format(newDate));\n\t}", "public Date(int y, int m, int d){\n\t\tif((y<2015 || m<=0 || m>12 || d<=0 || d>31)){\n\t\t\tyear=0;\n\t\t\tmonth=0;\n\t\t\tday=0;\n\t\t}else{\n\t\t\tyear=y;\n\t\t\tmonth=m;\n\t\t\tday=d;\n\t\t}\n\t\t\n\t}", "public static String longToStringDate(long l)\r\n/* 212: */ {\r\n/* 213:293 */ SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\r\n/* 214:294 */ String date = sdf.format(new Date(l * 1000L));\r\n/* 215:295 */ return date;\r\n/* 216: */ }", "@TypeConverter\n public Date toDate(long l){\n return new Date(l);\n }", "@Test\n public void equalsOk(){\n Date date = new Date(1,Month.january,1970);\n assertTrue(date.equals(date));\n }", "public static native JsDate create() /*-{\n return new Date();\n }-*/;", "static TS valueOf(final Date date) {\n\t\treturn valueOf(date.getTime(), 0); // Does not preserve the Date's zimezone\n\t}", "void setDate(Date data);", "public static Date fromOADate(double oaDate) {\n Date date = new Date();\n //long t = (long)((oaDate - 25569) * 24 * 3600 * 1000);\n //long t = (long) (oaDate * 1000000);\n long t = (long)BigDecimalUtil.mul(oaDate, 1000000);\n date.setTime(t);\n return date;\n }", "public Date (final Integer d, final Integer m, final Integer y) throws CGException {\n\n try {\n setSentinel();\n }\n catch (Exception e){\n\n e.printStackTrace(System.out);\n System.out.println(e.getMessage());\n }\n if (!this.pre_Date(d, m, y).booleanValue()) \n UTIL.RunTime(\"Run-Time Error:Precondition failure in Date\");\n {\n\n day = UTIL.NumberToInt(UTIL.clone(d));\n month = UTIL.NumberToInt(UTIL.clone(m));\n year = UTIL.NumberToInt(UTIL.clone(y));\n }\n }", "public Date() {\r\n }", "public void setCreateDate(long newVal) {\n setCreateDate(new java.util.Date(newVal));\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Hello World!\");\r\n\t\t/*\r\n\t\tDate d = new Date(); // Current Date\r\n\t\tSystem.out.println(d);\r\n\t\tDate d1 = new Date(1000000000); // set ne w Date\r\n\t\tSystem.out.println(d1);\r\n\t\t//System.out.println(d.after(d1)); // true\r\n\t\t//System.out.println(d1.after(d)); // false\r\n\t\tDate d2 = (Date) d1.clone(); // Making Deep copy\r\n\t\tSystem.out.println(d2);\r\n\t\tSystem.out.println(d.compareTo(d1)); // 1\r\n\t\tSystem.out.println(d1.compareTo(d)); // -1\r\n\t\tSystem.out.println(d1.compareTo(d2)); \r\n\t\tSystem.out.println(d1.equals(d2)); // true\r\n\t\tSystem.out.println(d1.equals(d)); // false\r\n\t\tSystem.out.println(d.getTime());\r\n\t*/\r\n\t\tSystem.out.println(\"Today's date: \" + LocalDate.now());\r\n\t\tSystem.out.println(\"Specified date: \" + LocalDate.of(2000, 1, 1));\r\n\r\n\r\n\t}", "@Test\n public void toStringOk(){\n Date date = new Date(1,Month.january,1970);\n assertEquals(date.toString(),\"1 january 1970\");\n }", "public DateUtil (int yyyy, int mm, int dd)\n {\n set(yyyy, mm, dd, CHECK);\n }", "public static Date createDate(int yyyy, int month, int day) {\n/* 75 */ CALENDAR.clear();\n/* 76 */ CALENDAR.set(yyyy, month - 1, day);\n/* 77 */ return CALENDAR.getTime();\n/* */ }", "@Test\n\tpublic void testDate1() {\n\t\ttry {\n\t\t\tfinal Date date = ParadoxDate.getDateFromParadoxDate(0);\n\t\t\tfinal Calendar calendar = Calendar.getInstance();\n\t\t\tcalendar.setTime(date);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.DATE) == 1);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.MONTH) == 0);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.YEAR) == 1900);\n\t\t} catch (final Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\t}", "public static native JsDate create(int year, int month, int dayOfMonth, int hours,\n int minutes, int seconds, int millis) /*-{\n return new Date(year, month, dayOfMonth, hours, minutes, seconds, millis);\n }-*/;", "public MyDate(int inYear, int inDay, int inMonth)\n {\n year = inYear;\n day = inDay;\n month = inMonth;\n }", "public ShortDate(final Date date) {\n super(date.getTime());\n }", "public void setCreateDate(Date createDate)\r\n/* */ {\r\n/* 165 */ this.createDate = createDate;\r\n/* */ }", "public static Date setDateTo0000(Date date) {\n\t\tif (date == null)\n\t\t\treturn null;\n\t\tDate result = (Date) date.clone();\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(result);\n\t\tcal.set(Calendar.HOUR_OF_DAY, 00);\n\t\tcal.set(Calendar.MINUTE, 00);\n\t\tcal.set(Calendar.SECOND, 00);\n\t\tcal.set(Calendar.MILLISECOND, 000);\n\t\tresult.setTime(cal.getTime().getTime());\n\t\treturn result;\n\t}", "public DateUtil ( DateUtil b)\n {\n this.ordinal = b.ordinal;\n this.yyyy = b.yyyy;\n this.mm = b.mm;\n this.dd = b.dd;\n }", "public ShortDate(final long time) {\n super(time);\n }", "@Test\n public void getEpochDay() {\n assertEquals(MinguoDate.of(110, 5, 19), MinguoChronology.INSTANCE.dateEpochDay(18766));\n assertEquals(MinguoDate.of(59, 1, 1), MinguoChronology.INSTANCE.dateEpochDay(0));\n }", "public Date createDate()\n {\n Timestamp maxDate = new\n Timestamp(2021 - 1900, 11,\n 31, 23, 59, 59, 0);\n Timestamp minDate = new\n Timestamp(2017 - 1900, 0,\n 1, 0, 0, 0, 0);\n long range = maxDate.getTime() - minDate.getTime();\n long randTime = Math.abs(Main.rnd.nextLong()) % range;\n //we use abs because random number might be negative\n return new Date(minDate.getTime() + randTime);\n }", "public static String dateConv(int date) {\n\t\tDate mills = new Date(date*1000L); \n\t\tString pattern = \"dd-MM-yyyy\";\n\t\tSimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\n\t\tsimpleDateFormat.setTimeZone(TimeZone.getTimeZone(\"GMT+1\"));\n\t\tString formattedDate = simpleDateFormat.format(mills);\n\t\treturn formattedDate;\n\t}", "public DERUTCTime(java.util.Date time) {\n\t}", "public Builder setDate(long value) {\n bitField0_ |= 0x00000002;\n date_ = value;\n onChanged();\n return this;\n }", "@Test\n public void tomorrowInTheSameMonth(){\n Date date = new Date(1,Month.january,1970);\n assertEquals(date.tomorrow(),new Date(2,Month.january,1970));\n }", "public Date(int m, int d, int y) {\n\t\t\n\t\tmonth = m;\n\t\tday = d;\n\t\tyear = y;\n\t\t\n\t}", "public static void setDate() {\r\n\t\tDate.set(DateFormat.getDateTimeInstance(DateFormat.SHORT,\r\n\t\t\t\tDateFormat.LONG, Locale.getDefault()).format(\r\n\t\t\t\tnew java.util.Date()));\r\n\t}", "public static void AddDateTimeAttribute( DataSet DS, long date)\n {\n if( date <= 0 )\n date = System.currentTimeMillis( );\n \n Util.AddDateTimeAttribute( DS, new Date( date ));\n }", "public void setDate(int dt) {\n date = dt;\n }", "private void setDate(String headerName, long date)\r\n/* 329: */ {\r\n/* 330:483 */ SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMATS[0], Locale.US);\r\n/* 331:484 */ dateFormat.setTimeZone(GMT);\r\n/* 332:485 */ set(headerName, dateFormat.format(new Date(date)));\r\n/* 333: */ }", "public void setDate(java.util.Date param){\n \n this.localDate=param;\n \n\n }", "public static void main(String arg[]) {\n\t\t\n\t\tlong longNumberWithoutL = 1000*60*60*24*365;\n\t\tlong longNumberWithL = 1000*60*60*24*365L;\n\n\t\tSystem.out.println(longNumberWithoutL);//1471228928\n\t\tSystem.out.println(longNumberWithL);//31536000000\n\n\t\t//31536000000 -- 36 bits\n\t\t// 11101010111101100010010110000000000\n\t\t//max limit of 32 bit int: 2147483647\n\t\t//1010111101100010010110000000000 --> 1471228928\n\t}", "public static Date newRandomDate(final Date from)\r\n\t{\r\n\t\tfinal Random secrand = new SecureRandom();\r\n\t\tfinal double randDouble = -secrand.nextDouble() * from.getTime();\r\n\t\tfinal double randomDouble = from.getTime() - secrand.nextDouble();\r\n\t\tfinal double result = randDouble * randomDouble;\r\n\t\treturn new Date((long)result);\r\n\t}", "public void SetDate(Date date);", "public Date(int y) {\r\n\r\n\t\tmonth = LAST_MONTH;\r\n\t\tday = DAYS[LAST_MONTH];\r\n\t\tyear = y;\r\n\t}", "public static void testDate() {\n\t\tDate oldDate = new Date();\r\n\t\tSystem.out.println(oldDate);\r\n\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\tc.set(2000, 0, 17);\r\n\t\tDate oldDate2 = c.getTime();\r\n\t\tSystem.out.println(oldDate2);\r\n\r\n\t\t// Dates created with Java 8\r\n\t\tLocalDateTime newDateTime = LocalDateTime.now();\r\n\t\tLocalDate newDate = LocalDate.now();\r\n\t\tLocalTime newTime = LocalTime.now();\r\n\t\tSystem.out.println(newTime);\r\n\r\n\t\tnewDateTime = LocalDateTime.of(newDate, newTime);\r\n\t\tSystem.out.println(newDateTime);\r\n\r\n\t\tLocalDateTime newDateTime1 = LocalDateTime.of(2015, 12, 1, 10, 2, 3, 4);\r\n\t\tSystem.out.println(newDateTime1);\r\n\r\n\t\tnewDateTime1 = newDateTime1.plusYears(1);\r\n\t\tSystem.out.println(newDateTime1);\r\n\r\n\t\tDateTimeFormatter dtf = DateTimeFormatter\r\n\t\t\t\t.ofLocalizedDateTime(FormatStyle.SHORT);\r\n\t\tSystem.out.println(dtf.format(newDateTime1));\r\n\t\tdtf = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM);\r\n\t\tSystem.out.println(dtf.format(newDateTime1));\r\n\r\n\t\tdtf = DateTimeFormatter.ofPattern(\"MMMM dd yyyy, hh:mm:ss\");\r\n\t\tSystem.out.println(dtf.format(newDateTime1));\r\n\t}", "public static void main(String[] args) {\n\t\tDate date=new Date(Long.parseLong(\"1438842265000\"));\n\t\tSystem.err.println(new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(date));\n\t}", "public Date date() {\n return new Date(this.msec);\n }", "public static Date createDate(int yyyy, int month, int day, int hour, int min) {\n/* 93 */ CALENDAR.clear();\n/* 94 */ CALENDAR.set(yyyy, month - 1, day, hour, min);\n/* 95 */ return CALENDAR.getTime();\n/* */ }", "private Date getTime(long millis){\n\tCalendar calender = Calendar.getInstance();\r\n\tcalender.setTimeInMillis(millis);\r\n\treturn calender.getTime();\r\n\t\r\n\t\r\n}", "@Test\n void test7(){\n\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date date = new Date();\n String dString = formatter.format(date);\n System.out.println(\"dString=\"+dString);\n\n Date datas = java.sql.Date.valueOf(dString);\n System.out.println(\"datas=\"+datas);\n\n\n }", "private Date getLowerTime(Date date){\n\t\tdate.setHours(0);\n\t\tdate.setMinutes(0);\n\t\tdate.setSeconds(0);\n\t\t\n\t\treturn date;\n\t}", "public void setDate(int date){\n this.date = date;\n }", "public Date(int d, int m, int a) {\n\t\tthis.dia = d;\n\t\tthis.mes = m;\n\t\tthis.ano = a;\n\t}", "public static Calendar m13184a() {\n Calendar instance = Calendar.getInstance();\n instance.set(11, 12);\n instance.set(12, C3792d.m14088c());\n instance.set(13, 0);\n return instance;\n }", "@Test\n public void addition_isCorrect() {\n\n long longDate = 20190620;\n\n String strDate = String.valueOf(longDate);\n\n int year = Integer.parseInt(strDate.substring(0, 4));\n int month = Integer.parseInt(strDate.substring(4, 6));\n int day = Integer.parseInt(strDate.substring(6, 8));\n\n assertEquals(2019, year);\n assertEquals(6, month);\n assertEquals(20, day);\n }", "public void convertStartDate(Date date) {\r\n startTime = new java.sql.Timestamp(date.getTime());\r\n }", "public Value(long millis) throws IllegalArgumentException {\n\n // Check preconditions\n if (millis < 0L) {\n throw new IllegalArgumentException(\"millis (\" + millis + \" < 0L\");\n }\n\n // Convert the number of milliseconds to a Date object\n java.util.Date date = new java.util.Date(millis);\n\n // Construct the Calendar\n _calendar = Calendar.getInstance();\n _calendar.setTime(date);\n }", "public Date(int m, int d, int y) {\r\n\t\tif (!isValid(m, d, y))\r\n\t\t\tthrow new RuntimeException(\"Invalid date\");\r\n\t\tmonth = m;\r\n\t\tday = d;\r\n\t\tyear = y;\r\n\t}", "private static Date getRandomDate(){\n Instant instant = Instant.now();\n long timeStampMillis = instant.toEpochMilli();\n long leftLimit = timeStampMillis - (1000 * 60 * 60 * 24 * 20);\n long rightLimit = timeStampMillis + (1000 * 60 * 60 * 24 * 20);\n return new Date(\n leftLimit + (long) (Math.random() * (rightLimit - leftLimit))\n );\n }", "@Test\n\tpublic void testDate4() {\n\t\ttry {\n\t\t\tfinal Date date = ParadoxDate.getDateFromParadoxDate(36161);\n\t\t\tfinal Calendar calendar = Calendar.getInstance();\n\t\t\tcalendar.setTime(date);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.DATE) == 2);\n\t\t\t// month is 0 indexed, so Jan is 0\n\t\t\tAssert.assertTrue(calendar.get(Calendar.MONTH) == 0);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.YEAR) == 100);\n\t\t} catch (final Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\t}", "public void setCreationDateLocal(Date date) {\r\n\t\toCreationDate = date ;\r\n\t}", "public static Long TimeToLong(Date date)\n\t{\n\t\tif(date==null)\n\t\t\treturn 0L;\n\t\t\n\t\treturn date.getTime();\n\t}", "DateConstant createDateConstant();", "public Sad(Date date){\n\t\tthis.date = date;\n\t}", "@Test\r\n\tpublic void testSetDate() {\n\t\tfail(\"Not yet implemented\");\r\n\t}", "public void setMinimumDate(Date date) {\n/* 665 */ ParamChecks.nullNotPermitted(date, \"date\");\n/* */ \n/* 667 */ Date maxDate = getMaximumDate();\n/* 668 */ long maxMillis = maxDate.getTime();\n/* 669 */ long newMinMillis = date.getTime();\n/* 670 */ if (maxMillis <= newMinMillis) {\n/* 671 */ Date oldMin = getMinimumDate();\n/* 672 */ long length = maxMillis - oldMin.getTime();\n/* 673 */ maxDate = new Date(newMinMillis + length);\n/* */ } \n/* 675 */ setRange(new DateRange(date, maxDate), true, false);\n/* 676 */ fireChangeEvent();\n/* */ }", "public void setCreateTime(Date createTime)\n/* */ {\n/* 184 */ this.createTime = createTime;\n/* */ }", "public Builder setSettlementDate(long value) {\n bitField0_ |= 0x00040000;\n settlementDate_ = value;\n onChanged();\n return this;\n }", "public void testGetDate() {\r\n assertEquals(test1.getDate(), 20200818);\r\n }", "Date getDate();", "Date getDate();", "Date getDate();", "public void setDate(Date date) {\r\n \t\tthis.startDate = date;\r\n \t}", "public long getDate()\r\n/* 204: */ {\r\n/* 205:309 */ return getFirstDate(\"Date\");\r\n/* 206: */ }", "public void setDate(Date date) {\n\t\n\t\tthis.date = date;\n\t\n\t}", "public Date(int day, Month month, int year){\n\tif (day > 0 && day <= month.nbJours(year)){\n\t this.day = day;\n\t}\t\n\tthis.month = month;\n\tif (year > 0){\n\t this.year = year;\n\t}\n }", "public static void main(String[] args) {\n int i =1;\n Integer m =2;\n m.byteValue();\n \n String str = \"123\";\n //字符串拼接\n System.out.println(str+1);\n \n //Integer的方法 把字符串转成int类型\n int num = Integer.parseInt(str);\n System.out.println(num+1);\n \n \n Integer a=1;\n Integer b=1;\n Integer c=128;\n Integer d=128;\n Integer e=-127;\n Integer f=-127;\n System.out.println(a==b);//true\n //Integer 在常量池中的取值范围是-128~127\n System.out.println(c==d);//false\n System.out.println(e==f);//true\n \n Date n=new Date();\n System.out.println(n);\n \n //月 MM\n //定义标准\n String pattern1 = \"yyyy-MM-dd-hh-mm-ss\";\n String pattern2 = \"yyyy-MM-dd hh:mm:ss\";\n //标准化\n SimpleDateFormat sdf = new SimpleDateFormat(pattern1);\n \n //把标准对实例化出来的日期n生效\n String timeStr = sdf.format(n);\n System.out.println(timeStr);\n \n// Random random =new Random();\n// System.out.println(random.nextInt(9));//【0,9)\n \n\n System.out.println(Math.random());//随机数\n System.out.println(Math.min(1, 2));//比较两个数大小\n System.out.println(Math.abs(-1));//取绝对值\n\t}", "private long getCurrentTimeInMillionSeconds(){\n Date currentData = new Date();\n return currentData.getTime();\n }", "void testDateSetDate(java.util.Date date, boolean validate) {\n if (date instanceof java.sql.Time) { return; } // java.sql.Time throws IllegalArgumentException in setDate().\n \n if (validate) {\n assertEqualDate(createDate(\"Feb 03, 2006\"), date);\n } else {\n synchronized (date) {\n date.setDate(3);\n }\n }\n }", "public void makeValidDate() {\n\t\tdouble jd = swe_julday(this.year, this.month, this.day, this.hour, SE_GREG_CAL);\n\t\tIDate dt = swe_revjul(jd, SE_GREG_CAL);\n\t\tthis.year = dt.year;\n\t\tthis.month = dt.month;\n\t\tthis.day = dt.day;\n\t\tthis.hour = dt.hour;\n\t}", "public Date(int m, int y) {\r\n\r\n\t\tif (!isValid(m, DAYS[m], y))\r\n\t\t\tthrow new RuntimeException(\"Invalid date; correct input\");\r\n\t\tmonth = m;\r\n\t\tday = DAYS[m];\r\n\t\tyear = y;\r\n\t}", "void setCreateDate(Date date);", "public static native JsDate create(int year, int month) /*-{\n return new Date(year, month);\n }-*/;" ]
[ "0.62131315", "0.6204954", "0.6125269", "0.6111394", "0.61026543", "0.6028856", "0.5941289", "0.59402883", "0.5926344", "0.58422464", "0.58409476", "0.58200246", "0.5806983", "0.5786367", "0.572818", "0.5723188", "0.57229346", "0.57189703", "0.57178503", "0.5717694", "0.56685585", "0.5579822", "0.55713874", "0.5499397", "0.54689884", "0.546235", "0.5458364", "0.54437435", "0.543831", "0.5422436", "0.54034275", "0.5377743", "0.53650177", "0.5364634", "0.53524244", "0.53232515", "0.5316287", "0.5315313", "0.53120446", "0.53067577", "0.52988976", "0.5288988", "0.52816415", "0.5260281", "0.5252755", "0.52518857", "0.5251767", "0.5242769", "0.52373266", "0.5234823", "0.52347755", "0.5227205", "0.5206751", "0.5199626", "0.51934", "0.51933944", "0.5193148", "0.51755023", "0.51738924", "0.51726896", "0.5172547", "0.5168717", "0.51619714", "0.515695", "0.514782", "0.5141535", "0.51382476", "0.5136299", "0.5135464", "0.513484", "0.51286906", "0.5127489", "0.51234996", "0.51231635", "0.5121914", "0.51130915", "0.51102096", "0.51076174", "0.50951606", "0.5092864", "0.5091092", "0.50824225", "0.5076318", "0.5067774", "0.50664616", "0.503599", "0.5033818", "0.5033818", "0.5033818", "0.5032315", "0.50263107", "0.50229377", "0.5022173", "0.5017093", "0.5012805", "0.5009547", "0.50062203", "0.5003808", "0.4999432", "0.4999086" ]
0.5628496
21
Returns the ARGB color used to tint the source pixels when this filter is applied.
@ColorInt public int getColor() { return mColor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic ARGBType get()\n\t{\n\t\tfillWeights();\n\n\t\tfinal int argb = target.get().get();\n\t\taccA = ( ( argb >> 24 ) & 0xff ) * weights[ 0 ];\n\t\taccR = ( ( argb >> 16 ) & 0xff ) * weights[ 0 ];\n\t\taccG = ( ( argb >> 8 ) & 0xff ) * weights[ 0 ];\n\t\taccB = ( argb & 0xff ) * weights[ 0 ];\n\n\t\tcode = 0;\n\t\tgraycodeFwdRecursive( n - 1 );\n\t\ttarget.bck( n - 1 );\n\n\t\tfinal int a = Math.min( 255, ( int ) Util.round( accA ) );\n\t\tfinal int r = Math.min( 255, ( int ) Util.round( accR ) );\n\t\tfinal int g = Math.min( 255, ( int ) Util.round( accG ) );\n\t\tfinal int b = Math.min( 255, ( int ) Util.round( accB ) );\n\n\t\taccumulator.set( ( ( ( ( ( a << 8 ) | r ) << 8 ) | g ) << 8 ) | b );\n\n\t\treturn accumulator;\n\t}", "RGB getOldColor();", "private Color getColor( float value ) {\n float[] rgba = (float[]) baseRgba_.clone();\n shader_.adjustRgba( rgba, value );\n return new Color( rgba[ 0 ], rgba[ 1 ], rgba[ 2 ], rgba[ 3 ] );\n }", "@Override\n Color getColor() {\n return new Color(32, 83, 226, 255);\n }", "public int filterRGB(int x, int y, int argb) {\n color = new Color(argb);\n newBlue = multColor(color.getBlue(), blueMultiplier);\n newGreen = multColor(color.getGreen(), greenMultiplier);\n newRed = multColor(color.getRed(), redMultiplier);\n newColor = new Color(newRed, newGreen, newBlue);\n return (newColor.getRGB());\n }", "public int getColor();", "public int getColor();", "String getColor();", "private Color getColor( float xval, float yval ) {\n float[] rgba = (float[]) baseRgba_.clone();\n if ( xFirst_ ) {\n xShader_.adjustRgba( rgba, xval );\n yShader_.adjustRgba( rgba, yval );\n }\n else {\n yShader_.adjustRgba( rgba, yval );\n xShader_.adjustRgba( rgba, xval );\n }\n return new Color( rgba[ 0 ], rgba[ 1 ], rgba[ 2 ], rgba[ 3 ] );\n }", "private int getFillColor() {\n \t\tint id = this.area.getMode() == GPSFilterMode.INCLUDE ? POLYGON_INCLUDE_FILL_COLOR : POLYGON_EXCLUDE_FILL_COLOR;\n \t\treturn adjustAlpha( this.getResources().getColor( id ), 255 * 0.5f );\n \t}", "java.awt.Color getColor();", "public int getTransparency() {\n/* 148 */ return this.bufImg.getColorModel().getTransparency();\n/* */ }", "private int getCurrentMainColor () {\n int translatedHue = 255 - ( int ) ( mCurrentHue * 255 / 360 );\n int index = 0;\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 255, 0, ( int ) i );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 255 - ( int ) i, 0, 255 );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 0, ( int ) i, 255 );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 0, 255, 255 - ( int ) i );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( ( int ) i, 255, 0 );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 255, 255 - ( int ) i, 0 );\n index++;\n }\n return Color.RED;\n }", "public Color getRefuteEdgeFadeSourceColor() {\n return (_refuteEdgeFadeSourceColor);\n }", "public Color4 getEffectColorAdd();", "private static int mixColors(float t, byte r1, byte g1, byte b1, byte a1, byte r2, byte g2, byte b2, byte a2) {\n final int r = lerp(t, r1, r2);\n final int g = lerp(t, g1, g2);\n final int b = lerp(t, b1, b2);\n final int a = lerp(t, a1, a2);\n return (r << 24) | (g << 16) | (b << 8) | a;\n }", "private native int grayToRgb(byte src[],int dst[]);", "public static int getColor(int r, int g, int b) {\r\n return 0xff000000 | (r << 16) | (g << 8) | b;\r\n }", "@Override\npublic Image operate (Image source)\n{\n final Image thresholdImage = NIVision\n .imaqCreateImage(ImageType.IMAGE_U8, 0);\n\n // @TODO: Store NIVision.Range instead of integers so we don't make a\n // new one every time.\n NIVision.imaqColorThreshold(thresholdImage, source, 255,\n NIVision.ColorMode.HSL, this.hueRange, this.satRange,\n this.lumRange);\n source.free();\n return thresholdImage;\n}", "public int toARGB() {\n return ((a & 255) << 24) |\n ((r & 255) << 16) |\n ((g & 255) << 8) |\n ((b & 255) );\n }", "private static Color tint(Color c, int tint) {\n int r = c.getRed();\n int g = c.getGreen();\n int b = c.getBlue();\n\n float ftint = tint / 100.0f;\n\n int red = Math.round(ftint * r + (1 - ftint) * 255);\n int green = Math.round(ftint * g + (1 - ftint) * 255);\n int blue = Math.round(ftint * b + (1 - ftint) * 255);\n\n return new Color(red, green, blue);\n }", "Color getColor();", "Color getColor();", "Color getColor();", "Color getColor();", "Color getColor();", "public int getColorInt () {\r\n return this.colorReturned;\r\n }", "int getHighLightColor();", "protected Color getAlphaCopy(Color copy, Color orig) {\r\n if (copy==null)\r\n copy = new Color(orig);\r\n copy.r = orig.r;\r\n copy.g = orig.g;\r\n copy.b = orig.b;\r\n copy.a = alphaFilter!=null ? alphaFilter.a : orig.a;\r\n return copy;\r\n }", "public abstract RGBIColor toRGBColor();", "RGB getNewColor();", "public static int color(int bg) {\n\t\tint alpha =\t((bg>>24)&0xFF);\n\t\tint red = \t((bg>>16)&0xFF);\n\t\tint green = ((bg>>8)&0xFF);\n\t\tint blue = \t((bg)&0xFF);\n\t\tdouble lum = ((0.2126*(red)+0.7152*(green)+0.0722*(blue))*((alpha)/255.0))/255.0;\n\t\tif(lum>0.35)\n\t\t\treturn 0xFF000000;//black\n\t\telse return 0xFFFFFFFF;//white\n\t}", "public int getColorValue() {\r\n\t\treturn color;\r\n\t}", "public int getRgbColor()\n {\n return _rgbColor;\n }", "public static int ARGB_Mean(int p) {\n int r = (p & 0xff0000) >> 16;\n int g = (p & 0xff00) >> 8;\n int b = p & 0xff;\n return MeanRGBtoGray(r, g, b);\n }", "public abstract int rgbColor(double u, double v);", "public final static int RGB2Grey(int argb) {\n int r = (argb >> 16) & 0xff;\n int g = (argb >> 8) & 0xff;\n int b = (argb) & 0xff;\n\n //int rgb=(0xff000000 | ((r<<16)&0xff0000) | ((g<<8)&0xff00) | (b&0xff));\n int y = (int) Math.round(0.299f * r + 0.587f * g + 0.114f * b);\n return y;\n }", "public int getColorAt(float index){\n\n\t\tint i = Math.round((img.width-1)*index);\n\t\tint c = img.get(i,0);\n\t\treturn c;\n\n\t}", "public int getColor() {\n \t\treturn color;\n \t}", "public int getColor(){\r\n\t\treturn color;\r\n\t}", "int getRed(int x, int y);", "public int getSkyColorByTemp(float par1)\n {\n par1 /= 3.0F;\n\n if (par1 < -1.0F)\n {\n par1 = -1.0F;\n }\n\n if (par1 > 1.0F)\n {\n par1 = 1.0F;\n }\n\n return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();\n }", "public Color getNodeStrokeSourceColor() {\n return (_nodeStrokeSourceColor);\n }", "int[] getStartRGB();", "public Color getColor();", "public Color getColor();", "public Color getColor();", "@Override\n public native Color getPixelColor(int x, int y);", "public static int getGreyscale(int argb){\n\t\tint red = argb & 0xff;\n\t\tint green = (argb >> 8) & 0xff;\n\t\tint blue = (argb >> 16) & 0xff;\n\t\tint avg = ((red + green + blue) / 3) & 0xff;\n\t\tint grey = (0xff << 24) + (avg << 16) + (avg << 8) + avg;\n\t\treturn grey;\n\t}", "@Override\n public void setColorFilter(ColorFilter colorFilter) {}", "int getTint(){\n return getPercentageValue(\"tint\");\n }", "public Integer getColor() {\n\t\treturn color;\n\t}", "int getColorOfTexture(BufferedImage bufferedImage, int blockY) {\n double brightnessMin = 0.85;\n double blockYCoordinateBrightnessChange = 0.0015;\n double brightnessMultiplier = TeraMath.clamp(brightnessMin + blockY * blockYCoordinateBrightnessChange, brightnessMin, 1);\n int r = 0;\n int g = 0;\n int b = 0;\n for (int x = 0; x < bufferedImage.getWidth(); ++x) {\n for (int y = 0; y < bufferedImage.getHeight(); ++y) {\n Color color = new Color(bufferedImage.getRGB(x, y));\n r += color.getRed();\n g += color.getGreen();\n b += color.getBlue();\n }\n }\n int imageSize = bufferedImage.getWidth() * bufferedImage.getHeight();\n r /= imageSize;\n r *= brightnessMultiplier;\n g /= imageSize;\n g *= brightnessMultiplier;\n b /= imageSize;\n b *= brightnessMultiplier;\n // get rid of the alpha because it is always 255\n return new Color(r, g, b).getRGB() & 0x00FFFFFF;\n }", "@ColorInt\n public int getColor() {\n return Color.HSVToColor(mColorHSV);\n }", "Color calcColor() {\n\n\t\tfloat r_f, g_f, b_f;\n\t\tint size = events.size();\n\n\t\tr_f = g_f = b_f = 0;\n\n\t\tIterator<Event> it = events.iterator();\n\t\tColorEvent event;\n\n\t\twhile ( it.hasNext() ) {\n\n\t\t\tevent = (ColorEvent) it.next();\n\t\t\tr_f += event.color.getRed() / size;\n\t\t\tg_f += event.color.getGreen() / size;\n\t\t\tb_f += event.color.getBlue() / size;\n\n\t\t}\n\n\t\treturn new Color((int) r_f, (int) g_f, (int) b_f);\n\t}", "public int getColor(){\n\t\treturn color;\n\t}", "public int getColor(){\n\t\treturn color;\n\t}", "public int getColor() {\n\t\treturn getMappedColor(color);\n\t}", "public abstract BossColor getColor();", "public Color getColor() {\r\n\t\treturn new Color(Color.HSBtoRGB(hsb[0], hsb[1], hsb[2]));\r\n\t}", "int getAsInt32Color(int a) {\r\n\t\tint r = (int) (x * 255);\r\n\t\tint g = (int) (y * 255);\r\n\t\tint b = (int) (z * 255);\r\n\t\tif (r > 255) {\r\n\t\t\tr = 255;\r\n\t\t}\r\n\t\tif (g > 255) {\r\n\t\t\tg = 255;\r\n\t\t}\r\n\t\tif (b > 255) {\r\n\t\t\tb = 255;\r\n\t\t}\r\n\r\n\t\tif (r < 0) {\r\n\t\t\tr = 0;\r\n\t\t}\r\n\t\tif (g < 0) {\r\n\t\t\tg = 0;\r\n\t\t}\r\n\t\tif (b < 0) {\r\n\t\t\tb = 0;\r\n\t\t}\r\n\r\n\t\treturn (b | g << 8 | r << 16 | a << 24);\r\n\t}", "protected final Color getColor() {\n\t\treturn tile.getColor();\n\t}", "public static int MeanRGBtoGray(int r, int g, int b) {\n return (r + b + g) / 3;\n }", "public int getColor() {\n return color;\n }", "@ColorInt\n public static int fetchPrimaryColor(Context context) {\n TypedValue typedValue = new TypedValue();\n\n TypedArray a =\n context.obtainStyledAttributes(typedValue.data, new int[]{R.attr.colorPrimary});\n int color = a.getColor(0, ContextCompat.getColor(context, android.R.color.holo_blue_light));\n\n a.recycle();\n\n return color;\n }", "public RGBColor getColor(){\r\n return this._color;\r\n }", "public synchronized Color getCurrentColor() {\n Color c0 = initialColor.cpy().mul(\n 1.0f - colorStateTime / COLOR_ANIMATION_DURATION);\n Color c1 = targetColor.cpy().mul(\n colorStateTime / COLOR_ANIMATION_DURATION);\n return c0.add(c1);\n }", "public Color getColor()\r\n\t{\r\n\t\treturn _g2.getColor();\r\n\t}", "public ColorCallback<DatasetContext> getColorCallback() {\n\t\treturn colorCallback;\n\t}", "public static int color(Context context) {\n\t\tSharedPreferences prefs = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tint bg = prefs.getInt(\"menu.background\", 0x7c000000);\n\t\tint alpha =\t((bg>>24)&0xFF);\n\t\tint red = \t((bg>>16)&0xFF);\n\t\tint green = ((bg>>8)&0xFF);\n\t\tint blue = \t((bg)&0xFF);\n\t\tdouble lum = ((0.2126*(red)+0.7152*(green)+0.0722*(blue))*((alpha)/255.0))/255.0;\n\t\tif(lum>0.35)\n\t\t\treturn 0xFF000000;//black\n\t\telse return 0xFFFFFFFF;//white\n\t}", "@Override\r\n\tpublic String getColor() {\n\t\treturn \"white\";\r\n\t}", "private int ditherPixel(int futurePixel, int quantError, double factor) {\n int futureRed, futureGreen, futureBlue, futureAlpha,\n quantRed, quantGreen, quantBlue, quantAlpha;\n\n quantRed = (int)(Color.red(quantError) * factor);\n quantGreen = (int)(Color.green(quantError) * factor);\n quantBlue = (int)(Color.blue(quantError) * factor);\n quantAlpha = (int)(Color.alpha(quantError));\n\n futureRed = Color.red(futurePixel);\n futureGreen = Color.green(futurePixel);\n futureBlue = Color.blue(futurePixel);\n futureAlpha = Color.alpha(futurePixel);\n\n// return Color.argb(futureAlpha, futureRed + quantRed, futureGreen + quantGreen, futureBlue + quantBlue);\n return Color.argb(futureAlpha, futureRed, futureGreen, futureBlue);\n }", "public int getColorIndex() {\n return colorIndex;\n }", "public Color brighter()\n {\n return color.brighter();\n }", "public static int weakRGB(int rgb,float alpha){\r\n\t\tif(alpha==1.0){\r\n\t\t\treturn rgb;\r\n\t\t}\r\n\t\t\r\n\t\tint a = (int)(alpha*0xff);\r\n\t\tint nrgb = 0xff000000;\r\n\t\tint r = a*((rgb&0x00ff0000)>>16); //red\r\n\t\tr/=0xff;\r\n\t\tnrgb += r<<16;\r\n\t\tr = a*((rgb&0x0000ff00)>>8); \t //green\r\n\t\tr/=0xff;\r\n\t\tnrgb+=r<<8;\r\n\t\tr = a*(rgb&0x000000ff); \t //blue\r\n\t\tr/=0xff;\r\n\t\tnrgb+=r;\r\n\t//\tnrgb+=0xff000000;\r\n\t\t\r\n\t\treturn nrgb;\r\n\t}", "public Color getColor()\r\n {\r\n return currentColor;\r\n }", "public Texture2D getColorTexture(int index)\n\t{\n\t\treturn mColorTextures[index];\n\t}", "void fill(int rgb);", "Color(double lowThreshold, double highThreshold){\n this.lowThreshold = lowThreshold;\n this.highThreshold = highThreshold;\n }", "public static int ARGB_NTSC(int p) {\n int r = (p & 0xff0000) >> 16;\n int g = (p & 0xff00) >> 8;\n int b = p & 0xff;\n return NTSCRGBtoGray(r, g, b);\n }", "public RGBColor () \r\n\t{\r\n\t\tr = 0; g = 0; b = 0;\r\n\t\tindex = (byte) Palm.WinRGBToIndex(this);\t\r\n\t}", "public native PixelPacket getBackgroundColor() throws MagickException;", "public String getColor() {\n\t\treturn null;\n\t}", "public int getColor() {\n return this.color;\n }", "int getClosestPalettePixel(int[] prgb);", "protected int getColor() {\n return Color.TRANSPARENT;\n }", "public HTColorImage(HTImage sourceImage) {\n\t\tthis(sourceImage.getImage());\n\t}", "public Color4 getEffectColorMul();", "@Override\n public Color getColor() {\n return color;\n }", "@Override\n\tpublic String getColor() {\n\t\treturn \"red\";\n\t}", "public synchronized Color scan(){\n \tcolorRGBSensor.fetchSample(sample, 0);\n color.setR(sample[0]*1024);\n color.setG(sample[1]*1024);\n color.setB(sample[2]*1024);\n return color;\n }", "public String getRawColor() {\n return (String)getAttributeInternal(RAWCOLOR);\n }", "public Color getNodeFadeSourceColor() {\n return (_nodeFadeSourceColor);\n }", "private static int colorToRGB(int alpha, int red, int green, int blue) {\n \n int newPixel = 0;\n newPixel += alpha; newPixel = newPixel << 8;\n newPixel += red; newPixel = newPixel << 8;\n newPixel += green; newPixel = newPixel << 8;\n newPixel += blue;\n \n return newPixel;\n }", "Color getBackgroundColor();", "public FloatBuffer getColorBuffer() {\n return this.colorBuffer;\n }", "public char getColor();", "public abstract RGBFColor toRGBFColor();", "public int getColor() {\r\n return Color;\r\n }", "public Color getCurrentColor();" ]
[ "0.58558315", "0.5810222", "0.5721642", "0.5638171", "0.5589022", "0.5522763", "0.5522763", "0.5344033", "0.5331323", "0.53247845", "0.5267001", "0.5238026", "0.5225344", "0.5215421", "0.5202892", "0.51857865", "0.5185019", "0.5177531", "0.5175257", "0.5169598", "0.516854", "0.51670665", "0.51670665", "0.51670665", "0.51670665", "0.51670665", "0.515754", "0.51558596", "0.5137133", "0.51360875", "0.5128038", "0.5122752", "0.5101515", "0.5094039", "0.508584", "0.5080133", "0.5057093", "0.5052995", "0.50441945", "0.50406885", "0.50215846", "0.50203484", "0.5018791", "0.50156593", "0.5010312", "0.5010312", "0.5010312", "0.5004266", "0.49979228", "0.49847832", "0.49770293", "0.49730235", "0.49672917", "0.496639", "0.49597868", "0.4958086", "0.4958086", "0.49467602", "0.49335653", "0.49223632", "0.49162668", "0.49136811", "0.49094573", "0.49076974", "0.4907655", "0.49036407", "0.4902339", "0.49009526", "0.49008602", "0.48983714", "0.4888896", "0.48805517", "0.48647717", "0.4864589", "0.48505366", "0.48398182", "0.4837042", "0.4834225", "0.48263395", "0.48216218", "0.48162845", "0.48153317", "0.47921798", "0.47888067", "0.47852528", "0.4778427", "0.477694", "0.4768014", "0.47674522", "0.47672117", "0.47632807", "0.47610143", "0.4760796", "0.47602844", "0.47505257", "0.474597", "0.4744435", "0.4742416", "0.47414157", "0.4741401" ]
0.4787882
84
Returns the PorterDuff mode used to composite this color filter's color with the source pixel when this filter is applied.
public BlendMode getMode() { return mMode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PorterDuffColorFilter m16835OooO00o(int i, PorterDuff.Mode mode) {\n return (PorterDuffColorFilter) get(Integer.valueOf(OooO00o(i, mode)));\n }", "public ColorMode getColorMode() {\n\t\treturn getValue(Property.COLOR_MODE, ColorMode.values(), ColorMode.GRADIENT);\n\t}", "public @ColorMode int getColorModes() {\n return mColorModes;\n }", "public int getSourceMode() {\n return _mode;\n }", "public interface ColorMode {\n\n\tString primaryColor();\n\tString secondaryColor();\n\tString accentsColor();\n}", "public FloatBuffer getColorBuffer() {\n return this.colorBuffer;\n }", "private static int blendByte(int colChannelSrc, int colChannelDest, BlendMode mode) {\n int result;\n switch (mode) {\n case kBlendModeMultiply:\n result = multiplyBlendByte(colChannelSrc, colChannelDest);\n break;\n case kBlendModeScreen:\n result = screenBlendByte(colChannelSrc, colChannelDest);\n break;\n case kBlendModeOverlay:\n result = overlayBlendByte(colChannelSrc, colChannelDest);\n break;\n case kBlendModeDarken:\n result = darkenBlendByte(colChannelSrc, colChannelDest);\n break;\n case kBlendModeLighten:\n result = lightenBlendByte(colChannelSrc, colChannelDest);\n break;\n case kBlendModeColorDodge:\n result = colorDodgeBlendByte(colChannelSrc, colChannelDest);\n break;\n case kBlendModeColorBurn:\n result = colorBurnBlendByte(colChannelSrc, colChannelDest);\n break;\n case kBlendModeHardLight:\n result = hardLightBlendByte(colChannelSrc, colChannelDest);\n break;\n case kBlendModeSoftLight:\n result = softLightBlendByte(colChannelSrc, colChannelDest);\n break;\n case kBlendModeDifference:\n result = differenceBlendByte(colChannelSrc, colChannelDest);\n break;\n case kBlendModeExclusion:\n result = exclusionBlendByte(colChannelSrc, colChannelDest);\n break;\n case kBlendModeNormal:\n default:\n result = normalBlendByte(colChannelSrc, colChannelDest);\n }\n return result;\n }", "public int getColor();", "public int getColor();", "public int getFilterMode(){ return mFilterMode;}", "@Override\n\t\t\tpublic void setColorFilter(ColorFilter cf) {\n\t\t\t\t\n\t\t\t}", "public char getColor();", "public IsColor getColorTo() {\n\t\treturn ColorBuilder.parse(getColorToAsString());\n\t}", "public void updateFilter() {\n Texture2dProgram.ProgramType programType;\n float[] kernel = null;\n float colorAdj = 0.0f;\n\n Log.d(TAG, \"Updating filter to \" + mNewFilter);\n switch (mNewFilter) {\n case CameraActivity.FILTER_NONE:\n programType = Texture2dProgram.ProgramType.TEXTURE_EXT;\n break;\n case CameraActivity.FILTER_BLACK_WHITE:\n // (In a previous version the TEXTURE_EXT_BW variant was enabled by a flag called\n // ROSE_COLORED_GLASSES, because the shader set the red channel to the B&W color\n // and green/blue to zero.)\n programType = Texture2dProgram.ProgramType.TEXTURE_EXT_BW;\n break;\n case CameraActivity.FILTER_BLUR:\n programType = Texture2dProgram.ProgramType.TEXTURE_EXT_FILT;\n kernel = new float[] {\n 1f/16f, 2f/16f, 1f/16f,\n 2f/16f, 4f/16f, 2f/16f,\n 1f/16f, 2f/16f, 1f/16f };\n break;\n case CameraActivity.FILTER_SHARPEN:\n programType = Texture2dProgram.ProgramType.TEXTURE_EXT_FILT;\n kernel = new float[] {\n 0f, -1f, 0f,\n -1f, 5f, -1f,\n 0f, -1f, 0f };\n break;\n case CameraActivity.FILTER_EDGE_DETECT:\n programType = Texture2dProgram.ProgramType.TEXTURE_EXT_FILT;\n kernel = new float[] {\n -1f, -1f, -1f,\n -1f, 8f, -1f,\n -1f, -1f, -1f };\n break;\n case CameraActivity.FILTER_EMBOSS:\n programType = Texture2dProgram.ProgramType.TEXTURE_EXT_FILT;\n kernel = new float[] {\n 2f, 0f, 0f,\n 0f, -1f, 0f,\n 0f, 0f, -1f };\n colorAdj = 0.5f;\n break;\n default:\n throw new RuntimeException(\"Unknown filter mode \" + mNewFilter);\n }\n\n // Do we need a whole new program? (We want to avoid doing this if we don't have\n // too -- compiling a program could be expensive.)\n if (programType != mFullScreen.getProgram().getProgramType()) {\n mFullScreen.changeProgram(new Texture2dProgram(programType));\n // If we created a new program, we need to initialize the texture width/height.\n mIncomingSizeUpdated = true;\n }\n\n // Update the filter kernel (if any).\n if (kernel != null) {\n mFullScreen.getProgram().setKernel(kernel, colorAdj);\n }\n\n mCurrentFilter = mNewFilter;\n }", "@Override\n\tpublic void setColorFilter(ColorFilter cf) {\n\n\t}", "public short getColor() {\n\t\treturn this.color;\n\t}", "public int getColor() {\n\t\treturn getMappedColor(color);\n\t}", "public int colorLevelDifference(Pixel p){\n return Math.abs(p.getColor().getGrayLevel() - this.getColor().getGrayLevel());\n }", "public ColorCallback<DatasetContext> getColorCallback() {\n\t\treturn colorCallback;\n\t}", "@Override\n public void setColorFilter(ColorFilter colorFilter) {}", "java.awt.Color getColor();", "public Color4 getEffectColorMul();", "public static Bitmap performBlending(Bitmap source, Bitmap destination, Bitmap result, BlendMode mode) {\n int width = Math.min(source.getWidth(), destination.getWidth());\n int height = Math.min(source.getHeight(), destination.getHeight());\n final int[] srcPixels = new int[width * height];\n final int[] destPixels = new int[width * height];\n final int[] resultPixels = new int[width * height];\n\n final float[] sourceHsl = new float[3];\n final float[] destinationHsl = new float[3];\n final float[] resultHsl = new float[3];\n\n source.getPixels(srcPixels, 0, width, 0, 0, width, height);\n destination.getPixels(destPixels, 0, width, 0, 0, width, height);\n\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n int rgbS = srcPixels[y * width + x];\n int aS = Color.alpha(rgbS);\n\n int rgbD = destPixels[y * width + x];\n int aD = Color.alpha(rgbD);\n\n int blendAlpha = aS + aD - Math.round((aS * aD) / 255f);\n int blendColor = blendPixels(blendAlpha, rgbS, rgbD, sourceHsl, destinationHsl, resultHsl, mode);\n\n resultPixels[y * width + x] = (blendAlpha << 24) | blendColor;\n }\n }\n\n result.setPixels(resultPixels, 0, result.getWidth(), 0, 0, result.getWidth(), result.getHeight());\n return result;\n }", "Color getColor();", "Color getColor();", "Color getColor();", "Color getColor();", "Color getColor();", "public CamMode getCamMode() {\n NetworkTableEntry camMode = m_table.getEntry(\"camMode\");\n double cam = camMode.getDouble(0.0);\n CamMode mode = CamMode.getByValue(cam);\n return mode;\n }", "public float saturation() {\n int r = (color >> 16) & 0xFF;\n int g = (color >> 8) & 0xFF;\n int b = color & 0xFF;\n\n\n int V = Math.max(b, Math.max(r, g));\n int temp = Math.min(b, Math.min(r, g));\n\n float S;\n\n if (V == temp) {\n S = 0;\n } else {\n S = (V - temp) / (float) V;\n }\n\n return S;\n }", "private Color getColor( float value ) {\n float[] rgba = (float[]) baseRgba_.clone();\n shader_.adjustRgba( rgba, value );\n return new Color( rgba[ 0 ], rgba[ 1 ], rgba[ 2 ], rgba[ 3 ] );\n }", "public Mode getMode() {\n\t\tPointer mode_ptr = binding_tv.get_type_mode(ptr);\n\t\tif (mode_ptr == null)\n\t\t\treturn null;\n\t\treturn new Mode(mode_ptr);\n\t}", "public native int getFilter() throws MagickException;", "public static Vector4f oppositeBlackOrWhite(Vector4f color, Vector4f targetColor) {\n if (color.w == 0) {\n return ColorConstants.gray();\n }\n if ((color.x * 0.299f + color.y * 0.587f + color.z * 0.114f) > 170f / 255f) {\n targetColor.x = 0;\n targetColor.y = 0;\n targetColor.z = 0;\n } else {\n targetColor.x = 1;\n targetColor.y = 1;\n targetColor.z = 1;\n }\n return targetColor;\n }", "@Override\n public boolean getPaintFilterBitmap() {\n return mPaintFilterBitmap;\n }", "@Override\r\n\t\tpublic void setColorFilter(ColorFilter cf)\r\n\t\t{\n\t\t\t\r\n\t\t}", "public ByteBuffer getColorBuffer() {\n if (colorBuf == null){\n \tcolorBuf = ByteBuffer.allocateDirect(getIndicesBuffer().limit()*4*4);\n \tcolorBuf.order(ByteOrder.nativeOrder());\n \tFloatBuffer fb = colorBuf.asFloatBuffer();\n \tfor (int i=0; i<getIndicesBuffer().limit(); i++){\n \t\tfb.put(defaultColor);\n \t}\n\t\t\tcolorBuf.position(0);\n }\n \treturn colorBuf;\n }", "public Color getSupportEdgeFadeSourceColor() {\n return (_supportEdgeFadeSourceColor);\n }", "int getColorDepth();", "B filteringMode(FilteringMode filteringMode);", "public int getMode1Pixel(int x, int y) {\n assert ((x >= 0) && (x < 320)) && ((y >= 0) && (y < 200));\n\n int pos = (80 * y) + (x >>> 2);\n return unpackPixelMode1(screenBuffer[pos], (x & 0x03));\n }", "String getColor();", "@Override\n public native Color getPixelColor(int x, int y);", "@UnsupportedAppUsage\r\n public PorterDuffColorFilter updateTintFilter(PorterDuffColorFilter tintFilter, ColorStateList tint, Mode tintMode) {\r\n if (tint == null || tintMode == null) {\r\n return null;\r\n }\r\n int color = tint.getColorForState(getState(), 0);\r\n if (tintFilter != null && tintFilter.getColor() == color && tintFilter.getMode() == tintMode) {\r\n return tintFilter;\r\n }\r\n return new PorterDuffColorFilter(color, tintMode);\r\n }", "@Override\n\tpublic ARGBType get()\n\t{\n\t\tfillWeights();\n\n\t\tfinal int argb = target.get().get();\n\t\taccA = ( ( argb >> 24 ) & 0xff ) * weights[ 0 ];\n\t\taccR = ( ( argb >> 16 ) & 0xff ) * weights[ 0 ];\n\t\taccG = ( ( argb >> 8 ) & 0xff ) * weights[ 0 ];\n\t\taccB = ( argb & 0xff ) * weights[ 0 ];\n\n\t\tcode = 0;\n\t\tgraycodeFwdRecursive( n - 1 );\n\t\ttarget.bck( n - 1 );\n\n\t\tfinal int a = Math.min( 255, ( int ) Util.round( accA ) );\n\t\tfinal int r = Math.min( 255, ( int ) Util.round( accR ) );\n\t\tfinal int g = Math.min( 255, ( int ) Util.round( accG ) );\n\t\tfinal int b = Math.min( 255, ( int ) Util.round( accB ) );\n\n\t\taccumulator.set( ( ( ( ( ( a << 8 ) | r ) << 8 ) | g ) << 8 ) | b );\n\n\t\treturn accumulator;\n\t}", "public Color brighter()\n {\n return color.brighter();\n }", "public MaskMode mo23052a() {\n return this.f12739a;\n }", "public ColorFilter(Color color) {\r\n this.color = color;\r\n }", "Color calcColor() {\n\n\t\tfloat r_f, g_f, b_f;\n\t\tint size = events.size();\n\n\t\tr_f = g_f = b_f = 0;\n\n\t\tIterator<Event> it = events.iterator();\n\t\tColorEvent event;\n\n\t\twhile ( it.hasNext() ) {\n\n\t\t\tevent = (ColorEvent) it.next();\n\t\t\tr_f += event.color.getRed() / size;\n\t\t\tg_f += event.color.getGreen() / size;\n\t\t\tb_f += event.color.getBlue() / size;\n\n\t\t}\n\n\t\treturn new Color((int) r_f, (int) g_f, (int) b_f);\n\t}", "public short getColor()\n {\n return font.getColorPaletteIndex();\n }", "@DISPID(1611006088) //= 0x60060088. The runtime will prefer the VTID if present\n @VTID(163)\n boolean trueColorMode();", "public int getColor(){\r\n\t\treturn color;\r\n\t}", "public float c() {\n if (this.f3465c) {\n return BitmapDescriptorFactory.HUE_RED;\n }\n com.airbnb.lottie.g.a g2 = g();\n if (g2.d()) {\n return BitmapDescriptorFactory.HUE_RED;\n }\n return (this.f3467e - g2.b()) / (g2.c() - g2.b());\n }", "protected int toProcessingColor(int color) {\r\n\t\treturn this.pa.color(this.pa.red(color), this.pa.green(color), this.pa.blue(color));\r\n\t}", "public BlendModeColorFilter updateBlendModeFilter(BlendModeColorFilter blendFilter, ColorStateList tint, BlendMode blendMode) {\r\n if (tint == null || blendMode == null) {\r\n return null;\r\n }\r\n int color = tint.getColorForState(getState(), 0);\r\n if (blendFilter != null && blendFilter.getColor() == color && blendFilter.getMode() == blendMode) {\r\n return blendFilter;\r\n }\r\n return new BlendModeColorFilter(color, blendMode);\r\n }", "public abstract RGBFColor toRGBFColor();", "private int mapTextureFilterMode(int filterModeIndex) {\r\n\t\tswitch (filterModeIndex) {\r\n\t\tcase 1:\r\n\t\t\treturn GL11.GL_NEAREST;\r\n\t\tdefault:\r\n\t\t\treturn GL11.GL_LINEAR;\r\n\t\t}\r\n\t}", "public int getColorValue() {\r\n\t\treturn color;\r\n\t}", "public Color getRefuteEdgeFadeSourceColor() {\n return (_refuteEdgeFadeSourceColor);\n }", "public String getExplanation()\n { \n StringBuilder r = new StringBuilder(\"Source \");\n if (porterDuff2.equals(\" \")) r.append(\"clears\");\n if (porterDuff2.equals(\" S\")) r.append(\"overwrites\");\n if (porterDuff2.equals(\"DS\")) r.append(\"blends with\");\n if (porterDuff2.equals(\" D\")) r.append(\"alpha modifies\");\n if (porterDuff2.equals(\"D \")) r.append(\"alpha complement modifies\");\n if (porterDuff2.equals(\"DD\")) r.append(\"does not affect\");\n r.append(\" destination\");\n if (porterDuff1.equals(\" S\")) r.append(\" and overwrites empty pixels\");\n r.append(\".\");\n return r.toString();\n }", "public int getColor(){\n\t\treturn color;\n\t}", "public int getColor(){\n\t\treturn color;\n\t}", "public int bitsOfFilter() {\n return config().getM();\n }", "public int getColorInt () {\r\n return this.colorReturned;\r\n }", "public LedMode getLEDMode() {\n NetworkTableEntry ledMode = m_table.getEntry(\"ledMode\");\n double led = ledMode.getDouble(0.0);\n LedMode mode = LedMode.getByValue(led);\n return mode;\n }", "@Override\n public String getGlobalCompositeOperation() {\n return graphicsEnvironmentImpl.getGlobalCompositeOperation(canvas);\n }", "public Color getColor() {\n\t\treturn (Color)p.getPaint();\n\t}", "public void useFilter() {\r\n\t\t\tif(src.channels() > 1) {\r\n\t\t\t\tImgproc.cvtColor(src, bwsrc, Imgproc.COLOR_BGR2GRAY);\r\n\t\t\t\tdst = new Mat(bwsrc.size(),CvType.CV_8U);\r\n\t\t\t\tfor(int i = 0; i<bwsrc.rows();i++) {\r\n\t\t\t\t\tfor(int j = 0; j <bwsrc.cols();j++) {\r\n\t\t\t\t\t\tif(bwsrc.get(i,j)[0]>=t) {\r\n\t\t\t\t\t\t\tdst.put(i, j, 255);\r\n\t\t\t\t\t\t}else dst.put(i, j, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else {\r\n\t\t\t\tdst = new Mat(src.size(),CvType.CV_8U);\r\n\t\t\t\tfor(int i = 0; i<src.rows();i++) {\r\n\t\t\t\t\tfor(int j = 0; j <src.cols();j++) {\r\n\t\t\t\t\t\tif(src.get(i,j)[0]>=t) {\r\n\t\t\t\t\t\t\tdst.put(i, j, 255);\r\n\t\t\t\t\t\t}else dst.put(i, j, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public Color getDevColor() {\r\n\t\t// System.out.println(\"Getting \" + n);\r\n\t\treturn (value.getDevColor());\r\n\t}", "public java.lang.Float getConvolution() {\n return convolution;\n }", "public int getColor() {\n \t\treturn color;\n \t}", "public ColorDef getOnColor() {\n return onColor;\n }", "public static int getComplimentColor(int color) {\n // get existing colors\n int alpha = Color.alpha(color);\n int red = Color.red(color);\n int blue = Color.blue(color);\n int green = Color.green(color);\n\n // find compliments\n red = (~red) & 0xff;\n blue = (~blue) & 0xff;\n green = (~green) & 0xff;\n\n return Color.argb(alpha, red, green, blue);\n }", "private int ditherPixel(int futurePixel, int quantError, double factor) {\n int futureRed, futureGreen, futureBlue, futureAlpha,\n quantRed, quantGreen, quantBlue, quantAlpha;\n\n quantRed = (int)(Color.red(quantError) * factor);\n quantGreen = (int)(Color.green(quantError) * factor);\n quantBlue = (int)(Color.blue(quantError) * factor);\n quantAlpha = (int)(Color.alpha(quantError));\n\n futureRed = Color.red(futurePixel);\n futureGreen = Color.green(futurePixel);\n futureBlue = Color.blue(futurePixel);\n futureAlpha = Color.alpha(futurePixel);\n\n// return Color.argb(futureAlpha, futureRed + quantRed, futureGreen + quantGreen, futureBlue + quantBlue);\n return Color.argb(futureAlpha, futureRed, futureGreen, futureBlue);\n }", "public List<BlendModeEnum> getBlendMode(\n )\n {return blendMode;}", "public Color getColor();", "public Color getColor();", "public Color getColor();", "public int getMode()\r\n {\r\n Bundle b = getArguments();\r\n return b.getInt(PARAM_MODE);\r\n }", "public Color getSupportEdgeFadeDestinationColor() {\n return (_supportEdgeFadeDestinationColor);\n }", "public java.lang.Float getConvolution() {\n return convolution;\n }", "public ImageFilter getFilter() {\r\n\t\treturn filter;\r\n\t}", "public UI_MODE mode() { \n if (filter_rbmi.isSelected()) return UI_MODE.FILTER;\n else if (edgelens_rbmi.isSelected()) return UI_MODE.EDGELENS;\n else if (timeline_rbmi.isSelected()) return UI_MODE.TIMELINE;\n else return UI_MODE.EDIT;\n }", "public static int getWarrentyModeFilter() {\r\n return warrentyModeFilter;\r\n }", "public void set16BitMode() {\n/* 111 */ this.dstPixelFormat = 32859;\n/* */ }", "public int getBlue(Object inData) {\n if (is_sRGB) {\n boolean needAlpha = (supportsAlpha && isAlphaPremultiplied);\n int alp = 0;\n int blue = 0;\n switch (transferType) {\n case DataBuffer.TYPE_BYTE:\n byte bdata[] = (byte[])inData;\n blue = bdata[2] & 0xff;\n if (needAlpha) {\n alp = bdata[numColorComponents] & 0xff;\n }\n break;\n case DataBuffer.TYPE_USHORT:\n short sdata[] = (short[])inData;\n blue = sdata[2] & 0xffff;\n if (needAlpha) {\n alp = sdata[numColorComponents] & 0xffff;\n }\n break;\n case DataBuffer.TYPE_INT:\n int idata[] = (int[])inData;\n blue = idata[2];\n if (needAlpha) {\n alp = idata[numColorComponents];\n }\n break;\n default:\n throw new\n UnsupportedOperationException(\"This method has not \"+\n \"been implemented for transferType \" + transferType);\n }\n if (nBits[2] != 8) {\n int shift = nBits[2] - 8;\n return ((shift > 0) \n ? (blue>>shift)\n : (blue<<(-shift)));\n }\n if (needAlpha) {\n return (alp != 0)\n ? (int) (blue*((1<<nBits[numColorComponents])-1.f)/alp)\n : 0;\n }\n else {\n return blue;\n }\n }\n // REMIND: possible grayscale optimization here\n // else if (colorSpaceType == ColorSpace.TYPE_GRAY) {\n // return getGray(inData);\n // }\n\n int pixel[];\n if (inData instanceof int[]) {\n pixel = (int[])inData;\n } else {\n pixel = DataBuffer.toIntArray(inData);\n if (pixel == null) {\n throw new UnsupportedOperationException(\"This method has not been \"+\n \"implemented for transferType \" + transferType);\n }\n }\n\n // Normalize the pixel in order to convert it\n float[] norm = getNormalizedComponents(pixel, 0, null, 0);\n // Note that getNormalizedComponents returns non-premultiplied values\n float[] rgb = colorSpace.toRGB(norm);\n return (int) (rgb[2] * 255.0f);\n }", "@Override\npublic Image operate (Image source)\n{\n final Image thresholdImage = NIVision\n .imaqCreateImage(ImageType.IMAGE_U8, 0);\n\n // @TODO: Store NIVision.Range instead of integers so we don't make a\n // new one every time.\n NIVision.imaqColorThreshold(thresholdImage, source, 255,\n NIVision.ColorMode.HSL, this.hueRange, this.satRange,\n this.lumRange);\n source.free();\n return thresholdImage;\n}", "private native int grayToRgb(byte src[],int dst[]);", "public GameColor getColor();", "public ColorPlus binary() {\n\t\tint r = this.getRed();\n\t\tint g = this.getGreen();\n\t\tint b = this.getBlue();\n\t\t\n\t\tint cSum = r + g + b;\n\t\tif (cSum >= 382) {\n\t\t\tr = 0;\n\t\t\tg = 0;\n\t\t\tb = 0;\n\t\t}else{\n\t\t\tr = 255;\n\t\t\tg = 255;\n\t\t\tb = 255;\n\t\t}\n\t\treturn new ColorPlus(r,g,b); \n\t}", "int getHighLightColor();", "public Color darker()\n {\n return color.darker();\n }", "public int getColor()\r\n {\r\n return m_iColor;\r\n }", "private Bitmap m6552d() {\n if (this.f5072i == null) {\n this.f5072i = m6555f();\n }\n return this.f5072i;\n }", "@Override\n Color getColor() {\n return new Color(32, 83, 226, 255);\n }", "public int getColor() {\n return this.color;\n }", "private static Color[][] toConvolved(PixelSelector ps, double[][] currentFilter) {\n\t\tColor[][] toReturn = new Color[(ps.getWidth() - 1) / ACTUAL_SIZE][(ps.getHeight() - 1) / ACTUAL_SIZE];\n\t\t//For each pixel\n\t\tfor (int x = 0; x < toReturn.length; x++) {\n\t\t\tfor (int y = 0; y < toReturn[x].length; y++) {\n\t\t\t\t//Add up all the pixels in the area, then multiply them by the filter and produce a new pixel to return\n\t\t\t\tColor total = new Color(0, 0, 0);\n\t\t\t\tfor (int i = x; i < x + FILTER_SIZE; i++) {\n\t\t\t\t\tfor (int j = y; j < y + FILTER_SIZE; j++) {\n\t\t\t\t\t\ttotal = add(multiply(ps.getPixel((x * ACTUAL_SIZE) + (i - x), (y * ACTUAL_SIZE) + (j - y)), currentFilter[i - x][j - y]), total);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttoReturn[x][y] = total;\n\t\t\t}\n\t\t}\n\t\treturn toReturn;\n\t}", "public Color4 getEffectColorAdd();", "public int getColor() {\n return color;\n }", "private int getFillColor() {\n \t\tint id = this.area.getMode() == GPSFilterMode.INCLUDE ? POLYGON_INCLUDE_FILL_COLOR : POLYGON_EXCLUDE_FILL_COLOR;\n \t\treturn adjustAlpha( this.getResources().getColor( id ), 255 * 0.5f );\n \t}" ]
[ "0.588871", "0.55224544", "0.53754795", "0.5026153", "0.49828458", "0.4865698", "0.48247856", "0.46902686", "0.46902686", "0.46457362", "0.46295303", "0.46240708", "0.4592271", "0.456255", "0.45569605", "0.45527792", "0.45467854", "0.452382", "0.45183012", "0.45164287", "0.4515678", "0.44799972", "0.44769657", "0.44753563", "0.44753563", "0.44753563", "0.44753563", "0.44753563", "0.44651195", "0.4449447", "0.44406074", "0.44341183", "0.4430629", "0.44215363", "0.4415533", "0.44045138", "0.43976113", "0.43849292", "0.43834907", "0.43833384", "0.43727785", "0.43695143", "0.4361003", "0.43400183", "0.43356076", "0.43345723", "0.4326532", "0.43156376", "0.43151608", "0.43093047", "0.43092746", "0.43077523", "0.43007386", "0.42933375", "0.42816707", "0.4280814", "0.42777506", "0.42729598", "0.42728454", "0.4272141", "0.42631274", "0.42631274", "0.42630774", "0.42615113", "0.4255301", "0.4252258", "0.4251119", "0.42505202", "0.42502844", "0.4241949", "0.4232132", "0.42318523", "0.42308247", "0.42266813", "0.42251462", "0.42202502", "0.42202502", "0.42202502", "0.4219941", "0.42188054", "0.4217619", "0.42164603", "0.42142695", "0.42110494", "0.42102394", "0.42059183", "0.41996735", "0.4199344", "0.41975227", "0.41933194", "0.41918257", "0.4189558", "0.41875458", "0.4186521", "0.4184485", "0.41795796", "0.4178196", "0.417442", "0.41684994", "0.41609982" ]
0.5219442
3
This is a base class constructor for a SECSItem. When using this constructor, the outbound number of length bytes will be set to the minimum number required to handle an item with the length that is specified by the value of the length parameter. This constructor sets the following base class attributes from the provided data: formatCode lengthInBytes outboundNumberOfLengthBytes
protected SECSItem(SECSItemFormatCode formatCode, int lengthInBytes) { if (lengthInBytes < 0 || lengthInBytes > 0x00FFFFFF) { throw new IllegalArgumentException( "The value for the length argument must be between 0 and 16777215 inclusive."); } this.formatCode = formatCode; this.lengthInBytes = lengthInBytes; outboundNumberOfLengthBytes = calculateMinimumNumberOfLengthBytes(lengthInBytes); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected SECSItem(SECSItemFormatCode formatCode, int length, SECSItemNumLengthBytes desiredNumberOfLengthBytes)\n {\n this.formatCode = formatCode;\n lengthInBytes = length;\n setOutboundNumberOfLengthBytes(length, desiredNumberOfLengthBytes);\n }", "protected SECSItem(byte[] data, int itemOffset)\n {\n if (data == null)\n {\n throw new IllegalArgumentException(\"\\\"data\\\" argument must not be null.\");\n }\n \n if (data.length < 2)\n {\n throw new IllegalArgumentException(\"\\\"data\\\" argument must have a length >= 2.\");\n }\n\n formatCode = SECSItemFormatCode.getSECSItemFormatCodeFromNumber((byte)((data[itemOffset] >> 2) & 0x0000003F));\n \n byte[] temp1 = new byte[4];\n switch(data[itemOffset] & 0x03) // Extract the number of length bytes from the message\n {\n case 0:\n throw new IllegalArgumentException(\"The number of length bytes is not allowed to be ZERO.\");\n case 1:\n inboundNumberOfLengthBytes = SECSItemNumLengthBytes.ONE;\n outboundNumberOfLengthBytes = inboundNumberOfLengthBytes;\n \n temp1[0] = 0;\n temp1[1] = 0;\n temp1[2] = 0;\n temp1[3] = data[itemOffset+1];\n break;\n case 2:\n inboundNumberOfLengthBytes = SECSItemNumLengthBytes.TWO;\n outboundNumberOfLengthBytes = inboundNumberOfLengthBytes;\n if (data.length < 3)\n {\n throw new IllegalArgumentException(\"With two length bytes the minimum length for the \\\"data\\\" argument is 3.\");\n }\n\n temp1[0] = 0;\n temp1[1] = 0;\n temp1[2] = data[itemOffset+1];\n temp1[3] = data[itemOffset+2];\n break;\n case 3:\n inboundNumberOfLengthBytes = SECSItemNumLengthBytes.THREE;\n outboundNumberOfLengthBytes = inboundNumberOfLengthBytes;\n if (data.length < 4)\n {\n throw new IllegalArgumentException(\"With three length bytes the minimum length for the \\\"data\\\" argument is 4.\");\n }\n\n temp1[0] = 0;\n temp1[1] = data[itemOffset+1];\n temp1[2] = data[itemOffset+2];\n temp1[3] = data[itemOffset+3];\n break;\n }\n\n ByteBuffer buf = ByteBuffer.wrap(temp1);\n buf.order(ByteOrder.BIG_ENDIAN);\n lengthInBytes = buf.getInt();\n }", "public ItemSerializer(int size) {\n this(size, SerializerOutputType.RAW);\n }", "public OctopusCollectedMsg(int data_length) {\n super(data_length);\n amTypeSet(AM_TYPE);\n }", "protected BaseAuroraDataBuffer(long length) {\n this(length, true);\n }", "public TextObjectBaseRecord(short id, short size, byte [] data)\n {\n super(id, size, data);\n \n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:55:06.822 -0500\", hash_original_method = \"2D2F8FB9FD0DE4D4C70B238FD2D4C88B\", hash_generated_method = \"CFB81A0992BCD18B37272999971C8572\")\n \npublic ContentLength(int length) {\n super(NAME);\n this.contentLength = Integer.valueOf(length);\n }", "public void setOutboundNumberOfLengthBytes(int length, SECSItemNumLengthBytes desiredNumberOfLengthBytes)\n {\n if (length < 0 || length > 0x00FFFFFF)\n {\n throw new IllegalArgumentException(\n \"The value for the length argument must be between 0 and 16777215 inclusive.\");\n }\n\n outboundNumberOfLengthBytes = calculateMinimumNumberOfLengthBytes(length);\n if (outboundNumberOfLengthBytes.valueOf() < desiredNumberOfLengthBytes.valueOf())\n {\n outboundNumberOfLengthBytes = desiredNumberOfLengthBytes;\n }\n }", "public OctopusCollectedMsg(int data_length, int base_offset) {\n super(data_length, base_offset);\n amTypeSet(AM_TYPE);\n }", "public RxTxMonitoringMsg(int data_length) {\n super(data_length);\n amTypeSet(AM_TYPE);\n }", "public OCBase(OCInteger lenType)\r\n {\r\n this.lenType = lenType;\r\n }", "public OctopusCollectedMsg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public OctopusCollectedMsg(net.tinyos.message.Message msg, int base_offset, int data_length) {\n super(msg, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public Item()\r\n\t{\r\n\t\tserialNum = 00000;\r\n\t\tweight = 0.0;\r\n\t}", "public TextObjectBaseRecord(short id, short size, byte [] data, int offset)\n {\n super(id, size, data, offset);\n \n }", "public ISOCommandAPDU(int size, byte classByte, byte instruction, byte p1, byte p2, byte[] data, int le) {\n super(size);\n // initialize properly for encoding\n this.le = le;\n this.lc = (data == null ? 0 : data.length);\n // encode\n byte[] body = this.encode(data);\n int L = (body == null ? 0 : body.length);\n // fill buffer\n this.apdu_buffer[CLASS] = classByte;\n this.apdu_buffer[INSTRUCTION] = instruction;\n this.apdu_buffer[P1] = p1;\n this.apdu_buffer[P2] = p2;\n if (body != null)\n System.arraycopy(body, 0, this.apdu_buffer, 4, L);\n\n this.apdu_length = 4+L;\n }", "public WorkDataFile(int length)\n\t{\n\t\tsuper(length);\n\t}", "public Id5320DataFile()\n\t{\n\t\tlineLength = OFF_CUSTOMER_NAME + LEN_CUSTOMER_NAME;\n\t}", "public ISOCommandAPDU(int size, byte classByte, byte instruction, byte p1, byte p2, byte[] data) {\n this(size, classByte, instruction, p1, p2, data, -1);\n }", "public void setLength( int length ) { setCapacity( length ); this.length = length; }", "public CachableItem(String url, Object payload,int size)\n {\n this.url=url;\n this.payload=payload;\n this.payloadSize=size;\n priorityNumber=0;\n }", "public SatelCommandBase(byte commandCode, byte[] payload) {\n super(commandCode, payload);\n }", "public AdSize(int r7, int r8) {\n /*\n r6 = this;\n r0 = -1\n if (r7 != r0) goto L_0x004c\n java.lang.String r0 = \"FULL\"\n r1 = r0\n L_0x0006:\n r0 = -2\n if (r8 != r0) goto L_0x0052\n java.lang.String r0 = \"AUTO\"\n L_0x000b:\n java.lang.String r2 = \"_as\"\n java.lang.String r2 = java.lang.String.valueOf(r2)\n java.lang.StringBuilder r3 = new java.lang.StringBuilder\n java.lang.String r4 = java.lang.String.valueOf(r1)\n int r4 = r4.length()\n int r4 = r4 + 1\n java.lang.String r5 = java.lang.String.valueOf(r0)\n int r5 = r5.length()\n int r4 = r4 + r5\n java.lang.String r5 = java.lang.String.valueOf(r2)\n int r5 = r5.length()\n int r4 = r4 + r5\n r3.<init>(r4)\n java.lang.StringBuilder r1 = r3.append(r1)\n java.lang.String r3 = \"x\"\n java.lang.StringBuilder r1 = r1.append(r3)\n java.lang.StringBuilder r0 = r1.append(r0)\n java.lang.StringBuilder r0 = r0.append(r2)\n java.lang.String r0 = r0.toString()\n r6.<init>(r7, r8, r0)\n return\n L_0x004c:\n java.lang.String r0 = java.lang.String.valueOf(r7)\n r1 = r0\n goto L_0x0006\n L_0x0052:\n java.lang.String r0 = java.lang.String.valueOf(r8)\n goto L_0x000b\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.ads.AdSize.<init>(int, int):void\");\n }", "public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2, byte[] data) {\n this(data.length+5+4, classByte, instruction, p1, p2, data, -1); // 5 = max overhead for coding data; 4 = header bytes\n }", "public ReservedInstanceTypeItem(ReservedInstanceTypeItem source) {\n if (source.InstanceType != null) {\n this.InstanceType = new String(source.InstanceType);\n }\n if (source.Cpu != null) {\n this.Cpu = new Long(source.Cpu);\n }\n if (source.Memory != null) {\n this.Memory = new Long(source.Memory);\n }\n if (source.Gpu != null) {\n this.Gpu = new Long(source.Gpu);\n }\n if (source.Fpga != null) {\n this.Fpga = new Long(source.Fpga);\n }\n if (source.StorageBlock != null) {\n this.StorageBlock = new Long(source.StorageBlock);\n }\n if (source.NetworkCard != null) {\n this.NetworkCard = new Long(source.NetworkCard);\n }\n if (source.MaxBandwidth != null) {\n this.MaxBandwidth = new Float(source.MaxBandwidth);\n }\n if (source.Frequency != null) {\n this.Frequency = new String(source.Frequency);\n }\n if (source.CpuModelName != null) {\n this.CpuModelName = new String(source.CpuModelName);\n }\n if (source.Pps != null) {\n this.Pps = new Long(source.Pps);\n }\n if (source.Externals != null) {\n this.Externals = new Externals(source.Externals);\n }\n if (source.Remark != null) {\n this.Remark = new String(source.Remark);\n }\n if (source.Prices != null) {\n this.Prices = new ReservedInstancePriceItem[source.Prices.length];\n for (int i = 0; i < source.Prices.length; i++) {\n this.Prices[i] = new ReservedInstancePriceItem(source.Prices[i]);\n }\n }\n }", "public Vlen_t() {}", "public RxTxMonitoringMsg(int data_length, int base_offset) {\n super(data_length, base_offset);\n amTypeSet(AM_TYPE);\n }", "protected Block(short id, byte data) {\n this.id = id;\n this.data = data;\n }", "public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2, byte[] data, int le) {\n this(data.length+5+4, classByte, instruction, p1, p2, data, le); // 5 = max overhead for coding data; 4 = header bytes\n }", "private static SECSItemNumLengthBytes calculateMinimumNumberOfLengthBytes(int length)\n {\n SECSItemNumLengthBytes result = SECSItemNumLengthBytes.ONE;\n if (length > 255)\n {\n if (length < 65536)\n result = SECSItemNumLengthBytes.TWO;\n else\n result = SECSItemNumLengthBytes.THREE;\n }\n \n return result;\n }", "public RxTxMonitoringMsg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "Length initLength(Length iLength)\n {\n iLength.updateElementValue(\"Length\");\n return iLength;\n }", "public Item(int sn, double w)\r\n\t/*\r\n\t * \t\tsn - serial number\r\n\t * \t\tw - weight\r\n\t */\r\n\t{\r\n\t\tserialNum = sn;\r\n\t\tweight = w;\r\n\t}", "public SECSItemNumLengthBytes getInboundNumberOfLengthBytes()\n {\n return inboundNumberOfLengthBytes;\n }", "Item(){\r\n\t\tthis(0, new Weight(5), new DukatAmount(0));\r\n\t}", "public Item(){\n description = \"No description avaible for this item\";\n weight = 0;\n }", "public ISOCommandAPDU(int size, byte classByte, byte instruction, byte p1, byte p2) {\n this(size, classByte, instruction, p1, p2, null, -1);\n }", "private Block(Location topLeft, short length, short width) {\n\t\tif (length<=0 || width<=0){\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\telse if (topLeft==null) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t\tthis.topLeft = topLeft;\n\t\tthis.length = length;\n\t\tthis.width = width;\n\t}", "public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2, int le) {\n this(4+2, classByte, instruction, p1, p2, null, le); // size = header length + le\n }", "public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2) {\n this(4, classByte, instruction, p1, p2, null, -1); // size = header length\n }", "public SECSItemNumLengthBytes getOutboundNumberOfLengthBytes()\n {\n return outboundNumberOfLengthBytes;\n }", "public Item(Integer itemSlot) {\n this.itemSlot = itemSlot;\n }", "public Paquet(byte []datainitiale) {\n\t\t\n\t\t\n\t\tsuper();\n\t\t\n\t\t_instance_id++;\n\t\tSystem.out.print(\"\\nmnb = \"+_instance_id);\n\n\t\tshort header = (short) ((datainitiale[0] & 255)<<8 | (datainitiale[1] & 255 )) ;\n\t\t\t\n\t\tthis.id = (short) (header >> 2);\n\t\tsizeofsize = (byte) (header & 3);\n\t\t\n\t\tswitch(sizeofsize)\n\t\t{\n\t\t\tcase 0 \t: \tsize = 0;break;\n\t\t\tcase 1 \t:\tsize = datainitiale[2] & 255;break;\n\t\t\tcase 2\t:\tsize = ((datainitiale[2] & 255)<<8 | datainitiale[3]& 255);break;\n\t\t\tdefault :\tsize = (((datainitiale[2] & 255 )<< 16 | (datainitiale[3]& 255) << 8) | datainitiale[4] & 255);\t\n\t\t}\n\t\tint t;\n\tif(size<8192)\n\t\t{this.data = new byte[size];\n\t\tt=size;\n\t\tfor(int i = 0; i < t ; i++)\n\t\t\tdata[i] = datainitiale[i+2 + sizeofsize];\n\t\tfor(int i = 0; i < datainitiale.length-(t+2+sizeofsize) ; i++)\n\t\t\tdatainitiale[i]=datainitiale[i+t+2+sizeofsize];\n\t\t}\n\telse \n\t\t{this.data=new byte[datainitiale.length-sizeofsize-2];\n\t\tt=datainitiale.length;\n\t\tfor(int i = 0; i <datainitiale.length-sizeofsize-2; i++)\n\t\t\tdata[i] = datainitiale[i+2 + sizeofsize];\n\t\t\n\t\t}\n\t\n\t\t\n\t\t\n\t}", "public PurchaseOrderItem () {\n\t\tsuper();\n\t}", "@Override\n\tpublic void setLength(int length) {\n\t\t\n\t}", "public void setLength(long length) { \n this.length = length; \n }", "public Int8Msg(int data_length) {\n super(data_length);\n amTypeSet(AM_TYPE);\n }", "public InventoryItem(){\r\n this.itemName = \"TBD\";\r\n this.sku = 0;\r\n this.price = 0.0;\r\n this.quantity = 0;\r\n nItems++;\r\n }", "public Slip(int aNo, int aWidth, double aSlipLength) \r\n \t{\r\n\t\t// invoke accessors to populate attributes\r\n\t\tsetNo(aNo);\t\r\n\t\tsetWidth(aWidth);\r\n\t\tsetSlipLength(aSlipLength);\r\n\t\tsetBoat(null);\t// initially no boat is assigned to this slip\r\n\t\tsetLease(null);// initially no lease for this slip\r\n \t}", "public OtherVeryLongAttribute(AttributeTag t,long vl,DicomInputStream i) throws IOException, DicomException {\n\t\tsuper(t);\n\t\tdoCommonConstructorStuff(vl,i);\n\t}", "public ReadLengthReadFilter() {}", "public TagHeader_v2_3(byte[] data, InputStream in)\n throws IOException\n {\n super(data);\n if (usesExtendedHeader())\n extHeader = makeExtendedHeader(in);\n }", "public MyStringBuilder() {\n super(16);\n }", "public Commercial()\n {\n super();\n payload = 0;\n }", "public void setLength(int length){\n\t\tif(length > 0){\n\t\t\tthis.length = length; //this.length is the length were in right now. and = length is the length the object is given\n\t\t}\n\t\t\n\t\t\n\t}", "public OctopusCollectedMsg(byte[] data, int base_offset) {\n super(data, base_offset);\n amTypeSet(AM_TYPE);\n }", "public Token(I2PAppContext ctx, byte[] data) {\n super(data);\n // lets not get carried away\n if (data.length > MAX_TOK_LEN)\n throw new IllegalArgumentException();\n lastSeen = ctx.clock().now();\n }", "public X509KeyUsage(int a_usage)\n\t{\n\t\tsuper(IDENTIFIER, true, createDEROctet(a_usage));\n\t\tm_usage = a_usage;\n\t}", "public DataBlock() {\n headerPointer = 0;\n datasPointer = size - 1;\n serialize = new byte[size];\n }", "public STCASHUNITINFO() {\n\t\tsuper(Structure.ALIGN_NONE);\n\t}", "public Data(String itemId, String itemDescription) {\n this.itemId = itemId;\n this.itemDescription = itemDescription;\n }", "public ItemRecord(String itemid, String productid, BigDecimal listprice, BigDecimal unitcost, Integer supplier, String status, String attr1, String attr2, String attr3, String attr4, String attr5) {\n super(Item.ITEM);\n\n set(0, itemid);\n set(1, productid);\n set(2, listprice);\n set(3, unitcost);\n set(4, supplier);\n set(5, status);\n set(6, attr1);\n set(7, attr2);\n set(8, attr3);\n set(9, attr4);\n set(10, attr5);\n }", "protected final int populateSECSItemHeaderData(byte[] buffer, int numberOfBytes)\n {\n int offset = 0;\n byte[] outputLengthBytes = new byte[]{0, 0, 0, 0};\n buffer[0] = (byte)((SECSItemFormatCode.getNumberFromSECSItemFormatCode(formatCode) << 2) | outboundNumberOfLengthBytes.valueOf());\n \n ByteBuffer bb = ByteBuffer.wrap(outputLengthBytes);\n bb.order(ByteOrder.BIG_ENDIAN);\n bb.putInt(numberOfBytes);\n\n switch(outboundNumberOfLengthBytes)\n {\n case ONE:\n buffer[1] = outputLengthBytes[3];\n offset = 2;\n break;\n case TWO:\n buffer[1] = outputLengthBytes[2];\n buffer[2] = outputLengthBytes[3];\n offset = 3;\n break;\n case THREE:\n buffer[1] = outputLengthBytes[1];\n buffer[2] = outputLengthBytes[2];\n buffer[3] = outputLengthBytes[3];\n offset = 4;\n break;\n case NOT_INITIALIZED:\n System.err.println(\"The case where outboundNumberOfLengthBytes is still in its NOT_INITIALIZED state should never happen.\");\n break;\n }\n \n return offset;\n }", "public void setLength(int length)\n {\n this.length = length;\n }", "public RoutePacket(int data_length) {\n super(data_length);\n amTypeSet(AM_TYPE);\n }", "public ConfigurationItem(URI _uri, InputStream _item, RevisionID _revision)\r\n\t{\r\n\t\titem \t= _item;\r\n\t\turi \t= _uri;\r\n\t\trevision= _revision;\r\n\t\ttype \t= null;\r\n\t\tuser \t= null;\r\n\t}", "public Asn1Object( int tag, int length, byte[] value ) {\n this.tag = tag;\n this.type = tag & 0x1F;\n this.length = length;\n this.value = value;\n }", "public void setLength(int length) {\r\n this.length = length;\r\n }", "public void setLength(int length) {\r\n this.length = length;\r\n }", "public Item(final int t, final int i, final int c) {\n\t\ttype = t;\n\t\tid = i;\n\t\tcount = c;\n\t\t//type = ItemType.BLOCK;\n\t}", "public Item_Record() {\n super(Item_.ITEM_);\n }", "private LengthResult(long length, int format) {\n\t\t\tthis.length = length;\n\t\t\tthis.format = format;\n\t\t}", "public ASN(int aSNID, int linkCapacity, int linkCost, int rCID, String Ipa) {\n setASNID(aSNID);\n setLinkCapacity(linkCapacity);\n LinkCost = linkCost;\n setRCID(rCID);\n setIpa(Ipa);\n hop = 0;\n }", "Item(DukatAmount price){\r\n\t\tthis(0, new Weight(5), price);\r\n\t}", "public ISOCommandAPDU(int size, byte classByte, byte instruction, byte p1, byte p2, int le) {\n this(size, classByte, instruction, p1, p2, null, le);\n }", "public Item(\n int itemId ,\n int currentQty ,\n int minQty ,\n int maxQty ,\n BufferedImage icon ,\n String label, \n String desc ,\n String attr)\n {\n this.itemId = itemId ;\n this.currentQty=currentQty;\n this.minQty=minQty;\n this.maxQty=maxQty;\n this.icon=icon;\n this.label=label;\n }", "public TreeItem(StreamTokenizer st) throws DataFormatException, IOException {\n\t\tcreateItem(st);\n\t}", "public Item() {\r\n this.name = \"\";\r\n this.description = \"\";\r\n this.price = 0F;\r\n this.type = \"\";\r\n this.available = 0;\r\n this.wholesaler = new Wholesaler();\r\n this.wholesalerId = 0;\r\n this.category = new Category();\r\n this.categoryId = 0; \r\n }", "public ConsumableItem(String name, String description, int numItem, char symbol) \n {\n this.name = name;\n this.description = description;\n this.numItem = numItem;\n this.symbol = symbol;\n }", "public Item()\n {\n super();\n }", "public Int8Msg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public Command(byte[] data, long timestamp, int sid, int size) throws IOException {\n this.timestamp = timestamp;\n this.sid = sid;\n this.setSize(size);\n DataInputStream in = new DataInputStream(new ByteArrayInputStream(data));\n int magic = in.readUnsignedByte();\n if (magic != TTMAGICNUM) throw new IOException(\"Wrong magic header.\");\n command = in.readUnsignedByte();\n switch (command) {\n case TTCMDMISC:\n parseCommandMisc(in);\n break;\n case TTCMDPUT:\n name = \"put\";\n parseCommandPut(in);\n break;\n case TTCMDPUTKEEP:\n name = \"putkeep\";\n parseCommandPut(in);\n break;\n default:\n if (LOG.isDebugEnabled()) LOG.debug(\"constructor: Found unhandled command -> 0x\" + Integer.toHexString(command));\n break;\n }\n in.close();\n in = null;\n }", "public GIPIQuoteItemMC( \tfinal Integer quoteId, \t\tfinal Integer itemNo, \t\tfinal String plateNo,\n \t\t\t \t\t\t\t\tfinal String motorNo, \t\tfinal String serialNo, \t\tfinal String sublineTypeCd,\n \t\t\t \t\t\t\t\tfinal Integer motType, \t\tfinal Integer carCompanyCd, final Integer cocYy,\n \t\t\t \t\t\t\t\tfinal Integer cocSeqNo, \tfinal Integer cocSerialNo, \tfinal String cocType,\n \t\t\t \t\t\t\t\tfinal BigDecimal repairLim, final String color, \t\tfinal String modelYear, \n \t\t\t \t\t\t\t\tfinal String make,\t\t\tfinal BigDecimal estValue, \tfinal BigDecimal towing, \t\n \t\t\t \t\t\t\t\tfinal String assignee,\t\tfinal Integer noOfPass, \tfinal String tariffZone, \t\n\t\t\t\t\t \t\t\tfinal Date cocIssueDate,\tfinal String mvFileNo, \t\tfinal String acquiredFrom, \t\n\t\t\t\t\t \t\t\tfinal String ctvTag,\t\tfinal Integer typeOfBodyCd, final String unladenWt, \t\n\t\t\t\t\t \t\t\tfinal Integer makeCd,\t\tfinal Integer seriesCd,\t \tfinal String basicColorCd,\t\n\t\t\t\t\t \t\t\tfinal Integer colorCd,\t\tfinal String origin, \t\tfinal String destination, \t\n\t\t\t\t\t \t\t\tfinal String cocAtcn,\t\tfinal String userId, \t\tfinal Date lastUpdate, \t\t\n\t\t\t\t\t \t\t\tfinal String sublineCd)\t{\n \t\t\n \t\tthis.quoteId = quoteId;\n \t\tthis.itemNo = itemNo;\n \t\tthis.plateNo = plateNo;\n \t\tthis.motorNo = motorNo;\n \t\tthis.serialNo = serialNo;\n \t\tthis.sublineTypeCd = sublineTypeCd;\n \t\tthis.motType = motType;\n \t\tthis.carCompanyCd = carCompanyCd;\n \t\tthis.cocYy = cocYy;\n \t\tthis.cocSeqNo = cocSeqNo;\n \t\tthis.cocSerialNo = cocSerialNo;\n \t\tthis.cocType = cocType;\n \t\tthis.repairLim = repairLim;\n \t\tthis.color = color;\n \t\tthis.modelYear = modelYear;\n \t\tthis.make = make;\n \t\tthis.estValue = estValue;\n \t\tthis.towing = towing;\n \t\tthis.assignee = assignee;\n \t\tthis.noOfPass = noOfPass;\n \t\tthis.tariffZone = tariffZone;\n \t\tthis.cocIssueDate = cocIssueDate;\n \t\tthis.mvFileNo = mvFileNo;\n \t\tthis.acquiredFrom = acquiredFrom;\n \t\tthis.ctvTag = ctvTag;\n \t\tthis.typeOfBodyCd = typeOfBodyCd;\n \t\tthis.unladenWt = unladenWt;\n \t\tthis.makeCd = makeCd;\n \t\tthis.seriesCd = seriesCd;\n \t\tthis.basicColorCd = basicColorCd;\n \t\tthis.colorCd = colorCd;\n \t\tthis.origin = origin;\n \t\tthis.destination = destination;\n \t\tthis.cocAtcn = cocAtcn;\n \t\tsuper.setUserId(userId);\n \t\tsuper.setLastUpdate(lastUpdate);\n \t\tthis.sublineCd = sublineCd;\n \t\t\n \t}", "public Item(String des, double w){\n description = des;\n weight = w;\n }", "public ItemRecord() {\n super(Item.ITEM);\n }", "public BufferedDataInputStream(InputStream o, int bufLength) {\n\t\tsuper(o, bufLength);\n\t}", "public SIASES() {\n\t\tsuper();\n\n\t\tm_iChunkSize = 10;\n\t\tm_sLastUser = EMPTY_STR;\n\t\tm_sLastGroup = EMPTY_STR;\n\t\tm_bIsDriverLoaded = false;\n\t\tit = null;\n\n\t\tif (isDebug == true) {\n\t\t\tlog.debug(\"Construtor: <valor m_iChunkSize: \" + m_iChunkSize\n\t\t\t\t\t+ \"> <valor m_sLastUser: \" + m_sLastUser\n\t\t\t\t\t+ \"> <m_sLastGroup: \" + m_sLastGroup);\n\t\t}\n\n\t}", "public Packet(int PCKT_RI_, int PCKT_SRC_ID_, int pcktNr_, int sizeInBits_, double tCreation_){\r\n\t\tPCKT_RI=PCKT_RI_;\r\n\t\tPCKT_SRC_ID=PCKT_SRC_ID_;\r\n\t\tpcktNr=pcktNr_;\r\n\t\tsizeInBits=sizeInBits_;\r\n\t\ttCreation=tCreation_;\r\n\t}", "private Item(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public OtherVeryLongAttribute(AttributeTag t,Long vl,DicomInputStream i) throws IOException, DicomException {\n\t\tsuper(t);\n\t\tdoCommonConstructorStuff(vl.longValue(),i);\n\t}", "public LimitedStringValueDriver(int length) {\n this.length = length;\n }", "public RoutePacket(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public Str(byte[] data) {\n unpack(data);\n }", "public StrumInstrument(String type, String manufacturer, int nrStrings, double stringSize) {\n super(type, manufacturer);\n this.nrStrings = nrStrings;\n this.stringSize = stringSize;\n }", "public OctopusCollectedMsg(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }", "protected Ship(int length) {\n this.length = length;\n size = 0;\n cells = new Cell[length];\n }", "public void setLength(int length) {\r\n\t\tthis.length = length;\r\n\t}", "DataStreamAttributes createDataStreamAttributes();", "public Payload() {}", "protected Commands (MyStringBuilder obj) {\n\t\t_objMyStringBuilder = obj;\n\t\t_size = obj.size();\n\t\t\n\t\t\n}" ]
[ "0.7584354", "0.7579418", "0.6060325", "0.5861587", "0.57218677", "0.56043303", "0.558623", "0.55820423", "0.55789953", "0.55421567", "0.54771906", "0.5465796", "0.54462415", "0.5422892", "0.5362701", "0.5337246", "0.53359735", "0.52948844", "0.5290991", "0.52680415", "0.52666056", "0.5265033", "0.52437145", "0.52353007", "0.52326113", "0.52262634", "0.5208343", "0.517335", "0.51016253", "0.50986207", "0.50937575", "0.5053623", "0.5047477", "0.50400555", "0.5033659", "0.5033586", "0.5030695", "0.502778", "0.5027104", "0.5025431", "0.5017558", "0.50128365", "0.50031245", "0.5003063", "0.4996447", "0.49795547", "0.49736962", "0.49696353", "0.4969316", "0.49686903", "0.49651465", "0.49546665", "0.49542934", "0.49504516", "0.4938729", "0.4938233", "0.4926393", "0.49241674", "0.49221015", "0.49158505", "0.4915075", "0.4913654", "0.49069098", "0.49013996", "0.48987246", "0.4897135", "0.48925954", "0.48912147", "0.48912147", "0.48836595", "0.48826778", "0.48787624", "0.4875675", "0.48729938", "0.48725927", "0.48720035", "0.4867523", "0.48582882", "0.48500478", "0.48476788", "0.48456755", "0.48409122", "0.48386797", "0.4838125", "0.4837279", "0.48008984", "0.47904748", "0.47842568", "0.47813845", "0.4777882", "0.47646818", "0.47606587", "0.475983", "0.47537827", "0.4748254", "0.47455898", "0.4740407", "0.47266415", "0.47222674", "0.47217184" ]
0.77751887
0
This is a base class constructor for a SECSItem. When using this constructor, the number of length bytes will be set to the greater of, the specified number of length bytes, or the minimum number required to handle an item with the length that is specified by the value of the length parameter. This constructor sets the following base class attributes from the provided data: formatCode lengthInBytes outboundNumberOfLengthBytes Note: An IllegalArgumentException will be thrown if the value of the length parameter is outside the range of 0 16777215 inclusive.
protected SECSItem(SECSItemFormatCode formatCode, int length, SECSItemNumLengthBytes desiredNumberOfLengthBytes) { this.formatCode = formatCode; lengthInBytes = length; setOutboundNumberOfLengthBytes(length, desiredNumberOfLengthBytes); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected SECSItem(SECSItemFormatCode formatCode, int lengthInBytes)\n {\n if (lengthInBytes < 0 || lengthInBytes > 0x00FFFFFF)\n {\n throw new IllegalArgumentException(\n \"The value for the length argument must be between 0 and 16777215 inclusive.\");\n }\n\n this.formatCode = formatCode;\n this.lengthInBytes = lengthInBytes;\n outboundNumberOfLengthBytes = calculateMinimumNumberOfLengthBytes(lengthInBytes);\n }", "protected SECSItem(byte[] data, int itemOffset)\n {\n if (data == null)\n {\n throw new IllegalArgumentException(\"\\\"data\\\" argument must not be null.\");\n }\n \n if (data.length < 2)\n {\n throw new IllegalArgumentException(\"\\\"data\\\" argument must have a length >= 2.\");\n }\n\n formatCode = SECSItemFormatCode.getSECSItemFormatCodeFromNumber((byte)((data[itemOffset] >> 2) & 0x0000003F));\n \n byte[] temp1 = new byte[4];\n switch(data[itemOffset] & 0x03) // Extract the number of length bytes from the message\n {\n case 0:\n throw new IllegalArgumentException(\"The number of length bytes is not allowed to be ZERO.\");\n case 1:\n inboundNumberOfLengthBytes = SECSItemNumLengthBytes.ONE;\n outboundNumberOfLengthBytes = inboundNumberOfLengthBytes;\n \n temp1[0] = 0;\n temp1[1] = 0;\n temp1[2] = 0;\n temp1[3] = data[itemOffset+1];\n break;\n case 2:\n inboundNumberOfLengthBytes = SECSItemNumLengthBytes.TWO;\n outboundNumberOfLengthBytes = inboundNumberOfLengthBytes;\n if (data.length < 3)\n {\n throw new IllegalArgumentException(\"With two length bytes the minimum length for the \\\"data\\\" argument is 3.\");\n }\n\n temp1[0] = 0;\n temp1[1] = 0;\n temp1[2] = data[itemOffset+1];\n temp1[3] = data[itemOffset+2];\n break;\n case 3:\n inboundNumberOfLengthBytes = SECSItemNumLengthBytes.THREE;\n outboundNumberOfLengthBytes = inboundNumberOfLengthBytes;\n if (data.length < 4)\n {\n throw new IllegalArgumentException(\"With three length bytes the minimum length for the \\\"data\\\" argument is 4.\");\n }\n\n temp1[0] = 0;\n temp1[1] = data[itemOffset+1];\n temp1[2] = data[itemOffset+2];\n temp1[3] = data[itemOffset+3];\n break;\n }\n\n ByteBuffer buf = ByteBuffer.wrap(temp1);\n buf.order(ByteOrder.BIG_ENDIAN);\n lengthInBytes = buf.getInt();\n }", "public OctopusCollectedMsg(int data_length) {\n super(data_length);\n amTypeSet(AM_TYPE);\n }", "public ItemSerializer(int size) {\n this(size, SerializerOutputType.RAW);\n }", "public void setOutboundNumberOfLengthBytes(int length, SECSItemNumLengthBytes desiredNumberOfLengthBytes)\n {\n if (length < 0 || length > 0x00FFFFFF)\n {\n throw new IllegalArgumentException(\n \"The value for the length argument must be between 0 and 16777215 inclusive.\");\n }\n\n outboundNumberOfLengthBytes = calculateMinimumNumberOfLengthBytes(length);\n if (outboundNumberOfLengthBytes.valueOf() < desiredNumberOfLengthBytes.valueOf())\n {\n outboundNumberOfLengthBytes = desiredNumberOfLengthBytes;\n }\n }", "protected BaseAuroraDataBuffer(long length) {\n this(length, true);\n }", "public TextObjectBaseRecord(short id, short size, byte [] data)\n {\n super(id, size, data);\n \n }", "public OctopusCollectedMsg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public OctopusCollectedMsg(int data_length, int base_offset) {\n super(data_length, base_offset);\n amTypeSet(AM_TYPE);\n }", "public RxTxMonitoringMsg(int data_length) {\n super(data_length);\n amTypeSet(AM_TYPE);\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:55:06.822 -0500\", hash_original_method = \"2D2F8FB9FD0DE4D4C70B238FD2D4C88B\", hash_generated_method = \"CFB81A0992BCD18B37272999971C8572\")\n \npublic ContentLength(int length) {\n super(NAME);\n this.contentLength = Integer.valueOf(length);\n }", "public WorkDataFile(int length)\n\t{\n\t\tsuper(length);\n\t}", "public OCBase(OCInteger lenType)\r\n {\r\n this.lenType = lenType;\r\n }", "public OctopusCollectedMsg(net.tinyos.message.Message msg, int base_offset, int data_length) {\n super(msg, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public void setLength( int length ) { setCapacity( length ); this.length = length; }", "public TextObjectBaseRecord(short id, short size, byte [] data, int offset)\n {\n super(id, size, data, offset);\n \n }", "private static SECSItemNumLengthBytes calculateMinimumNumberOfLengthBytes(int length)\n {\n SECSItemNumLengthBytes result = SECSItemNumLengthBytes.ONE;\n if (length > 255)\n {\n if (length < 65536)\n result = SECSItemNumLengthBytes.TWO;\n else\n result = SECSItemNumLengthBytes.THREE;\n }\n \n return result;\n }", "private Block(Location topLeft, short length, short width) {\n\t\tif (length<=0 || width<=0){\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\telse if (topLeft==null) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t\tthis.topLeft = topLeft;\n\t\tthis.length = length;\n\t\tthis.width = width;\n\t}", "public ReservedInstanceTypeItem(ReservedInstanceTypeItem source) {\n if (source.InstanceType != null) {\n this.InstanceType = new String(source.InstanceType);\n }\n if (source.Cpu != null) {\n this.Cpu = new Long(source.Cpu);\n }\n if (source.Memory != null) {\n this.Memory = new Long(source.Memory);\n }\n if (source.Gpu != null) {\n this.Gpu = new Long(source.Gpu);\n }\n if (source.Fpga != null) {\n this.Fpga = new Long(source.Fpga);\n }\n if (source.StorageBlock != null) {\n this.StorageBlock = new Long(source.StorageBlock);\n }\n if (source.NetworkCard != null) {\n this.NetworkCard = new Long(source.NetworkCard);\n }\n if (source.MaxBandwidth != null) {\n this.MaxBandwidth = new Float(source.MaxBandwidth);\n }\n if (source.Frequency != null) {\n this.Frequency = new String(source.Frequency);\n }\n if (source.CpuModelName != null) {\n this.CpuModelName = new String(source.CpuModelName);\n }\n if (source.Pps != null) {\n this.Pps = new Long(source.Pps);\n }\n if (source.Externals != null) {\n this.Externals = new Externals(source.Externals);\n }\n if (source.Remark != null) {\n this.Remark = new String(source.Remark);\n }\n if (source.Prices != null) {\n this.Prices = new ReservedInstancePriceItem[source.Prices.length];\n for (int i = 0; i < source.Prices.length; i++) {\n this.Prices[i] = new ReservedInstancePriceItem(source.Prices[i]);\n }\n }\n }", "public AdSize(int r7, int r8) {\n /*\n r6 = this;\n r0 = -1\n if (r7 != r0) goto L_0x004c\n java.lang.String r0 = \"FULL\"\n r1 = r0\n L_0x0006:\n r0 = -2\n if (r8 != r0) goto L_0x0052\n java.lang.String r0 = \"AUTO\"\n L_0x000b:\n java.lang.String r2 = \"_as\"\n java.lang.String r2 = java.lang.String.valueOf(r2)\n java.lang.StringBuilder r3 = new java.lang.StringBuilder\n java.lang.String r4 = java.lang.String.valueOf(r1)\n int r4 = r4.length()\n int r4 = r4 + 1\n java.lang.String r5 = java.lang.String.valueOf(r0)\n int r5 = r5.length()\n int r4 = r4 + r5\n java.lang.String r5 = java.lang.String.valueOf(r2)\n int r5 = r5.length()\n int r4 = r4 + r5\n r3.<init>(r4)\n java.lang.StringBuilder r1 = r3.append(r1)\n java.lang.String r3 = \"x\"\n java.lang.StringBuilder r1 = r1.append(r3)\n java.lang.StringBuilder r0 = r1.append(r0)\n java.lang.StringBuilder r0 = r0.append(r2)\n java.lang.String r0 = r0.toString()\n r6.<init>(r7, r8, r0)\n return\n L_0x004c:\n java.lang.String r0 = java.lang.String.valueOf(r7)\n r1 = r0\n goto L_0x0006\n L_0x0052:\n java.lang.String r0 = java.lang.String.valueOf(r8)\n goto L_0x000b\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.ads.AdSize.<init>(int, int):void\");\n }", "public RxTxMonitoringMsg(int data_length, int base_offset) {\n super(data_length, base_offset);\n amTypeSet(AM_TYPE);\n }", "public Item()\r\n\t{\r\n\t\tserialNum = 00000;\r\n\t\tweight = 0.0;\r\n\t}", "public Int8Msg(int data_length) {\n super(data_length);\n amTypeSet(AM_TYPE);\n }", "public ISOCommandAPDU(int size, byte classByte, byte instruction, byte p1, byte p2, byte[] data, int le) {\n super(size);\n // initialize properly for encoding\n this.le = le;\n this.lc = (data == null ? 0 : data.length);\n // encode\n byte[] body = this.encode(data);\n int L = (body == null ? 0 : body.length);\n // fill buffer\n this.apdu_buffer[CLASS] = classByte;\n this.apdu_buffer[INSTRUCTION] = instruction;\n this.apdu_buffer[P1] = p1;\n this.apdu_buffer[P2] = p2;\n if (body != null)\n System.arraycopy(body, 0, this.apdu_buffer, 4, L);\n\n this.apdu_length = 4+L;\n }", "public RxTxMonitoringMsg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public Vlen_t() {}", "public CachableItem(String url, Object payload,int size)\n {\n this.url=url;\n this.payload=payload;\n this.payloadSize=size;\n priorityNumber=0;\n }", "public ISOCommandAPDU(int size, byte classByte, byte instruction, byte p1, byte p2, byte[] data) {\n this(size, classByte, instruction, p1, p2, data, -1);\n }", "public Id5320DataFile()\n\t{\n\t\tlineLength = OFF_CUSTOMER_NAME + LEN_CUSTOMER_NAME;\n\t}", "@Override\n\tpublic void setLength(int length) {\n\t\t\n\t}", "Length initLength(Length iLength)\n {\n iLength.updateElementValue(\"Length\");\n return iLength;\n }", "public SatelCommandBase(byte commandCode, byte[] payload) {\n super(commandCode, payload);\n }", "public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2, byte[] data) {\n this(data.length+5+4, classByte, instruction, p1, p2, data, -1); // 5 = max overhead for coding data; 4 = header bytes\n }", "protected Block(short id, byte data) {\n this.id = id;\n this.data = data;\n }", "public void setLength(int length){\n\t\tif(length > 0){\n\t\t\tthis.length = length; //this.length is the length were in right now. and = length is the length the object is given\n\t\t}\n\t\t\n\t\t\n\t}", "public void setLength(int length)\n {\n this.length = length;\n }", "public void setLength(long length) { \n this.length = length; \n }", "public void setLength(int length) {\r\n this.length = length;\r\n }", "public void setLength(int length) {\r\n this.length = length;\r\n }", "public Slip(int aNo, int aWidth, double aSlipLength) \r\n \t{\r\n\t\t// invoke accessors to populate attributes\r\n\t\tsetNo(aNo);\t\r\n\t\tsetWidth(aWidth);\r\n\t\tsetSlipLength(aSlipLength);\r\n\t\tsetBoat(null);\t// initially no boat is assigned to this slip\r\n\t\tsetLease(null);// initially no lease for this slip\r\n \t}", "public Token(I2PAppContext ctx, byte[] data) {\n super(data);\n // lets not get carried away\n if (data.length > MAX_TOK_LEN)\n throw new IllegalArgumentException();\n lastSeen = ctx.clock().now();\n }", "public Int8Msg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public Paquet(byte []datainitiale) {\n\t\t\n\t\t\n\t\tsuper();\n\t\t\n\t\t_instance_id++;\n\t\tSystem.out.print(\"\\nmnb = \"+_instance_id);\n\n\t\tshort header = (short) ((datainitiale[0] & 255)<<8 | (datainitiale[1] & 255 )) ;\n\t\t\t\n\t\tthis.id = (short) (header >> 2);\n\t\tsizeofsize = (byte) (header & 3);\n\t\t\n\t\tswitch(sizeofsize)\n\t\t{\n\t\t\tcase 0 \t: \tsize = 0;break;\n\t\t\tcase 1 \t:\tsize = datainitiale[2] & 255;break;\n\t\t\tcase 2\t:\tsize = ((datainitiale[2] & 255)<<8 | datainitiale[3]& 255);break;\n\t\t\tdefault :\tsize = (((datainitiale[2] & 255 )<< 16 | (datainitiale[3]& 255) << 8) | datainitiale[4] & 255);\t\n\t\t}\n\t\tint t;\n\tif(size<8192)\n\t\t{this.data = new byte[size];\n\t\tt=size;\n\t\tfor(int i = 0; i < t ; i++)\n\t\t\tdata[i] = datainitiale[i+2 + sizeofsize];\n\t\tfor(int i = 0; i < datainitiale.length-(t+2+sizeofsize) ; i++)\n\t\t\tdatainitiale[i]=datainitiale[i+t+2+sizeofsize];\n\t\t}\n\telse \n\t\t{this.data=new byte[datainitiale.length-sizeofsize-2];\n\t\tt=datainitiale.length;\n\t\tfor(int i = 0; i <datainitiale.length-sizeofsize-2; i++)\n\t\t\tdata[i] = datainitiale[i+2 + sizeofsize];\n\t\t\n\t\t}\n\t\n\t\t\n\t\t\n\t}", "private LengthResult(long length, int format) {\n\t\t\tthis.length = length;\n\t\t\tthis.format = format;\n\t\t}", "public SECSItemNumLengthBytes getOutboundNumberOfLengthBytes()\n {\n return outboundNumberOfLengthBytes;\n }", "public SECSItemNumLengthBytes getInboundNumberOfLengthBytes()\n {\n return inboundNumberOfLengthBytes;\n }", "public ReadLengthReadFilter() {}", "public RoutePacket(int data_length) {\n super(data_length);\n amTypeSet(AM_TYPE);\n }", "public OctopusCollectedMsg(byte[] data, int base_offset) {\n super(data, base_offset);\n amTypeSet(AM_TYPE);\n }", "protected final int populateSECSItemHeaderData(byte[] buffer, int numberOfBytes)\n {\n int offset = 0;\n byte[] outputLengthBytes = new byte[]{0, 0, 0, 0};\n buffer[0] = (byte)((SECSItemFormatCode.getNumberFromSECSItemFormatCode(formatCode) << 2) | outboundNumberOfLengthBytes.valueOf());\n \n ByteBuffer bb = ByteBuffer.wrap(outputLengthBytes);\n bb.order(ByteOrder.BIG_ENDIAN);\n bb.putInt(numberOfBytes);\n\n switch(outboundNumberOfLengthBytes)\n {\n case ONE:\n buffer[1] = outputLengthBytes[3];\n offset = 2;\n break;\n case TWO:\n buffer[1] = outputLengthBytes[2];\n buffer[2] = outputLengthBytes[3];\n offset = 3;\n break;\n case THREE:\n buffer[1] = outputLengthBytes[1];\n buffer[2] = outputLengthBytes[2];\n buffer[3] = outputLengthBytes[3];\n offset = 4;\n break;\n case NOT_INITIALIZED:\n System.err.println(\"The case where outboundNumberOfLengthBytes is still in its NOT_INITIALIZED state should never happen.\");\n break;\n }\n \n return offset;\n }", "public Item(Integer itemSlot) {\n this.itemSlot = itemSlot;\n }", "public ByteArrayBitstreamInput(final byte[] data, final int bufferLength)\r\n\t\t\tthrows BitstreamException {\r\n\t\tsuper(new ByteArrayInputStream(data), bufferLength);\r\n\t}", "public Asn1Object( int tag, int length, byte[] value ) {\n this.tag = tag;\n this.type = tag & 0x1F;\n this.length = length;\n this.value = value;\n }", "public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2, byte[] data, int le) {\n this(data.length+5+4, classByte, instruction, p1, p2, data, le); // 5 = max overhead for coding data; 4 = header bytes\n }", "public void setLength(int length) {\n\t\tif (length <= 0)\n\t\t\tthrow new IllegalArgumentException(\"length must be > 0\");\n\n\t\tthis.length = length;\n\t}", "public BufferedDataInputStream(InputStream o, int bufLength) {\n\t\tsuper(o, bufLength);\n\t}", "public Data(String itemId, String itemDescription) {\n this.itemId = itemId;\n this.itemDescription = itemDescription;\n }", "public DataBlock() {\n headerPointer = 0;\n datasPointer = size - 1;\n serialize = new byte[size];\n }", "public LimitedStringValueDriver(int length) {\n this.length = length;\n }", "public void setLength(int length) {\r\n\t\tthis.length = length;\r\n\t}", "public TagHeader_v2_3(byte[] data, InputStream in)\n throws IOException\n {\n super(data);\n if (usesExtendedHeader())\n extHeader = makeExtendedHeader(in);\n }", "public OtherVeryLongAttribute(AttributeTag t,long vl,DicomInputStream i) throws IOException, DicomException {\n\t\tsuper(t);\n\t\tdoCommonConstructorStuff(vl,i);\n\t}", "public void setLength(int length) {\n\t\tthis.length = length;\n\t}", "public void setLength(int length) {\n\t\tthis.length = length;\n\t}", "public void setLength(int length) {\n\t\tthis.length = length;\n\t}", "public Commercial()\n {\n super();\n payload = 0;\n }", "public Item(){\n description = \"No description avaible for this item\";\n weight = 0;\n }", "public ItemRecord(String itemid, String productid, BigDecimal listprice, BigDecimal unitcost, Integer supplier, String status, String attr1, String attr2, String attr3, String attr4, String attr5) {\n super(Item.ITEM);\n\n set(0, itemid);\n set(1, productid);\n set(2, listprice);\n set(3, unitcost);\n set(4, supplier);\n set(5, status);\n set(6, attr1);\n set(7, attr2);\n set(8, attr3);\n set(9, attr4);\n set(10, attr5);\n }", "public Desk(ArrayList<String> data, int price) {\n super(data.get(0), data.get(1), price, data.get(2));\n this.legs = stringToBoolean(data.get(3));\n this.top = stringToBoolean(data.get(4));\n this.drawer = stringToBoolean(data.get(5));\n\n if (data.size() > 6) {\n throw new IllegalArgumentException(\"ArrayList is too large\");\n }\n }", "protected Ship(int length) {\n this.length = length;\n size = 0;\n cells = new Cell[length];\n }", "public PurchaseOrderItem () {\n\t\tsuper();\n\t}", "public InventoryItem(){\r\n this.itemName = \"TBD\";\r\n this.sku = 0;\r\n this.price = 0.0;\r\n this.quantity = 0;\r\n nItems++;\r\n }", "public RoutePacket(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public MyStringBuilder() {\n super(16);\n }", "public AppendableCharSequence(int length)\r\n/* 12: */ {\r\n/* 13: 26 */ if (length < 1) {\r\n/* 14: 27 */ throw new IllegalArgumentException(\"length: \" + length + \" (length: >= 1)\");\r\n/* 15: */ }\r\n/* 16: 29 */ this.chars = new char[length];\r\n/* 17: */ }", "public Data(String itemId, String itemDescription, String unitPrice, int inventory) {\n this.itemId = itemId;\n this.itemDescription = itemDescription;\n this.unitPrice = unitPrice;\n this.inventory = inventory;\n }", "Item(){\r\n\t\tthis(0, new Weight(5), new DukatAmount(0));\r\n\t}", "public Str(byte[] data) {\n unpack(data);\n }", "public Item(\n int itemId ,\n int currentQty ,\n int minQty ,\n int maxQty ,\n BufferedImage icon ,\n String label, \n String desc ,\n String attr)\n {\n this.itemId = itemId ;\n this.currentQty=currentQty;\n this.minQty=minQty;\n this.maxQty=maxQty;\n this.icon=icon;\n this.label=label;\n }", "public OctopusCollectedMsg(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }", "public StrumInstrument(String type, String manufacturer, int nrStrings, double stringSize) {\n super(type, manufacturer);\n this.nrStrings = nrStrings;\n this.stringSize = stringSize;\n }", "public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2) {\n this(4, classByte, instruction, p1, p2, null, -1); // size = header length\n }", "public ConfigurationItem(URI _uri, InputStream _item, RevisionID _revision)\r\n\t{\r\n\t\titem \t= _item;\r\n\t\turi \t= _uri;\r\n\t\trevision= _revision;\r\n\t\ttype \t= null;\r\n\t\tuser \t= null;\r\n\t}", "public Item(int sn, double w)\r\n\t/*\r\n\t * \t\tsn - serial number\r\n\t * \t\tw - weight\r\n\t */\r\n\t{\r\n\t\tserialNum = sn;\r\n\t\tweight = w;\r\n\t}", "public Rectangle(int length, int width)\n {\n this.length = length;\n this.width = width;\n\n }", "public ISOCommandAPDU(int size, byte classByte, byte instruction, byte p1, byte p2) {\n this(size, classByte, instruction, p1, p2, null, -1);\n }", "public ASN(int aSNID, int linkCapacity, int linkCost, int rCID, String Ipa) {\n setASNID(aSNID);\n setLinkCapacity(linkCapacity);\n LinkCost = linkCost;\n setRCID(rCID);\n setIpa(Ipa);\n hop = 0;\n }", "public Item_Record() {\n super(Item_.ITEM_);\n }", "public Int8Msg(int data_length, int base_offset) {\n super(data_length, base_offset);\n amTypeSet(AM_TYPE);\n }", "public LengthCheckInputStream(InputStream in, long expectedLength,\n boolean includeSkipped) {\n super(in);\n if (expectedLength < 0)\n throw new IllegalArgumentException();\n this.expectedLength = expectedLength;\n this.includeSkipped = includeSkipped;\n }", "public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2, int le) {\n this(4+2, classByte, instruction, p1, p2, null, le); // size = header length + le\n }", "public Rectangle(int length, int width) {\n }", "public void setLength(long length);", "public void setLength(long length);", "public ItemRecord() {\n super(Item.ITEM);\n }", "Item(DukatAmount price){\r\n\t\tthis(0, new Weight(5), price);\r\n\t}", "public Item(final int t, final int i, final int c) {\n\t\ttype = t;\n\t\tid = i;\n\t\tcount = c;\n\t\t//type = ItemType.BLOCK;\n\t}", "public Version(byte[] msg) throws Exception{\n super(msg);\n\n this.version = ByteBuffer.wrap(Arrays.copyOfRange(data, 0, 4))\n .order(ByteOrder.LITTLE_ENDIAN)\n .getInt();\n this.network_service = ByteBuffer.wrap(Arrays\n .copyOfRange(data, 4, 12)\n )\n .order(ByteOrder.LITTLE_ENDIAN)\n .getLong();\n this.timestamp = ByteBuffer.wrap(\n Arrays\n .copyOfRange(data, 12, 20)\n )\n .order(ByteOrder.LITTLE_ENDIAN)\n .getLong();\n\n this.recipient = new NetAddr(\n Arrays.copyOfRange(data, 20, 46)\n );\n this.sender = new NetAddr(\n Arrays.copyOfRange(data, 46, 72)\n );\n this.nodeId = Arrays.copyOfRange(data, 72, 80);\n\n VarInt len = new VarInt(Arrays.copyOfRange(data, 80, data.length));\n subversion = new String(\n Arrays.copyOfRange(data, 80 + len.getNumBytes(), 80 + len.getNumBytes() + (int)len.getValue())\n );\n\n int endOfSubVersion = 80 + len.getNumBytes() + (int)len.getValue();\n\n lastBlock = ByteBuffer.wrap(\n Arrays.copyOfRange(data, endOfSubVersion, endOfSubVersion + 4)\n ).order(ByteOrder.LITTLE_ENDIAN)\n .getInt();\n\n System.out.println(\"VERSION \" + version + \" - \" + subversion + \" last \" + lastBlock);\n }", "public MyArrayList(int length) {\n data = new Object[length];\n }", "public X509KeyUsage(int a_usage)\n\t{\n\t\tsuper(IDENTIFIER, true, createDEROctet(a_usage));\n\t\tm_usage = a_usage;\n\t}" ]
[ "0.7753299", "0.7533304", "0.59537697", "0.59183246", "0.57911247", "0.5759875", "0.5602522", "0.55724424", "0.5568618", "0.5562665", "0.5526616", "0.5435962", "0.54184", "0.540983", "0.5388738", "0.53074664", "0.5185994", "0.51485854", "0.5147517", "0.5140906", "0.5134304", "0.51313967", "0.5130001", "0.512374", "0.5117478", "0.51169324", "0.51057404", "0.5099717", "0.50941163", "0.5072971", "0.50677484", "0.5057117", "0.5050326", "0.5040171", "0.50335467", "0.50090116", "0.5007962", "0.49939713", "0.49939713", "0.49939403", "0.49831918", "0.4982606", "0.4979917", "0.49526364", "0.49306273", "0.49160987", "0.49097425", "0.49045858", "0.48942357", "0.48938155", "0.48881036", "0.48857075", "0.48853335", "0.4877354", "0.48676136", "0.48648575", "0.48611334", "0.485965", "0.48587918", "0.48394862", "0.48295385", "0.48245156", "0.48174137", "0.48174137", "0.48174137", "0.48070088", "0.4804384", "0.4800942", "0.47997397", "0.4795438", "0.47900984", "0.478552", "0.47851714", "0.4768958", "0.4763342", "0.47606382", "0.47579056", "0.47567672", "0.47563866", "0.47536266", "0.47506782", "0.47383603", "0.47342712", "0.47311363", "0.47307646", "0.4728257", "0.4726314", "0.47254065", "0.47161642", "0.47157815", "0.4706848", "0.47039774", "0.47029114", "0.47029114", "0.47012815", "0.46988174", "0.46965525", "0.46907702", "0.46904892", "0.4686749" ]
0.7644506
1
This is a base class constructor for a SECSItem. This form of the constructor is used when parsing wire/transmission format data and converting it into its "Java form". This constructor sets the following base class attributes from the provided data: formatCode inboundNumberOfLengthBytes outboundNumberOfLengthBytes lengthInBytes or if the formatCode is of type L(List) lengthInBytes will be the number of items in the list
protected SECSItem(byte[] data, int itemOffset) { if (data == null) { throw new IllegalArgumentException("\"data\" argument must not be null."); } if (data.length < 2) { throw new IllegalArgumentException("\"data\" argument must have a length >= 2."); } formatCode = SECSItemFormatCode.getSECSItemFormatCodeFromNumber((byte)((data[itemOffset] >> 2) & 0x0000003F)); byte[] temp1 = new byte[4]; switch(data[itemOffset] & 0x03) // Extract the number of length bytes from the message { case 0: throw new IllegalArgumentException("The number of length bytes is not allowed to be ZERO."); case 1: inboundNumberOfLengthBytes = SECSItemNumLengthBytes.ONE; outboundNumberOfLengthBytes = inboundNumberOfLengthBytes; temp1[0] = 0; temp1[1] = 0; temp1[2] = 0; temp1[3] = data[itemOffset+1]; break; case 2: inboundNumberOfLengthBytes = SECSItemNumLengthBytes.TWO; outboundNumberOfLengthBytes = inboundNumberOfLengthBytes; if (data.length < 3) { throw new IllegalArgumentException("With two length bytes the minimum length for the \"data\" argument is 3."); } temp1[0] = 0; temp1[1] = 0; temp1[2] = data[itemOffset+1]; temp1[3] = data[itemOffset+2]; break; case 3: inboundNumberOfLengthBytes = SECSItemNumLengthBytes.THREE; outboundNumberOfLengthBytes = inboundNumberOfLengthBytes; if (data.length < 4) { throw new IllegalArgumentException("With three length bytes the minimum length for the \"data\" argument is 4."); } temp1[0] = 0; temp1[1] = data[itemOffset+1]; temp1[2] = data[itemOffset+2]; temp1[3] = data[itemOffset+3]; break; } ByteBuffer buf = ByteBuffer.wrap(temp1); buf.order(ByteOrder.BIG_ENDIAN); lengthInBytes = buf.getInt(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected SECSItem(SECSItemFormatCode formatCode, int lengthInBytes)\n {\n if (lengthInBytes < 0 || lengthInBytes > 0x00FFFFFF)\n {\n throw new IllegalArgumentException(\n \"The value for the length argument must be between 0 and 16777215 inclusive.\");\n }\n\n this.formatCode = formatCode;\n this.lengthInBytes = lengthInBytes;\n outboundNumberOfLengthBytes = calculateMinimumNumberOfLengthBytes(lengthInBytes);\n }", "protected SECSItem(SECSItemFormatCode formatCode, int length, SECSItemNumLengthBytes desiredNumberOfLengthBytes)\n {\n this.formatCode = formatCode;\n lengthInBytes = length;\n setOutboundNumberOfLengthBytes(length, desiredNumberOfLengthBytes);\n }", "public ItemSerializer(int size) {\n this(size, SerializerOutputType.RAW);\n }", "public TextObjectBaseRecord(short id, short size, byte [] data)\n {\n super(id, size, data);\n \n }", "public ReservedInstanceTypeItem(ReservedInstanceTypeItem source) {\n if (source.InstanceType != null) {\n this.InstanceType = new String(source.InstanceType);\n }\n if (source.Cpu != null) {\n this.Cpu = new Long(source.Cpu);\n }\n if (source.Memory != null) {\n this.Memory = new Long(source.Memory);\n }\n if (source.Gpu != null) {\n this.Gpu = new Long(source.Gpu);\n }\n if (source.Fpga != null) {\n this.Fpga = new Long(source.Fpga);\n }\n if (source.StorageBlock != null) {\n this.StorageBlock = new Long(source.StorageBlock);\n }\n if (source.NetworkCard != null) {\n this.NetworkCard = new Long(source.NetworkCard);\n }\n if (source.MaxBandwidth != null) {\n this.MaxBandwidth = new Float(source.MaxBandwidth);\n }\n if (source.Frequency != null) {\n this.Frequency = new String(source.Frequency);\n }\n if (source.CpuModelName != null) {\n this.CpuModelName = new String(source.CpuModelName);\n }\n if (source.Pps != null) {\n this.Pps = new Long(source.Pps);\n }\n if (source.Externals != null) {\n this.Externals = new Externals(source.Externals);\n }\n if (source.Remark != null) {\n this.Remark = new String(source.Remark);\n }\n if (source.Prices != null) {\n this.Prices = new ReservedInstancePriceItem[source.Prices.length];\n for (int i = 0; i < source.Prices.length; i++) {\n this.Prices[i] = new ReservedInstancePriceItem(source.Prices[i]);\n }\n }\n }", "public ISOCommandAPDU(int size, byte classByte, byte instruction, byte p1, byte p2, byte[] data, int le) {\n super(size);\n // initialize properly for encoding\n this.le = le;\n this.lc = (data == null ? 0 : data.length);\n // encode\n byte[] body = this.encode(data);\n int L = (body == null ? 0 : body.length);\n // fill buffer\n this.apdu_buffer[CLASS] = classByte;\n this.apdu_buffer[INSTRUCTION] = instruction;\n this.apdu_buffer[P1] = p1;\n this.apdu_buffer[P2] = p2;\n if (body != null)\n System.arraycopy(body, 0, this.apdu_buffer, 4, L);\n\n this.apdu_length = 4+L;\n }", "public ChainShopAdapter(List<MultiItemEntity> data) {\n super(data);\n addItemType(TYPE_LEVEL_1, R.layout.item_shop_employess_list);\n addItemType(TYPE_PERSON, R.layout.item_shop_employee);\n }", "public Data(ArrayList<Object> list) {\n try {\n int n = list.size();\n if (n == 0) throw new Exception(\"Specified argument for Data constructor is an empty ArrayList\");\n this.data = new ArrayList<Byte>();\n\n for (int i = 0; i < n; i++) {\n Object o = list.get(i);\n if (o instanceof Byte) {\n byte b = (byte) o;\n this.data.add(b);\n } else if (o instanceof Integer) {\n int v = (int) o;\n for (int j = 0; j < 4; j++) {\n int b = 0;\n for (int k = 0; k < 8; k++) {\n b = b << 1;\n int x = (3 - j) * 8 + (7 - k);\n int c = (v >> x) & 1;\n b = b | c;\n }\n byte d = (byte) b;\n this.data.add(d);\n }\n } else // support for other formats (eg. Double) may be added\n {\n throw new Exception(\"Specified argument for Data constructor contains Objects that are not supported yet\");\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(1);\n }\n }", "public TreeItem(StreamTokenizer st) throws DataFormatException, IOException {\n\t\tcreateItem(st);\n\t}", "public OctopusCollectedMsg(int data_length) {\n super(data_length);\n amTypeSet(AM_TYPE);\n }", "public Paquet(byte []datainitiale) {\n\t\t\n\t\t\n\t\tsuper();\n\t\t\n\t\t_instance_id++;\n\t\tSystem.out.print(\"\\nmnb = \"+_instance_id);\n\n\t\tshort header = (short) ((datainitiale[0] & 255)<<8 | (datainitiale[1] & 255 )) ;\n\t\t\t\n\t\tthis.id = (short) (header >> 2);\n\t\tsizeofsize = (byte) (header & 3);\n\t\t\n\t\tswitch(sizeofsize)\n\t\t{\n\t\t\tcase 0 \t: \tsize = 0;break;\n\t\t\tcase 1 \t:\tsize = datainitiale[2] & 255;break;\n\t\t\tcase 2\t:\tsize = ((datainitiale[2] & 255)<<8 | datainitiale[3]& 255);break;\n\t\t\tdefault :\tsize = (((datainitiale[2] & 255 )<< 16 | (datainitiale[3]& 255) << 8) | datainitiale[4] & 255);\t\n\t\t}\n\t\tint t;\n\tif(size<8192)\n\t\t{this.data = new byte[size];\n\t\tt=size;\n\t\tfor(int i = 0; i < t ; i++)\n\t\t\tdata[i] = datainitiale[i+2 + sizeofsize];\n\t\tfor(int i = 0; i < datainitiale.length-(t+2+sizeofsize) ; i++)\n\t\t\tdatainitiale[i]=datainitiale[i+t+2+sizeofsize];\n\t\t}\n\telse \n\t\t{this.data=new byte[datainitiale.length-sizeofsize-2];\n\t\tt=datainitiale.length;\n\t\tfor(int i = 0; i <datainitiale.length-sizeofsize-2; i++)\n\t\t\tdata[i] = datainitiale[i+2 + sizeofsize];\n\t\t\n\t\t}\n\t\n\t\t\n\t\t\n\t}", "public SatelCommandBase(byte commandCode, byte[] payload) {\n super(commandCode, payload);\n }", "public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2, byte[] data) {\n this(data.length+5+4, classByte, instruction, p1, p2, data, -1); // 5 = max overhead for coding data; 4 = header bytes\n }", "public OctopusCollectedMsg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2, byte[] data, int le) {\n this(data.length+5+4, classByte, instruction, p1, p2, data, le); // 5 = max overhead for coding data; 4 = header bytes\n }", "public TagHeader_v2_3(byte[] data, InputStream in)\n throws IOException\n {\n super(data);\n if (usesExtendedHeader())\n extHeader = makeExtendedHeader(in);\n }", "public void fromBytes(byte[] data) {\n\t\tint index = 0;\n//\t\tArrayList<Integer> al= new ArrayList<Integer>();;\n\t\tthis.setProtocol(data[index]);\n\t\tindex++;\n this.setTotalSize(BitConverter.bytesToInt(data, index, ByteOrder.BIG_ENDIAN));\n\t\tindex+=4;\n\t\tthis.hashSize = BitConverter.bytesToInt(data, index, ByteOrder.BIG_ENDIAN);\n\t\tindex+=4;\n\t\tthis.setHash(new java.lang.String(data, index, hashSize));\n\t\tindex+=hashSize;\n\t\tthis.requestorHashSize = BitConverter.bytesToInt(data, index, ByteOrder.BIG_ENDIAN);\n\t\tindex+=4;\n\t\tthis.setRequestorHash(new java.lang.String(data, index, requestorHashSize));\n\t\tindex+=requestorHashSize;\n\t\tthis.setCommand(data[index]);\n\t\tindex++;\n\t\t\n\t}", "public DValParser(byte[] data)\r\n/* 18: */ {\r\n/* 19: 72 */ int options = IntegerHelper.getInt(data[0], data[1]);\r\n/* 20: */ \r\n/* 21: 74 */ this.promptBoxVisible = ((options & PROMPT_BOX_VISIBLE_MASK) != 0);\r\n/* 22: 75 */ this.promptBoxAtCell = ((options & PROMPT_BOX_AT_CELL_MASK) != 0);\r\n/* 23: 76 */ this.validityDataCached = ((options & VALIDITY_DATA_CACHED_MASK) != 0);\r\n/* 24: */ \r\n/* 25: 78 */ this.objectId = IntegerHelper.getInt(data[10], data[11], data[12], data[13]);\r\n/* 26: 79 */ this.numDVRecords = IntegerHelper.getInt(data[14], data[15], \r\n/* 27: 80 */ data[16], data[17]);\r\n/* 28: */ }", "public Item()\r\n\t{\r\n\t\tserialNum = 00000;\r\n\t\tweight = 0.0;\r\n\t}", "public OctopusCollectedMsg(net.tinyos.message.Message msg, int base_offset, int data_length) {\n super(msg, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public Id5320DataFile()\n\t{\n\t\tlineLength = OFF_CUSTOMER_NAME + LEN_CUSTOMER_NAME;\n\t}", "public ISOCommandAPDU(int size, byte classByte, byte instruction, byte p1, byte p2, byte[] data) {\n this(size, classByte, instruction, p1, p2, data, -1);\n }", "public TextObjectBaseRecord(short id, short size, byte [] data, int offset)\n {\n super(id, size, data, offset);\n \n }", "@SuppressWarnings(\"deprecation\")\n public IClass(ConfigurationSection cs)\n {\n this.items = new ArrayList<>();\n\n this.name = cs.getString(\"name\").replace(\"&\", \"§\");\n this.description = cs.getString(\"description\").replace(\"&\", \"§\");\n this.permission = cs.getString(\"permission\");\n\n this.helmet = Material.getMaterial(cs.getInt(\"armor.helmet\"));\n this.chestplate = Material.getMaterial(cs.getInt(\"armor.chestplate\"));\n this.leggings = Material.getMaterial(cs.getInt(\"armor.leggings\"));\n this.boots = Material.getMaterial(cs.getInt(\"armor.boots\"));\n\n for (String s : cs.getStringList(\"items\"))\n {\n String[] ss = s.split(\",\");\n int id = Integer.parseInt(ss[0]);\n int amount = Integer.parseInt(ss[1]);\n short damage = Short.parseShort(ss[2]);\n ItemStack is = new ItemStack(Material.getMaterial(id), amount, damage);\n items.add(is);\n }\n }", "ItemType(String itemCode) {\n code = itemCode;\n }", "public OctopusCollectedMsg(int data_length, int base_offset) {\n super(data_length, base_offset);\n amTypeSet(AM_TYPE);\n }", "public Desk(ArrayList<String> data, int price) {\n super(data.get(0), data.get(1), price, data.get(2));\n this.legs = stringToBoolean(data.get(3));\n this.top = stringToBoolean(data.get(4));\n this.drawer = stringToBoolean(data.get(5));\n\n if (data.size() > 6) {\n throw new IllegalArgumentException(\"ArrayList is too large\");\n }\n }", "public EveningStandard()\n\t{\n\t\tsuper(TAG_ITEM_ITEMS,\n\t\t\t\tnew int[]{TAG_TITLE},\n\t\t\t\tnew int[]{TAG_LINK},\n\t\t\t\tnew int[]{TAG_DESCRIPTION},\n\t\t\t\tnew int[]{},\n\t\t\t\tnew int[]{TAG_PUBDATE},\n\t\t\t\tnew int[]{},\n\t\t\t\tnew int[]{TAG_MEDIA_CONTENT},\n\t\t\t\t\"\");\n\t}", "protected Block(short id, byte data) {\n this.id = id;\n this.data = data;\n }", "public ItemRecord(String itemid, String productid, BigDecimal listprice, BigDecimal unitcost, Integer supplier, String status, String attr1, String attr2, String attr3, String attr4, String attr5) {\n super(Item.ITEM);\n\n set(0, itemid);\n set(1, productid);\n set(2, listprice);\n set(3, unitcost);\n set(4, supplier);\n set(5, status);\n set(6, attr1);\n set(7, attr2);\n set(8, attr3);\n set(9, attr4);\n set(10, attr5);\n }", "public ChannelCodeInnerDetail(ChannelCodeInnerDetail source) {\n if (source.Id != null) {\n this.Id = new Long(source.Id);\n }\n if (source.Type != null) {\n this.Type = new Long(source.Type);\n }\n if (source.Source != null) {\n this.Source = new String(source.Source);\n }\n if (source.SourceName != null) {\n this.SourceName = new String(source.SourceName);\n }\n if (source.Name != null) {\n this.Name = new String(source.Name);\n }\n if (source.UseUserIdList != null) {\n this.UseUserIdList = new Long[source.UseUserIdList.length];\n for (int i = 0; i < source.UseUserIdList.length; i++) {\n this.UseUserIdList[i] = new Long(source.UseUserIdList[i]);\n }\n }\n if (source.UseUserOpenIdList != null) {\n this.UseUserOpenIdList = new String[source.UseUserOpenIdList.length];\n for (int i = 0; i < source.UseUserOpenIdList.length; i++) {\n this.UseUserOpenIdList[i] = new String(source.UseUserOpenIdList[i]);\n }\n }\n if (source.TagList != null) {\n this.TagList = new WeComTagDetail[source.TagList.length];\n for (int i = 0; i < source.TagList.length; i++) {\n this.TagList[i] = new WeComTagDetail(source.TagList[i]);\n }\n }\n if (source.SkipVerify != null) {\n this.SkipVerify = new Long(source.SkipVerify);\n }\n if (source.Friends != null) {\n this.Friends = new Long(source.Friends);\n }\n if (source.Remark != null) {\n this.Remark = new String(source.Remark);\n }\n if (source.MsgId != null) {\n this.MsgId = new Long(source.MsgId);\n }\n if (source.ConfigId != null) {\n this.ConfigId = new String(source.ConfigId);\n }\n if (source.QrCodeUrl != null) {\n this.QrCodeUrl = new String(source.QrCodeUrl);\n }\n if (source.RecStatus != null) {\n this.RecStatus = new Long(source.RecStatus);\n }\n if (source.AppId != null) {\n this.AppId = new String(source.AppId);\n }\n }", "public DataNode(Item item, ParentNode parent) {\n m_item = item;\n m_parent = parent;\n AnnotatedBase comp = item.getSchemaComponent();\n int comptype = comp.type();\n m_named = (comptype == SchemaBase.ATTRIBUTE_TYPE || comptype == SchemaBase.ELEMENT_TYPE) &&\n ((INamed)comp).getName() != null;\n Item topmost = item.getTopmost();\n boolean optional = topmost.isOptional();\n if (parent != null && ((GroupItem)parent.getItem()).isInline() && !parent.isNamed()) {\n optional = optional || parent.isOptional();\n }\n m_optional = optional;\n m_ignored = item.isIgnored();\n if (m_ignored) {\n m_type = null;\n m_collection = false;\n } else {\n boolean collection = topmost.isCollection();\n if (item instanceof ValueItem) {\n \n // value item will always be a primitive or wrapper value\n JavaType jtype = ((ValueItem)item).getType();\n m_type = jtype.getPrimitiveName();\n if (m_type == null || topmost.isOptional() || topmost.isCollection() || parent.isCollection()) {\n m_type = jtype.getClassName();\n }\n \n } else if (item instanceof ReferenceItem) {\n \n // reference item as value will always be a reference to the definition class\n m_type = ((ReferenceItem)item).getDefinition().getGenerateClass().getFullName();\n \n } else if (item instanceof AnyItem) {\n \n // xs:any handling determines value type\n switch (item.getComponentExtension().getAnyType()) {\n \n case NestingCustomBase.ANY_DISCARD:\n m_type = null;\n collection = false;\n break;\n \n case NestingCustomBase.ANY_DOM:\n m_type = \"org.w3c.dom.Element\";\n break;\n \n case NestingCustomBase.ANY_MAPPED:\n m_type = \"java.lang.Object\";\n break;\n \n default:\n throw new IllegalStateException(\"Internal error - unknown xs:any handling\");\n \n }\n \n } else if (!((GroupItem)item).isInline()) {\n \n // group item as value will always be a reference to the group class\n m_type = ((GroupItem)item).getGenerateClass().getFullName();\n \n }\n m_collection = collection;\n }\n if (parent != null) {\n parent.addChild(this);\n }\n }", "ItemType(String code) {\n this.code = code;\n }", "ItemType(String code) {\n this.code = code;\n }", "public OctopusCollectedMsg(byte[] data, int base_offset) {\n super(data, base_offset);\n amTypeSet(AM_TYPE);\n }", "public RxTxMonitoringMsg(int data_length) {\n super(data_length);\n amTypeSet(AM_TYPE);\n }", "public Item(int sn, double w)\r\n\t/*\r\n\t * \t\tsn - serial number\r\n\t * \t\tw - weight\r\n\t */\r\n\t{\r\n\t\tserialNum = sn;\r\n\t\tweight = w;\r\n\t}", "public AdSize(int r7, int r8) {\n /*\n r6 = this;\n r0 = -1\n if (r7 != r0) goto L_0x004c\n java.lang.String r0 = \"FULL\"\n r1 = r0\n L_0x0006:\n r0 = -2\n if (r8 != r0) goto L_0x0052\n java.lang.String r0 = \"AUTO\"\n L_0x000b:\n java.lang.String r2 = \"_as\"\n java.lang.String r2 = java.lang.String.valueOf(r2)\n java.lang.StringBuilder r3 = new java.lang.StringBuilder\n java.lang.String r4 = java.lang.String.valueOf(r1)\n int r4 = r4.length()\n int r4 = r4 + 1\n java.lang.String r5 = java.lang.String.valueOf(r0)\n int r5 = r5.length()\n int r4 = r4 + r5\n java.lang.String r5 = java.lang.String.valueOf(r2)\n int r5 = r5.length()\n int r4 = r4 + r5\n r3.<init>(r4)\n java.lang.StringBuilder r1 = r3.append(r1)\n java.lang.String r3 = \"x\"\n java.lang.StringBuilder r1 = r1.append(r3)\n java.lang.StringBuilder r0 = r1.append(r0)\n java.lang.StringBuilder r0 = r0.append(r2)\n java.lang.String r0 = r0.toString()\n r6.<init>(r7, r8, r0)\n return\n L_0x004c:\n java.lang.String r0 = java.lang.String.valueOf(r7)\n r1 = r0\n goto L_0x0006\n L_0x0052:\n java.lang.String r0 = java.lang.String.valueOf(r8)\n goto L_0x000b\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.ads.AdSize.<init>(int, int):void\");\n }", "public TagData(byte[] epc)\n {\n this(epc, null);\n }", "public Item(final int t, final int i, final int c) {\n\t\ttype = t;\n\t\tid = i;\n\t\tcount = c;\n\t\t//type = ItemType.BLOCK;\n\t}", "public ConfigurationItem(URI _uri, InputStream _item, RevisionID _revision)\r\n\t{\r\n\t\titem \t= _item;\r\n\t\turi \t= _uri;\r\n\t\trevision= _revision;\r\n\t\ttype \t= null;\r\n\t\tuser \t= null;\r\n\t}", "public ASNClassNumber() {\n }", "public ConsumableItem(String name, String description, int numItem, char symbol) \n {\n this.name = name;\n this.description = description;\n this.numItem = numItem;\n this.symbol = symbol;\n }", "public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2, int le) {\n this(4+2, classByte, instruction, p1, p2, null, le); // size = header length + le\n }", "public LineData()\n\t{\n\t}", "public PassPinDataItem() {\n }", "public Token(I2PAppContext ctx, byte[] data) {\n super(data);\n // lets not get carried away\n if (data.length > MAX_TOK_LEN)\n throw new IllegalArgumentException();\n lastSeen = ctx.clock().now();\n }", "public LogisticsInputVO(String sender_name, String sender_address, String sender_organization,\n\t\t\tString sender_telephone, String sender_mobilephone,\n\t\t String recipient_name, String recipient_address, String recipient_organization,\n\t\t \tString recipient_telephone, String recipient_mobilephone,\n\t\t String bar_code, int original_number, double weight, double size, String internal_name,\n\t\t LogisticsType type, PackingCharge pack, double total_cost, String starting, String destination,\n\t\t Date send_date, Date receive_date, String courier) {\n\t\t\n\t\tthis.sender_name = sender_name;\n\t\tthis.sender_address = sender_address;\n\t\tthis.sender_organization = sender_organization;\n\t\tthis.sender_telephone = sender_telephone;\n\t\tthis.sender_mobilephone = sender_mobilephone;\n\t\t\n\t\tthis.recipient_name = recipient_name;\n\t\tthis.recipient_address = recipient_address;\n\t\tthis.recipient_organization = recipient_address;\n\t\tthis.recipient_telephone = recipient_telephone;\n\t\tthis.recipient_mobilephone = recipient_mobilephone;\n\t\t\n\t\tthis.bar_code = bar_code;\n\t\tthis.original_number = original_number;\n\t\tthis.weight = weight;\n\t\tthis.size = size;\n\t\tthis.internal_name = internal_name;\n\t\tthis.type = type;\n\t\tthis.pack = pack;\n\t\tthis.total_cost = total_cost;\n\t\tthis.starting = starting;\n\t\tthis.destination = destination;\n\t\tthis.send_date = send_date;\n\t\tthis.receive_date = receive_date;\n\t\tthis.courier = courier;\n\t}", "public block(String index, String tag, int[] data){\n this.tag = tag;\n this.index = index;\n valid = 1;\n this.data = data;\n }", "protected void create(AttributeList attributeList) {\n super.create(attributeList);\n oracle.jbo.server.SequenceImpl s =new oracle.jbo.server.SequenceImpl(\"CUST_MNJ_ONT_SO_OBIN_SIZLINE_S\",getDBTransaction());\n oracle.jbo.domain.Number sVal = s.getSequenceNumber();\n setSoObinslineId(sVal);\n }", "private CoverageInformationItem(Location location, long count, String modelName, int layer)\r\n {\r\n this.location = location;\r\n this.locationString = this.location.toString();\r\n this.count = count;\r\n this.modelName = modelName;\r\n this.layer = layer;\r\n }", "public OctopusCollectedMsg(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }", "public SmartGatewayExpandableAdapter(List<MultiItemEntity> data) {\n super(data);\n addItemType(TYPE_LEVEL_0, R.layout.item_smart_gateway_lv0);\n addItemType(VERSION_INFO, R.layout.item_version_layout);\n addItemType(MEMORY_INFO, R.layout.item_memory_status_layout);\n addItemType(HARD_DISK_INFO,R.layout.item_hard_disk_status_layout);\n addItemType(STATIC_ROUTER_INFO,R.layout.item_static_router_layout);\n addItemType(FIRE_WALL_INFO,R.layout.item_fire_wall_layout);\n addItemType(SYSTEM_LOG_INFO,R.layout.item_system_log_layout);\n }", "VTClass(String crn, String course, String title, String type, \n\t\t\tString cHrs, String size, String instructor, String days, \n\t\t\tString additionalDay, String beginTime, String additionalBeginTime,\n\t\t\tString endTime, String additionalEndTime, String location, String additionalLocation){\n\t\n\t\tthis.CRN = crn;\n\t\tthis.course = course;\n\t\tthis.title = title;\n\t\tthis.type = type;\n\t\tthis.creditHours = cHrs;\n\t\tthis.capacity = size;\n\t\tthis.instructor = instructor;\n\t\tthis.days = days;\n\t\tthis.additionalDay = additionalDay;\n\t\tthis.beginTime = beginTime;\n\t\tthis.additionalBeginTime = additionalBeginTime;\n\t\tthis.endTime = endTime;\n\t\tthis.additionalEndTime = additionalEndTime;\n\t\tthis.location = location;\n\t\tthis.additionalLocation = additionalLocation;\n\t}", "public OCBase(OCInteger lenType)\r\n {\r\n this.lenType = lenType;\r\n }", "public Struct(String a, int b){\r\n\tid=a;\r\n\tsize=b;\t\r\n\tform=0;\r\n }", "public TagData(String epc)\n {\n this(epc, null);\n }", "public Str(byte[] data) {\n unpack(data);\n }", "public /* synthetic */ CinemaDescriptionItem(String str, int i2, int i3, f fVar) {\n this(str, (i3 & 2) != 0 ? 3 : i2);\n }", "public ComponentSampleModel(int dataType, int w, int h, int pixelStride, int scanlineStride,\n int bandOffsets[]) {\n super(dataType, w, h, bandOffsets.length);\n this.dataType = dataType;\n this.pixelStride = pixelStride;\n this.scanlineStride = scanlineStride;\n this.bandOffsets = (int[]) bandOffsets.clone();\n numBands = this.bandOffsets.length;\n if (pixelStride < 0) {\n throw new IllegalArgumentException(\"Pixel stride must be >= 0\");\n }\n // TODO - bug 4296691 - remove this check\n if (scanlineStride < 0) {\n throw new IllegalArgumentException(\"Scanline stride must be >= 0\");\n }\n if (numBands < 1) {\n throw new IllegalArgumentException(\"Must have at least one band.\");\n }\n if ((dataType < DataBuffer.TYPE_BYTE) || (dataType > DataBuffer.TYPE_DOUBLE)) {\n throw new IllegalArgumentException(\"Unsupported dataType.\");\n }\n bankIndices = new int[numBands];\n for (int i = 0; i < numBands; i++) {\n bankIndices[i] = 0;\n }\n verify();\n }", "public CPCAdapter(String code) {\n super();\n operationCode = code;\n if (code.equalsIgnoreCase(COPY))\n codeIndex = 0;\n else if (code.equalsIgnoreCase(CUT))\n codeIndex = 1;\n else if (code.equalsIgnoreCase(PASTE))\n codeIndex = 2;\n else\n System.out.println(\"wrong specfication of operation\");\n }", "VTClass(String crn, String course, String title, String type, \n\t\t\tString cHrs, String size, String instructor, String days, String beginTime,\n\t\t\tString endTime, String location){\n\t\n\t\tthis.CRN = crn;\n\t\tthis.course = course;\n\t\tthis.title = title;\n\t\tthis.type = type;\n\t\tthis.creditHours = cHrs;\n\t\tthis.capacity = size;\n\t\tthis.instructor = instructor;\n\t\tthis.days = days;\n\t\tthis.additionalDay = \"\";\n\t\tthis.beginTime = beginTime;\n\t\tthis.additionalBeginTime = \"\";\n\t\tthis.endTime = endTime;\n\t\tthis.additionalEndTime = \"\";\n\t\tthis.location = location;\n\t\tthis.additionalLocation = \"\";\n\t}", "public ExchangeRate(Parcel in) {\r\n\t\t_header = in.readParcelable(HeaderInfo.class.getClassLoader());\r\n\t\t\r\n\t\t_currencies = new ArrayList<CurrencyInfo>(DEFAULT_SIZE);\r\n\t\tin.readTypedList(this._currencies, new Parcelable.Creator<CurrencyInfo>() {\r\n\t\t\t@Override\r\n\t\t\tpublic CurrencyInfo createFromParcel(Parcel source) {\r\n\t\t\t\treturn new CurrencyInfo(source);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic CurrencyInfo[] newArray(int size) {\r\n\t\t\t\treturn new CurrencyInfo[size];\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t_currencyCodesCache = new ArrayList<String>(DEFAULT_SIZE);\r\n\t\tin.readList(_currencyCodesCache, null);\r\n\t}", "protected AbstractSpliterator(long param1Long, int param1Int) {\n/* 1274 */ this.est = param1Long;\n/* 1275 */ this.characteristics = ((param1Int & 0x40) != 0) ? (param1Int | 0x4000) : param1Int;\n/* */ }", "public GcdSequenceFormat()\n {\n }", "@Override\n protected void readConstructorParams( DataInput in ) throws\n\t\t\t\t\t\t\tIOException {\n vertexCount = in.readInt();\n vertexFormat = in.readInt();\n texCoordSetCount = in.readInt();\n texCoordSetMap = new int[in.readInt()];\n for(int i=0; i<texCoordSetMap.length; i++)\n texCoordSetMap[i] = in.readInt();\n\n super.readConstructorParams( in );\n }", "public CachableItem(String url, Object payload,int size)\n {\n this.url=url;\n this.payload=payload;\n this.payloadSize=size;\n priorityNumber=0;\n }", "public RxTxMonitoringMsg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public CBS(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2) {\n this(4, classByte, instruction, p1, p2, null, -1); // size = header length\n }", "public Struct(String b){\r\n\tid=b;\r\n\tsize=0;\r\n\tform=0;\r\n }", "public ItemInfo () {}", "public CSVList(String svl)\n\t{\n\t\tsuper(svl, sepReg, sep);\n\t}", "public DataBlock() {\n headerPointer = 0;\n datasPointer = size - 1;\n serialize = new byte[size];\n }", "public APIFormat(AS400 system, String name) {\r\n\r\n this.system = system;\r\n this.name = name;\r\n this.length = -1;\r\n this.fields = null;\r\n\r\n this.int4Conv = null;\r\n this.charConv = null;\r\n this.dateTimeConv = null;\r\n\r\n this.offset = 0;\r\n }", "public XpeDccContractLineImpl() {\n }", "public StringDataList() {\n }", "public Payload() {}", "public SIASES() {\n\t\tsuper();\n\n\t\tm_iChunkSize = 10;\n\t\tm_sLastUser = EMPTY_STR;\n\t\tm_sLastGroup = EMPTY_STR;\n\t\tm_bIsDriverLoaded = false;\n\t\tit = null;\n\n\t\tif (isDebug == true) {\n\t\t\tlog.debug(\"Construtor: <valor m_iChunkSize: \" + m_iChunkSize\n\t\t\t\t\t+ \"> <valor m_sLastUser: \" + m_sLastUser\n\t\t\t\t\t+ \"> <m_sLastGroup: \" + m_sLastGroup);\n\t\t}\n\n\t}", "public Item(String des, double w){\n description = des;\n weight = w;\n }", "public Version(byte[] msg) throws Exception{\n super(msg);\n\n this.version = ByteBuffer.wrap(Arrays.copyOfRange(data, 0, 4))\n .order(ByteOrder.LITTLE_ENDIAN)\n .getInt();\n this.network_service = ByteBuffer.wrap(Arrays\n .copyOfRange(data, 4, 12)\n )\n .order(ByteOrder.LITTLE_ENDIAN)\n .getLong();\n this.timestamp = ByteBuffer.wrap(\n Arrays\n .copyOfRange(data, 12, 20)\n )\n .order(ByteOrder.LITTLE_ENDIAN)\n .getLong();\n\n this.recipient = new NetAddr(\n Arrays.copyOfRange(data, 20, 46)\n );\n this.sender = new NetAddr(\n Arrays.copyOfRange(data, 46, 72)\n );\n this.nodeId = Arrays.copyOfRange(data, 72, 80);\n\n VarInt len = new VarInt(Arrays.copyOfRange(data, 80, data.length));\n subversion = new String(\n Arrays.copyOfRange(data, 80 + len.getNumBytes(), 80 + len.getNumBytes() + (int)len.getValue())\n );\n\n int endOfSubVersion = 80 + len.getNumBytes() + (int)len.getValue();\n\n lastBlock = ByteBuffer.wrap(\n Arrays.copyOfRange(data, endOfSubVersion, endOfSubVersion + 4)\n ).order(ByteOrder.LITTLE_ENDIAN)\n .getInt();\n\n System.out.println(\"VERSION \" + version + \" - \" + subversion + \" last \" + lastBlock);\n }", "public Item_Record() {\n super(Item_.ITEM_);\n }", "public Item(\n int itemId ,\n int currentQty ,\n int minQty ,\n int maxQty ,\n BufferedImage icon ,\n String label, \n String desc ,\n String attr)\n {\n this.itemId = itemId ;\n this.currentQty=currentQty;\n this.minQty=minQty;\n this.maxQty=maxQty;\n this.icon=icon;\n this.label=label;\n }", "private Node(E dataItem)\n {\n data = dataItem;\n next = null;\n }", "public GIPIQuoteItemMC( \tfinal Integer quoteId, \t\tfinal Integer itemNo, \t\tfinal String plateNo,\n \t\t\t \t\t\t\t\tfinal String motorNo, \t\tfinal String serialNo, \t\tfinal String sublineTypeCd,\n \t\t\t \t\t\t\t\tfinal Integer motType, \t\tfinal Integer carCompanyCd, final Integer cocYy,\n \t\t\t \t\t\t\t\tfinal Integer cocSeqNo, \tfinal Integer cocSerialNo, \tfinal String cocType,\n \t\t\t \t\t\t\t\tfinal BigDecimal repairLim, final String color, \t\tfinal String modelYear, \n \t\t\t \t\t\t\t\tfinal String make,\t\t\tfinal BigDecimal estValue, \tfinal BigDecimal towing, \t\n \t\t\t \t\t\t\t\tfinal String assignee,\t\tfinal Integer noOfPass, \tfinal String tariffZone, \t\n\t\t\t\t\t \t\t\tfinal Date cocIssueDate,\tfinal String mvFileNo, \t\tfinal String acquiredFrom, \t\n\t\t\t\t\t \t\t\tfinal String ctvTag,\t\tfinal Integer typeOfBodyCd, final String unladenWt, \t\n\t\t\t\t\t \t\t\tfinal Integer makeCd,\t\tfinal Integer seriesCd,\t \tfinal String basicColorCd,\t\n\t\t\t\t\t \t\t\tfinal Integer colorCd,\t\tfinal String origin, \t\tfinal String destination, \t\n\t\t\t\t\t \t\t\tfinal String cocAtcn,\t\tfinal String userId, \t\tfinal Date lastUpdate, \t\t\n\t\t\t\t\t \t\t\tfinal String sublineCd)\t{\n \t\t\n \t\tthis.quoteId = quoteId;\n \t\tthis.itemNo = itemNo;\n \t\tthis.plateNo = plateNo;\n \t\tthis.motorNo = motorNo;\n \t\tthis.serialNo = serialNo;\n \t\tthis.sublineTypeCd = sublineTypeCd;\n \t\tthis.motType = motType;\n \t\tthis.carCompanyCd = carCompanyCd;\n \t\tthis.cocYy = cocYy;\n \t\tthis.cocSeqNo = cocSeqNo;\n \t\tthis.cocSerialNo = cocSerialNo;\n \t\tthis.cocType = cocType;\n \t\tthis.repairLim = repairLim;\n \t\tthis.color = color;\n \t\tthis.modelYear = modelYear;\n \t\tthis.make = make;\n \t\tthis.estValue = estValue;\n \t\tthis.towing = towing;\n \t\tthis.assignee = assignee;\n \t\tthis.noOfPass = noOfPass;\n \t\tthis.tariffZone = tariffZone;\n \t\tthis.cocIssueDate = cocIssueDate;\n \t\tthis.mvFileNo = mvFileNo;\n \t\tthis.acquiredFrom = acquiredFrom;\n \t\tthis.ctvTag = ctvTag;\n \t\tthis.typeOfBodyCd = typeOfBodyCd;\n \t\tthis.unladenWt = unladenWt;\n \t\tthis.makeCd = makeCd;\n \t\tthis.seriesCd = seriesCd;\n \t\tthis.basicColorCd = basicColorCd;\n \t\tthis.colorCd = colorCd;\n \t\tthis.origin = origin;\n \t\tthis.destination = destination;\n \t\tthis.cocAtcn = cocAtcn;\n \t\tsuper.setUserId(userId);\n \t\tsuper.setLastUpdate(lastUpdate);\n \t\tthis.sublineCd = sublineCd;\n \t\t\n \t}", "public StringData() {\n\n }", "public ProductSKUInfo(List<SKUAttrInfo> attributes, String cargoNumber, Integer amountOnSale, Double retailPrice, Double price, List<ProductPriceRange> priceRange, String skuCode, Long skuId, String specId) {\n this.attributes = attributes;\n this.cargoNumber = cargoNumber;\n this.amountOnSale = amountOnSale;\n this.retailPrice = retailPrice;\n this.price = price;\n this.priceRange = priceRange;\n this.skuCode = skuCode;\n this.skuId = skuId;\n this.specId = specId;\n }", "EquipmentSubType(int index, String description) {\r\n _index = index;\r\n _description = description;\r\n }", "public Item(String line) {\n\t\tString components[] = line.split(\":\",2);\n\t\tif(components.length != 2) {\n\t\t\t//System.err.println(\"Couldn't parse item! Original line: \"+line);\n\t\t\treturn;\n\t\t}\n\t\tthis.identifier = components[0].trim();\n\t\tthis.title = components[1].trim();\n\t}", "public Data(String itemId, String itemDescription) {\n this.itemId = itemId;\n this.itemDescription = itemDescription;\n }", "public PurchaseType(java.lang.String code)\r\n {\r\n super(code);\r\n }", "public STCASHUNITINFO() {\n\t\tsuper(Structure.ALIGN_NONE);\n\t}", "public Int8Msg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public SectionDesc ()\r\n {\r\n }", "protected abstract T create(ICalDataType dataType, SemiStructuredValueIterator it);", "public DataBlock(byte[] serialize) {\n this.serialize = serialize;\n int[] pointers = findPointer();\n headerPointer = pointers[0];\n datasPointer = pointers[1];\n }", "public ProductListContract() {}", "public StrumInstrument(String type, String manufacturer, int nrStrings, double stringSize) {\n super(type, manufacturer);\n this.nrStrings = nrStrings;\n this.stringSize = stringSize;\n }", "protected void readConstructorParams( DataInput in ) throws\n\t\t\t\t\t\t\tIOException {\n }", "public Asn1FormatException() {\n super();\n }" ]
[ "0.76793873", "0.7371821", "0.5416792", "0.52385634", "0.5218183", "0.5211045", "0.51654935", "0.516012", "0.5152956", "0.5116243", "0.511216", "0.51096976", "0.5109098", "0.50579816", "0.5037538", "0.5037292", "0.50156057", "0.5013939", "0.50134945", "0.50031537", "0.49891514", "0.49775398", "0.49739784", "0.4969116", "0.49112225", "0.49020445", "0.489401", "0.48866004", "0.48812816", "0.48782703", "0.4866077", "0.4849105", "0.484848", "0.484848", "0.48437768", "0.48406464", "0.48402467", "0.4840059", "0.48373944", "0.48350504", "0.4823039", "0.48218194", "0.48195824", "0.481905", "0.481221", "0.47992262", "0.47937056", "0.47889102", "0.47830248", "0.478075", "0.4780136", "0.47776785", "0.47768143", "0.4773243", "0.47695568", "0.47650975", "0.47604862", "0.47506666", "0.47473294", "0.47437125", "0.47422144", "0.4737893", "0.4735468", "0.4733788", "0.4730831", "0.47256708", "0.4718938", "0.47113293", "0.47074914", "0.46976507", "0.46969035", "0.46935079", "0.46872005", "0.46865264", "0.4686112", "0.4684275", "0.4676185", "0.4675723", "0.4669409", "0.46474862", "0.46433517", "0.46365437", "0.4629292", "0.46290857", "0.46283078", "0.46256697", "0.46192542", "0.46134418", "0.46125156", "0.46058318", "0.46051618", "0.45960614", "0.45944723", "0.45924598", "0.45923376", "0.4591377", "0.45888418", "0.45879728", "0.45852956", "0.4580903" ]
0.7527197
1
Return the minimum number of length bytes required based on the specified length. The maximum length of a SECSItem in its "wire/transmission format" is 16777215 (stored in 24 bits).
private static SECSItemNumLengthBytes calculateMinimumNumberOfLengthBytes(int length) { SECSItemNumLengthBytes result = SECSItemNumLengthBytes.ONE; if (length > 255) { if (length < 65536) result = SECSItemNumLengthBytes.TWO; else result = SECSItemNumLengthBytes.THREE; } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getMinLength() {\n\t\treturn minLength;\n\t}", "public SECSItemNumLengthBytes getInboundNumberOfLengthBytes()\n {\n return inboundNumberOfLengthBytes;\n }", "public int minLen() {\n if (compositions == null) {\n return Math.min(maxLen(getAllele(0)), maxLen(getAllele(1)));\n } else {\n if (compositions.isEmpty())\n return 0;\n int minLen = compositions.get(0).minLen();\n for (Variant c : compositions) {\n minLen = Math.min(minLen, c.minLen());\n }\n return minLen;\n }\n }", "private int getLength() throws IOException {\n\n int i = in.read();\n if ( i == -1 ) {\n throw new IOException( BaseMessages\n .getString( MQTTPublisherMeta.PKG, \"MQTTClientSSL.Error.InvalidDERLengthMissing\" ) );\n }\n\n // A single byte short length\n if ( ( i & ~0x7F ) == 0 ) {\n return i;\n }\n\n int num = i & 0x7F;\n\n // We can't handle length longer than 4 bytes\n if ( i >= 0xFF || num > 4 ) {\n throw new IOException(\n BaseMessages.getString( MQTTPublisherMeta.PKG, \"MQTTClientSSL.Error.InvalidDERFieldTooBig\", i ) );\n }\n\n byte[] bytes = new byte[num];\n int n = in.read( bytes );\n if ( n < num ) {\n throw new IOException(\n BaseMessages.getString( MQTTPublisherMeta.PKG, \"MQTTClientSSL.Error.InvalidDERLengthTooShort\" ) );\n }\n\n return new BigInteger( 1, bytes ).intValue();\n }", "int minLength();", "public int getLength()\n {\n return encryptionDictionary.getInt( \"Length\", 40 );\n }", "Long payloadLength();", "public int get_length();", "public int minReadLength() {\n return mMinReadLength;\n }", "public int errorStringLength()\n {\n return frameLength() - offendingHeaderFrameLength() - ErrorFlyweight.HEADER_LENGTH;\n }", "int getLowBitLength();", "public int getLength() {\n\t\treturn length & 0xffff;\n\t}", "private long getFlowSizeByte(long seq) {\n return Math.min(MAX_SEGMENT_SIZE, flowSizeByte - seq + 1);\n }", "public int getMaxLength();", "private int getLength() throws IOException {\n\n\t\t\tint i = this.in.read();\n\t\t\tif (i == -1) {\n\t\t\t\tthrow new IllegalStateException(\"Invalid DER: length missing\");\n\t\t\t}\n\n\t\t\t// A single byte short length\n\t\t\tif ((i & ~0x7F) == 0) {\n\t\t\t\treturn i;\n\t\t\t}\n\n\t\t\tint num = i & 0x7F;\n\n\t\t\t// We can't handle length longer than 4 bytes\n\t\t\tif (i >= 0xFF || num > 4) {\n\t\t\t\tthrow new IllegalStateException(\"Invalid DER: length field too big (\" + i + \")\");\n\t\t\t}\n\n\t\t\tbyte[] bytes = new byte[num];\n\t\t\tint n = this.in.read(bytes);\n\t\t\tif (n < num) {\n\t\t\t\tthrow new IllegalStateException(\"Invalid DER: length too short\");\n\t\t\t}\n\n\t\t\treturn new BigInteger(1, bytes).intValue();\n\t\t}", "public SECSItemNumLengthBytes getOutboundNumberOfLengthBytes()\n {\n return outboundNumberOfLengthBytes;\n }", "private int getKeyLength() {\n MongoCursor<Document> cursor = this.keystoreCollection.find(eq(\"conf\", \"homomorphic-keylength\")).iterator();\n\n int keyLength = 2048; // Default value is 2048 bits\n while (cursor.hasNext()) {\n keyLength = cursor.next().getDouble(\"keylength\").intValue();\n }\n return keyLength;\n }", "public static int size_length() {\n return (8 / 8);\n }", "public int getMinimumNumberOfCharacters() {\n\t\treturn this.minimumNumberOfCharacters;\n\t}", "public Integer getMaxLength() { \n\t\treturn getMaxLengthElement().getValue();\n\t}", "public int getLength()\n\t{\n\t\treturn (int) length;\n\t}", "BigInteger getLength();", "public abstract int getMaxLength();", "public static int sizeBits_estLength() {\n return 8;\n }", "long getFullMessageLength();", "public String getMinimumPasswordLength() {\n return (String) get(\"minimum_password_length\");\n }", "public long getLength();", "public long getLength();", "public static int size_estLength() {\n return (8 / 8);\n }", "public int getPacketLength() {\n return TfsConstant.INT_SIZE * 3 + failServer.size() * TfsConstant.LONG_SIZE;\n }", "public int getMaxChainLength(){\r\n return maxChainLength;\r\n }", "public synchronized int getLowerSizeLimit() {\n \t\treturn lower;\n \t}", "public static int size_min() {\n return (8 / 8);\n }", "int getServerPayloadSizeBytes();", "public static int sizeBits_min() {\n return 8;\n }", "LengthSmaller createLengthSmaller();", "public void setOutboundNumberOfLengthBytes(int length, SECSItemNumLengthBytes desiredNumberOfLengthBytes)\n {\n if (length < 0 || length > 0x00FFFFFF)\n {\n throw new IllegalArgumentException(\n \"The value for the length argument must be between 0 and 16777215 inclusive.\");\n }\n\n outboundNumberOfLengthBytes = calculateMinimumNumberOfLengthBytes(length);\n if (outboundNumberOfLengthBytes.valueOf() < desiredNumberOfLengthBytes.valueOf())\n {\n outboundNumberOfLengthBytes = desiredNumberOfLengthBytes;\n }\n }", "public int getLength() {\r\n\t\treturn length;\r\n\t}", "public long getSize() {\n\t\treturn this.payloadSize; // UTF-16 => 2 bytes per character\n\t}", "public int getLength() {\n/* 83 */ return this.m_attrs.getLength();\n/* */ }", "public int getDERLength() throws TLVEncodingException {\r\n\t\tint length;\r\n\t\tint i = 1;\r\n\r\n\t\tif ((buffer[cursor] & 0x80) == 0x80) {\r\n\t\t\ti = buffer[cursor] & 0x07;\r\n\t\t\tcursor++;\r\n\t\t}\r\n\r\n\t\tif (cursor + i > limit)\r\n\t\t\tthrow new TLVEncodingException(\"Invalid DER length field\");\r\n\r\n\t\tlength = 0;\r\n\t\tfor (; i > 0; i--) {\r\n\t\t\tlength = (length << 8) | (buffer[cursor++] & 0xFF);\r\n\t\t}\r\n\r\n\t\treturn length;\r\n\t}", "int getMaxPackLen()\n {\n return configfile.max_pack_len;\n }", "public static int minBytes(long l) {\n\t\tint bits = minBits(l);\n\t\tif (bits == 0)\n\t\t\treturn 1;\n\t\treturn ((bits - 1) >>> 3) + 1;\n\t}", "public final int getLength()\n {\n return m_firstFree;\n }", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getMaxListLength();", "public int minBytesPerChar();", "public short getValueLength() throws ToolkitException {\n byte[] buffer = getAPDUBuffer();\n short Lc = (short)(buffer[OFFSET_LC] & 0xFF);\n short TLVOffset = getLastTLVOffset(buffer, Lc);\n if (TLVOffset >= Lc) {\n ToolkitException.throwIt(ToolkitException.UNAVAILABLE_ELEMENT);\n }\n return (short)(buffer[(short)\n\t\t\t (TLVOffset + 1)] & 0xFF); // return the length\n }", "public int getLength()\n\t{\n\t\treturn length;\n\t}", "public int getLength()\n\t{\n\t\treturn length;\n\t}", "protected abstract int getMaxDesiredSize();", "public static int getMaxSize(){\n\t\treturn 2* 4;\n\t}", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "public int getMinMatchLength() {\n int[] allele = {getAllele(0), getAllele(1)};\n byte[][] alt = {getAlt(allele[0]).getSequence(), getAlt(allele[1]).getSequence()};\n byte[] ref = getReference();\n\n int[] matchLength = {0, 0};\n for (int i = 0; i < 2; i++) {\n for (int j = 0; j < Math.min(ref.length, alt[i].length); j++) {\n if (alt[i][j] == ref[j]) {\n matchLength[i]++;\n } else {\n break;\n }\n }\n }\n return Math.min(matchLength[0], matchLength[1]);\n }", "public int getLength() {\n return mySize.getLength();\n }", "public abstract long getLength();", "public abstract long getLength();", "protected abstract int getLength();", "public int getLength() {\n \t\treturn lengthAsBits;\n \t}", "public int rawLength() {\n\t\treturn length.rawLength() + s.length();\n\t}", "public int getPayloadLength() {\n return buffer.limit() - 12;\n }", "private int length() { return length; }", "public int length() {\r\n int length = 1 + 2 + deviceToken.length + 2 + payload.length;\r\n final int marshalledLength = marshall().length;\r\n assert marshalledLength == length;\r\n return length;\r\n }", "public short getLength() throws ToolkitException {\n byte[] buffer = getAPDUBuffer();\n short length = (short)(buffer[(short)(currentTLVOffset + 1)] & 0xFF);\n return length;\n }", "public String getSleeveLength() {\r\n\t\treturn sleeveLength;\r\n\t}", "public Integer getLength() {\n return _length;\n }", "public Integer getLength() {\n return _length;\n }", "public int getLength() { return length;\t}", "public int getLengthInBytes()\n \t{\n \t\treturn FormatableBitSet.numBytesFromBits(lengthAsBits);\n \t}", "public Integer getMaxLength() {\n\t\treturn maxLength;\n\t}", "int getHighBitLength();", "public int getLength() {return length;}", "public int getMaxLength() {\r\n return _maxLength;\r\n }", "public int getLength() {\r\n return length;\r\n }", "public int getLength() {\r\n return length;\r\n }", "public int getLength() {\r\n return length;\r\n }", "public long length() {\n\tint nBits;\n\tlong x, y;\n\tlong length = 7 + Math.max(minBitsS(toFixed(getTranslateX())),\n\t\t\t\t minBitsS(toFixed(getTranslateY())));\n\tif (hasScale()) {\n\t length += 5 + Math.max(minBitsS(toFixed(getScaleX())),\n\t\t\t\t minBitsS(toFixed(getScaleY())));\n\t}\n\tif (hasRotate()) {\n\t length += 5 + Math.max(minBitsS(toFixed(getRotate1())),\n\t\t\t\t minBitsS(toFixed(getRotate2())));\n\t}\n\treturn length;\n }", "public abstract int getMaxIntermediateSize();", "public int getMaxLength(){\n return this.maxLength;\n }", "public int getLength(){\n\t\treturn length;\n\t}", "public int getLength(){\n\t\treturn length;\n\t}", "public int getLength();", "public int getLength();", "public int getLength();", "int fixedSize();", "public static int sizeBits_length() {\n return 8;\n }" ]
[ "0.662236", "0.6577405", "0.6473382", "0.6288526", "0.62655735", "0.6242282", "0.6234043", "0.61813456", "0.6169914", "0.61675256", "0.61285716", "0.6016072", "0.60155493", "0.5977215", "0.59750885", "0.59578806", "0.5947232", "0.5937184", "0.5935946", "0.5926343", "0.5924077", "0.5903392", "0.5893744", "0.58814514", "0.58772546", "0.58558506", "0.58415335", "0.58415335", "0.5836535", "0.58286476", "0.5826741", "0.5816744", "0.5814915", "0.5807795", "0.5790513", "0.57890886", "0.57788765", "0.574872", "0.5741545", "0.5738636", "0.5734908", "0.5721574", "0.5715081", "0.56994617", "0.56976616", "0.56976616", "0.56976616", "0.56976616", "0.56976616", "0.56976616", "0.56937814", "0.5688922", "0.56853664", "0.5682619", "0.5682619", "0.5676495", "0.5664497", "0.5663256", "0.5663256", "0.5663256", "0.5663256", "0.5663256", "0.5663256", "0.5663256", "0.5663256", "0.5663256", "0.5663256", "0.56620866", "0.5659318", "0.5649138", "0.5649138", "0.56368834", "0.563538", "0.56345564", "0.56329274", "0.56311196", "0.56307214", "0.56296027", "0.5629064", "0.5628486", "0.5628486", "0.56284785", "0.5625919", "0.5623855", "0.5620999", "0.56020766", "0.5601175", "0.55979776", "0.55979776", "0.55979776", "0.5596002", "0.5595118", "0.55923796", "0.55862015", "0.55862015", "0.55835366", "0.55835366", "0.55835366", "0.55833673", "0.5582725" ]
0.8379858
0
Returns the length in bytes of what the outbound item header will require.
protected final int outputHeaderLength() { return outboundNumberOfLengthBytes.valueOf() + 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SECSItemNumLengthBytes getOutboundNumberOfLengthBytes()\n {\n return outboundNumberOfLengthBytes;\n }", "public SECSItemNumLengthBytes getInboundNumberOfLengthBytes()\n {\n return inboundNumberOfLengthBytes;\n }", "public int getLengthInBytes()\n {\n return lengthInBytes;\n }", "public int size()\r\n/* 376: */ {\r\n/* 377:548 */ return this.headers.size();\r\n/* 378: */ }", "public int headerLength();", "public long getLength() {\n try {\n Long temp = (Long)replyHeaders.getHeader(HeaderSet.LENGTH);\n\n if (temp == null) {\n return -1;\n } else {\n return temp.longValue();\n }\n } catch (IOException e) {\n return -1;\n }\n }", "public int length() {\n return numberOfItems;\n }", "public int length() {\n\n\t\treturn numItems;\n\n\t}", "public int getLength()\n {\n return encryptionDictionary.getInt( \"Length\", 40 );\n }", "public int length() {\r\n int length = 1 + 2 + deviceToken.length + 2 + payload.length;\r\n final int marshalledLength = marshall().length;\r\n assert marshalledLength == length;\r\n return length;\r\n }", "public long getBodySize() {\n\t\t\tif (this.headers.containsKey(\"content-length\")) {\n\t\t\t\treturn Long.parseLong(this.headers.get(\"content-length\"));\n\t\t\t} else if (this.splitbyte < this.rlen) {\n\t\t\t\treturn this.rlen - this.splitbyte;\n\t\t\t}\n\t\t\treturn 0;\n\t\t}", "Long payloadLength();", "int getServerPayloadSizeBytes();", "public int returnSize()\r\n {\r\n \treturn length;\r\n }", "int size() {\n return this.header.size();\n }", "protected int getPayloadLength() {\n if (data == null) {\n return 0;\n } else {\n return data.length;\n }\n }", "@MavlinkFieldInfo(\n position = 2,\n unitSize = 4,\n description = \"total data size (set on ACK only).\"\n )\n public final long size() {\n return this.size;\n }", "public int size() {\n\t\tif (baos == null || baos.toByteArray() == null) return 0;\n\t\telse return baos.toByteArray().length;\n\t}", "public int getLength() {\r\n\t\treturn messageData.length;\r\n\t}", "public int getPayloadLength() {\n return buffer.limit() - 12;\n }", "private int getLength() throws IOException {\n\n int i = in.read();\n if ( i == -1 ) {\n throw new IOException( BaseMessages\n .getString( MQTTPublisherMeta.PKG, \"MQTTClientSSL.Error.InvalidDERLengthMissing\" ) );\n }\n\n // A single byte short length\n if ( ( i & ~0x7F ) == 0 ) {\n return i;\n }\n\n int num = i & 0x7F;\n\n // We can't handle length longer than 4 bytes\n if ( i >= 0xFF || num > 4 ) {\n throw new IOException(\n BaseMessages.getString( MQTTPublisherMeta.PKG, \"MQTTClientSSL.Error.InvalidDERFieldTooBig\", i ) );\n }\n\n byte[] bytes = new byte[num];\n int n = in.read( bytes );\n if ( n < num ) {\n throw new IOException(\n BaseMessages.getString( MQTTPublisherMeta.PKG, \"MQTTClientSSL.Error.InvalidDERLengthTooShort\" ) );\n }\n\n return new BigInteger( 1, bytes ).intValue();\n }", "public int getSize()\n\t{\n\t\treturn bytes.length;\n\t}", "public int getInventoryLength() {\n return items.length;\n }", "public long getSize() {\n\t\treturn this.payloadSize; // UTF-16 => 2 bytes per character\n\t}", "public int getSize() throws Exception {\n return header.getSize()+super.getSize();\n }", "public int getLength() {\n return mySize.getLength();\n }", "public int getLength() {\n/* 301 */ return this.stream.getInt(COSName.LENGTH, 0);\n/* */ }", "int getBodyLength();", "public int TotalBytes()\n {\n int totalBytes = request.getContentLength();\n if (totalBytes == -1) return 0;\n return totalBytes;\n }", "public int serializedSizeInBytes() {\n\t\treturn this.sizeInBytes() + 3 * 4;\n\t}", "public int offendingHeaderFrameLength()\n {\n return buffer().getInt(offset() + OFFENDING_HDR_FRAME_LENGTH_FIELD_OFFSET, LITTLE_ENDIAN);\n }", "int getTotalLength() {\n int totalLength = convertMultipleBytesToPositiveInt(mPacket[IP_TOTAL_LENGTH_HIGH_BYTE_INDEX],\n mPacket[IP_TOTAL_LENGTH_LOW_BYTE_INDEX]);\n return totalLength;\n }", "@Override\n public int getSize() {\n return this.numItems;\n }", "public\t ContentLengthHeader getContentLength()\n { \n \treturn this.contentLengthHeader;\n }", "public int getSize() {\n synchronized (itemsList) {\n return itemsList.size();\n }\n }", "public int getByteLength() {\n return byteLength;\n }", "public int getLength()\n {\n return stream.getInt(COSName.LENGTH, 0);\n }", "public int getLength()\n\t{\n\t\treturn (int) length;\n\t}", "public final int length() {\n return this.data.remaining();\n }", "public int getMarshalledSize()\n{\n int marshalSize = 0; \n\n marshalSize += recordType.getMarshalledSize();\n marshalSize += changeIndicator.getMarshalledSize();\n marshalSize += entityType.getMarshalledSize();\n marshalSize += 2; // padding\n marshalSize += 4; // padding1\n\n return marshalSize;\n}", "public int length() {\n\t\treturn size;\r\n\t}", "@Override\n\tpublic int size() {\n\n\t\treturn this.numOfItems;\n\t}", "public int getLength() {\n/* 83 */ return this.m_attrs.getLength();\n/* */ }", "public int getLength()\n\t{\n\t\treturn length;\n\t}", "public int getLength()\n\t{\n\t\treturn length;\n\t}", "public int getLength() {\n return length_;\n }", "public int getLength() {\r\n\t\treturn length;\r\n\t}", "public int getLength() {\n return length_;\n }", "protected int getLength() {\n return length;\n }", "public int errorStringLength()\n {\n return frameLength() - offendingHeaderFrameLength() - ErrorFlyweight.HEADER_LENGTH;\n }", "protected int getLength() {\n\t\treturn this.length;\n\t}", "public int getBytes(){\r\n\t\tint bytes = 0;\r\n\t\tbytes = packet.getLength();\r\n\t\treturn bytes;\r\n\t}", "public int getLovDataByteSize() {\n\t\treturn 0; // sometimes first 4 bytes give the length of data + 4 bytes for number\n\t}", "public int size() {\n return nItems;\n }", "public long getLength();", "public long getLength();", "public int getLength() {\r\n return length;\r\n }", "public int getLength() {\r\n return length;\r\n }", "public int getLength() {\r\n return length;\r\n }", "public int getSize() {\n return this.serialize().limit();\n }", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int size() {\n return bytes.length;\n }", "public int size() {\n return 4 + value.length + BufferUtil.paddingLength(value.length, 4);\n }", "public byte getLength() {\n return this.length;\n }", "public int size() {\r\n if (NumItems > Integer.MAX_VALUE) {\r\n return Integer.MAX_VALUE;\r\n }\r\n return NumItems;\r\n }", "public int get_size();", "public int get_size();", "public synchronized long size() {\n return IDX_START_OF_CONTENT + (slots * bytesPerSlot);\n }", "public int getLength()\n {\n return this.m_descriptor[1] & 0xFF;\n }", "public int getLength() {\n return length;\n }", "public int getLength() {\n return length;\n }", "@Contract(pure = true)\r\n public int getLength() {\r\n return length;\r\n }", "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 int sizeInBytes() {\n\t\treturn this.actualsizeinwords * 8;\n\t}", "public long length() {\r\n return 1 + 4 + buffer.length;\r\n }", "@Override\n public int getLength() {\n return policy.value.length;\n }", "public int size()\r\n {\r\n return nItems;\r\n }", "int getLength() throws IOException;", "private int getLength() throws IOException {\n\n\t\t\tint i = this.in.read();\n\t\t\tif (i == -1) {\n\t\t\t\tthrow new IllegalStateException(\"Invalid DER: length missing\");\n\t\t\t}\n\n\t\t\t// A single byte short length\n\t\t\tif ((i & ~0x7F) == 0) {\n\t\t\t\treturn i;\n\t\t\t}\n\n\t\t\tint num = i & 0x7F;\n\n\t\t\t// We can't handle length longer than 4 bytes\n\t\t\tif (i >= 0xFF || num > 4) {\n\t\t\t\tthrow new IllegalStateException(\"Invalid DER: length field too big (\" + i + \")\");\n\t\t\t}\n\n\t\t\tbyte[] bytes = new byte[num];\n\t\t\tint n = this.in.read(bytes);\n\t\t\tif (n < num) {\n\t\t\t\tthrow new IllegalStateException(\"Invalid DER: length too short\");\n\t\t\t}\n\n\t\t\treturn new BigInteger(1, bytes).intValue();\n\t\t}", "@Override\n public int getLength(){\n \n int count = 0;\n count += super.getLength();\n \n //Add the function\n count += handlerId.length;\n \n //Add the options\n count += socksBytes.length;\n \n //Set the length\n SocketUtilities.intToByteArray(length, count );\n \n return count;\n }", "public int length()\n\t{\n\t\treturn length;\n\t}", "public static int size_receivets() {\n return (32 / 8);\n }", "public abstract String get_size(DataRequest source) throws ConnectorOperationException;", "public int getLength()\n {\n return length;\n }", "public int length() {\n\t\treturn length;\n\t}", "public int length() {\n\t\treturn length;\n\t}", "public int size() {\n \treturn numItems;\n }", "public int getLen(){\n return this.lenInventory;\n }", "public int getLength()\n {\n\treturn length;\n }", "public int getLength() {\n\t\treturn length & 0xffff;\n\t}", "public int numberOfBytes() {\n return this.data.size();\n }", "public int getSizeWithoutHeader() throws Exception {\n return super.getSize();\n }", "public int getLength() {\n return length;\n }", "public Integer getLength() {\n return _length;\n }", "public Integer getLength() {\n return _length;\n }" ]
[ "0.78114855", "0.7144733", "0.6910715", "0.6809242", "0.67788696", "0.6713501", "0.6709758", "0.6678632", "0.66591233", "0.6646881", "0.6646452", "0.662069", "0.6620248", "0.66101044", "0.6563594", "0.6537799", "0.6510165", "0.6480753", "0.64749634", "0.6446515", "0.64454234", "0.6435538", "0.6429921", "0.6424192", "0.6423137", "0.6422095", "0.6415852", "0.6413823", "0.6386662", "0.63683677", "0.6363576", "0.6352355", "0.6348856", "0.633642", "0.63349426", "0.6325163", "0.6296579", "0.62951684", "0.62932533", "0.6293137", "0.62886393", "0.62768644", "0.6273381", "0.6266652", "0.6266652", "0.6251797", "0.62503666", "0.6241443", "0.6239805", "0.6237025", "0.6236495", "0.6233109", "0.62327677", "0.6230308", "0.62286013", "0.62286013", "0.6224906", "0.6224906", "0.6224906", "0.622392", "0.6222338", "0.6222338", "0.6222338", "0.6222338", "0.6222338", "0.6222338", "0.6219586", "0.6219096", "0.62179947", "0.62177646", "0.6209074", "0.6209074", "0.6204632", "0.61961675", "0.61948234", "0.61948234", "0.61930364", "0.6188167", "0.61833686", "0.61819386", "0.6181837", "0.6180695", "0.61778396", "0.61770284", "0.617557", "0.6173752", "0.6172162", "0.6169775", "0.6167048", "0.6163618", "0.6163618", "0.616025", "0.6160098", "0.61591756", "0.6156374", "0.6154328", "0.61533904", "0.61532795", "0.6153154", "0.6153154" ]
0.7252162
1
This method fills in the first 2 to 4 bytes of a SECSItem's value (the SECSItem's header) in its raw wire/transmission format. The first byte contains value of the item's format code and number of length bytes and the next 1 to 3 bytes contain the value of the item's length in bytes. Make sure buffer is large enough!!!
protected final int populateSECSItemHeaderData(byte[] buffer, int numberOfBytes) { int offset = 0; byte[] outputLengthBytes = new byte[]{0, 0, 0, 0}; buffer[0] = (byte)((SECSItemFormatCode.getNumberFromSECSItemFormatCode(formatCode) << 2) | outboundNumberOfLengthBytes.valueOf()); ByteBuffer bb = ByteBuffer.wrap(outputLengthBytes); bb.order(ByteOrder.BIG_ENDIAN); bb.putInt(numberOfBytes); switch(outboundNumberOfLengthBytes) { case ONE: buffer[1] = outputLengthBytes[3]; offset = 2; break; case TWO: buffer[1] = outputLengthBytes[2]; buffer[2] = outputLengthBytes[3]; offset = 3; break; case THREE: buffer[1] = outputLengthBytes[1]; buffer[2] = outputLengthBytes[2]; buffer[3] = outputLengthBytes[3]; offset = 4; break; case NOT_INITIALIZED: System.err.println("The case where outboundNumberOfLengthBytes is still in its NOT_INITIALIZED state should never happen."); break; } return offset; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected SECSItem(byte[] data, int itemOffset)\n {\n if (data == null)\n {\n throw new IllegalArgumentException(\"\\\"data\\\" argument must not be null.\");\n }\n \n if (data.length < 2)\n {\n throw new IllegalArgumentException(\"\\\"data\\\" argument must have a length >= 2.\");\n }\n\n formatCode = SECSItemFormatCode.getSECSItemFormatCodeFromNumber((byte)((data[itemOffset] >> 2) & 0x0000003F));\n \n byte[] temp1 = new byte[4];\n switch(data[itemOffset] & 0x03) // Extract the number of length bytes from the message\n {\n case 0:\n throw new IllegalArgumentException(\"The number of length bytes is not allowed to be ZERO.\");\n case 1:\n inboundNumberOfLengthBytes = SECSItemNumLengthBytes.ONE;\n outboundNumberOfLengthBytes = inboundNumberOfLengthBytes;\n \n temp1[0] = 0;\n temp1[1] = 0;\n temp1[2] = 0;\n temp1[3] = data[itemOffset+1];\n break;\n case 2:\n inboundNumberOfLengthBytes = SECSItemNumLengthBytes.TWO;\n outboundNumberOfLengthBytes = inboundNumberOfLengthBytes;\n if (data.length < 3)\n {\n throw new IllegalArgumentException(\"With two length bytes the minimum length for the \\\"data\\\" argument is 3.\");\n }\n\n temp1[0] = 0;\n temp1[1] = 0;\n temp1[2] = data[itemOffset+1];\n temp1[3] = data[itemOffset+2];\n break;\n case 3:\n inboundNumberOfLengthBytes = SECSItemNumLengthBytes.THREE;\n outboundNumberOfLengthBytes = inboundNumberOfLengthBytes;\n if (data.length < 4)\n {\n throw new IllegalArgumentException(\"With three length bytes the minimum length for the \\\"data\\\" argument is 4.\");\n }\n\n temp1[0] = 0;\n temp1[1] = data[itemOffset+1];\n temp1[2] = data[itemOffset+2];\n temp1[3] = data[itemOffset+3];\n break;\n }\n\n ByteBuffer buf = ByteBuffer.wrap(temp1);\n buf.order(ByteOrder.BIG_ENDIAN);\n lengthInBytes = buf.getInt();\n }", "public abstract byte[] toRawSECSItem();", "protected SECSItem(SECSItemFormatCode formatCode, int length, SECSItemNumLengthBytes desiredNumberOfLengthBytes)\n {\n this.formatCode = formatCode;\n lengthInBytes = length;\n setOutboundNumberOfLengthBytes(length, desiredNumberOfLengthBytes);\n }", "protected SECSItem(SECSItemFormatCode formatCode, int lengthInBytes)\n {\n if (lengthInBytes < 0 || lengthInBytes > 0x00FFFFFF)\n {\n throw new IllegalArgumentException(\n \"The value for the length argument must be between 0 and 16777215 inclusive.\");\n }\n\n this.formatCode = formatCode;\n this.lengthInBytes = lengthInBytes;\n outboundNumberOfLengthBytes = calculateMinimumNumberOfLengthBytes(lengthInBytes);\n }", "private void storeHeaderDataToByte() {\n\t\tString byteNumStr = String.format(\"%24s\",\n\t\t\t\tInteger.toBinaryString(encodedByte.length)).replace(' ',\n\t\t\t\t'0');\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(byteNumStr\n\t\t\t\t.substring(0, 8));\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(byteNumStr\n\t\t\t\t.substring(8, 16));\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(byteNumStr\n\t\t\t\t.substring(16, 24));\n\n\t\t\n\t\tString widthStr = String.format(\"%16s\",\n\t\t\t\tInteger.toBinaryString(width)).replace(' ', '0');\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(widthStr\n\t\t\t\t.substring(0, 8));\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(widthStr\n\t\t\t\t.substring(8, 16));\n\n\t\t\n\t\tString heightStr = String.format(\"%16s\",\n\t\t\t\tInteger.toBinaryString(height)).replace(' ', '0');\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(heightStr\n\t\t\t\t.substring(0, 8));\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(heightStr\n\t\t\t\t.substring(8, 16));\n\n\t\tencodedByte[encodingIndex++] = (byte) numOfTableValue;\n\t\tencodedByte[encodingIndex++] = (byte) byteSizeForCode;\n\t\tencodedByte[encodingIndex++] = (byte) extraBits;\n\t}", "private void serializeHeader(ByteBuffer buffer){\n buffer.putShort(msgType); //2B\n if(srcIP==null) srcIP=\"\";\n String srcIP_temp = srcIP;\n for(int i=0; i<15-srcIP.length(); i++) {\n srcIP_temp = srcIP_temp + \" \";\n }\n buffer.put(srcIP_temp.getBytes()); //15B\n buffer.putInt(srcPort); //4B\n buffer.putFloat(desCost); //4B\n\n String desIP_temp = desIP;\n for(int i=0; i<15-desIP.length(); i++) {\n desIP_temp = desIP_temp + \" \";\n }\n buffer.put(desIP_temp.getBytes()); //15B\n buffer.putInt(desPort);\n }", "@Override\n\tpublic void interpretBytes() {\n\t\telementType = input.getInt(0x14);\n\t\tcardLevel = input.getInt(0x18);\n\t\tcardType = input.getInt(0x1C); // first digit - item type (weapon/accessory/magic/...). second digit - subtype (axe/sword/...). 0 for elements\n\t\t\n\t\tSystem.out.println(elementType);\n\t\tSystem.out.println(cardLevel);\n\t\tSystem.out.println(cardType);\n\t}", "public void Add(String item) {\n byte[] bites = Utils.hexToBytes(item);\n mpBuffer += Utils.bytesToHex(bites);\n mLenght += bites.length;\n mBackOffset = mLenght;\n }", "public void addSDESInfo(RTCPSDES chunk) {\n int ci = 0;\n while (ci < chunk.items.length && chunk.items[ci].type != 1) {\n ci++;\n }\n String s = new String(chunk.items[ci].data);\n String sourceinfocname = null;\n if (this.sourceInfo != null) {\n sourceinfocname = this.sourceInfo.getCNAME();\n }\n if (!(this.sourceInfo == null || s.equals(sourceinfocname))) {\n this.sourceInfo.removeSSRC(this);\n this.sourceInfo = null;\n }\n if (this.sourceInfo == null) {\n this.sourceInfo = this.cache.sourceInfoCache.get(s, this.ours);\n this.sourceInfo.addSSRC(this);\n }\n if (chunk.items.length > 1) {\n for (int i = 0; i < chunk.items.length; i++) {\n s = new String(chunk.items[i].data);\n switch (chunk.items[i].type) {\n case 2:\n if (this.name != null) {\n this.name.setDescription(s);\n break;\n } else {\n this.name = new SourceDescription(2, s, 0, false);\n break;\n }\n case 3:\n if (this.email != null) {\n this.email.setDescription(s);\n break;\n } else {\n this.email = new SourceDescription(3, s, 0, false);\n break;\n }\n case 4:\n if (this.phone != null) {\n this.phone.setDescription(s);\n break;\n } else {\n this.phone = new SourceDescription(4, s, 0, false);\n break;\n }\n case 5:\n if (this.loc != null) {\n this.loc.setDescription(s);\n break;\n } else {\n this.loc = new SourceDescription(5, s, 0, false);\n break;\n }\n case 6:\n if (this.tool != null) {\n this.tool.setDescription(s);\n break;\n } else {\n this.tool = new SourceDescription(6, s, 0, false);\n break;\n }\n case 7:\n if (this.note != null) {\n this.note.setDescription(s);\n break;\n } else {\n this.note = new SourceDescription(7, s, 0, false);\n break;\n }\n case 8:\n if (this.priv != null) {\n this.priv.setDescription(s);\n break;\n } else {\n this.priv = new SourceDescription(8, s, 0, false);\n break;\n }\n default:\n break;\n }\n }\n }\n }", "public byte[] getNetworkPacket() {\n /*\n The packet layout will be:\n byte(datatype)|int(length of name)|byte[](name)|int(length of value)|byte[](value)|...\n */\n byte[] data = new byte[2];\n int currentPosition = 0;\n \n if(STRINGS.size() > 0) {\n Enumeration enumer = STRINGS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x73;\n currentPosition++;\n\n SimpleMessageObjectStringItem item = (SimpleMessageObjectStringItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = item.getValue().getBytes();\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(INTS.size() > 0) {\n Enumeration enumer = INTS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x69;\n currentPosition++;\n\n SimpleMessageObjectIntItem item = (SimpleMessageObjectIntItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(LONGS.size() > 0) {\n Enumeration enumer = LONGS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x6C;\n currentPosition++;\n\n SimpleMessageObjectLongItem item = (SimpleMessageObjectLongItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(DOUBLES.size() > 0) {\n Enumeration enumer = DOUBLES.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x64;\n currentPosition++;\n\n SimpleMessageObjectDoubleItem item = (SimpleMessageObjectDoubleItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(FLOATS.size() > 0) {\n Enumeration enumer = FLOATS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x66;\n currentPosition++;\n\n SimpleMessageObjectFloatItem item = (SimpleMessageObjectFloatItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(CHARS.size() > 0) {\n Enumeration enumer = CHARS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x63;\n currentPosition++;\n\n SimpleMessageObjectCharItem item = (SimpleMessageObjectCharItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(BYTES.size() > 0) {\n Enumeration enumer = BYTES.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x62;\n currentPosition++;\n\n SimpleMessageObjectByteArrayItem item = (SimpleMessageObjectByteArrayItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = item.getValue();\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n\n return data;\n }", "protected void encode() {\n\t\tsuper.rawPkt = new byte[12 + this.PID.length*4];\n\t\t\n\t\tbyte[] someBytes = StaticProcs.uIntLongToByteWord(super.ssrc);\n\t\tSystem.arraycopy(someBytes, 0, super.rawPkt, 4, 4);\n\t\tsomeBytes = StaticProcs.uIntLongToByteWord(this.ssrcMediaSource);\n\t\tSystem.arraycopy(someBytes, 0, super.rawPkt, 8, 4);\n\t\t\n\t\t// Loop over Feedback Control Information (FCI) fields\n\t\tint curStart = 12;\n\t\tfor(int i=0; i < this.PID.length; i++ ) {\n\t\t\tsomeBytes = StaticProcs.uIntIntToByteWord(PID[i]);\n\t\t\tsuper.rawPkt[curStart++] = someBytes[0];\n\t\t\tsuper.rawPkt[curStart++] = someBytes[1];\n\t\t\tsomeBytes = StaticProcs.uIntIntToByteWord(BLP[i]);\n\t\t\tsuper.rawPkt[curStart++] = someBytes[0];\n\t\t\tsuper.rawPkt[curStart++] = someBytes[1];\n\t\t}\n\t\twriteHeaders();\n\t}", "public void fillHeader(ByteBuffer buffer) {\n buffer.put((byte) (this.version << 4 | this.internetHeaderLen));\n buffer.put((byte) this.DSCP);\n buffer.putShort((short) this.headerLen);\n\n buffer.putInt(this.whyAreFlags3Bits);\n\n buffer.put((byte) this.timeToLive);\n buffer.put((byte) this.protocol);\n buffer.putShort((short) this.checksum);\n\n buffer.put(this.source.getAddress());\n buffer.put(this.target.getAddress());\n }", "private static byte[] getLsfileaeMessage100() throws HeaderPartException, HostMessageFormatException {\r\n Map < String, Object > map = new HashMap < String, Object >();\r\n map.put(Constants.CICS_PROGRAM_NAME_KEY, \"LSFILEAE\");\r\n map.put(Constants.CICS_LENGTH_KEY, \"79\");\r\n map.put(Constants.CICS_DATALEN_KEY, \"6\");\r\n \r\n LegStarMessage legstarMessage = new LegStarMessage();\r\n legstarMessage.setHeaderPart(new LegStarHeaderPart(map, 0));\r\n legstarMessage.addDataPart(new CommareaPart(\r\n HostData.toByteArray(LsfileaeCases.getHostBytesHexRequest100())));\r\n return legstarMessage.toByteArray();\r\n\r\n }", "public SECSItemFormatCode getSECSItemFormatCode()\n {\n return getFormatCode();\n }", "void setHeaderRaw(String rawHeaderData) throws ParsingException, RuntimeException {\n String key=null;\n String value=null;\n\n final int SP = 0x20; // 32 Space\n int i=0;\n int start=-1;\n boolean keySet = false;\n boolean keySetHard = false;\n while(i < rawHeaderData.length()){\n if(rawHeaderData.charAt(i)==':' && !keySet) {\n keySet = true;\n }\n else if(rawHeaderData.charAt(i)==SP && keySet){\n if(!keySetHard) {\n key = rawHeaderData.substring(0, i - 1); // begin and end index\n start = i + 1;\n }\n keySetHard = true;\n }\n\n i++;\n }\n\n if(keySet && start != -1){\n value = rawHeaderData.substring(start, i);\n }\n setHeader(key, value);\n }", "public void testSetSBATStart()\n throws IOException\n {\n HeaderBlockWriter block = new HeaderBlockWriter();\n\n block.setSBATStart(0x01234567);\n ByteArrayOutputStream output = new ByteArrayOutputStream(512);\n\n block.writeBlocks(output);\n byte[] copy = output.toByteArray();\n byte[] expected =\n {\n ( byte ) 0xD0, ( byte ) 0xCF, ( byte ) 0x11, ( byte ) 0xE0,\n ( byte ) 0xA1, ( byte ) 0xB1, ( byte ) 0x1A, ( byte ) 0xE1,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x3B, ( byte ) 0x00, ( byte ) 0x03, ( byte ) 0x00,\n ( byte ) 0xFE, ( byte ) 0xFF, ( byte ) 0x09, ( byte ) 0x00,\n ( byte ) 0x06, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0xFE, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x10, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x67, ( byte ) 0x45, ( byte ) 0x23, ( byte ) 0x01,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0xFE, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF\n };\n\n assertEquals(expected.length, copy.length);\n for (int j = 0; j < 512; j++)\n {\n assertEquals(\"testing byte \" + j, expected[ j ], copy[ j ]);\n }\n }", "public void parseHeader() {\n\t\tthis.release = (Integer) this.headerData.get(0);\n\t\tthis.endian = (ByteOrder) this.headerData.get(1);\n\t\tthis.K = (Short) this.headerData.get(2);\n\t\tthis.datasetLabel = (String) this.headerData.get(4);\n\t\tthis.datasetTimeStamp = (String) this.headerData.get(5);\n\t\tthis.mapOffset = (Integer) this.headerData.get(6);\n\t}", "public void setEddInfoToScsbRequest(String line, ItemRequestInformation itemRequestInformation) {\n String[] splitData = line.split(\":\");\n if (ArrayUtils.isNotEmpty(splitData) && splitData.length > 1) {\n itemRequestInformation.setRequestNotes(validateAndSet(\"User\", splitData));\n itemRequestInformation.setStartPage(validateAndSet(\"Start Page\", splitData));\n itemRequestInformation.setEndPage(validateAndSet(\"End Page\", splitData));\n itemRequestInformation.setVolume(validateAndSet(\"Volume Number\", splitData));\n itemRequestInformation.setIssue(validateAndSet(\"Issue\", splitData));\n itemRequestInformation.setAuthor(validateAndSet(\"Article Author\", splitData));\n itemRequestInformation.setChapterTitle(validateAndSet(\"Article/Chapter Title\", splitData));\n }\n }", "private void setItem(){\n item = new String[4];\n item[0] = title;\n item[1] = DueDate;\n item[2] = Description;\n item[3] = \"incomplete\";\n }", "switch (buffer[ISO7816.OFFSET_CDATA + 4]) {\r\n\t\tcase BASIC:\r\n\t\t\tsetSignatureType(BASIC);\r\n\t\t\tbreak;\r\n\t\tcase AUTHENTICATION: // use authentication private key\r\n\t\t\tsetSignatureType(AUTHENTICATION);\r\n\t\t\tbreak;\r\n\t\tcase NON_REPUDIATION: // use non repudiation private key\r\n\t\t\tsetSignatureType(NON_REPUDIATION);\r\n\t\t\tbreak;\r\n\t\tcase CA_ROLE:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_DATA);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\tdefault:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(SW_REFERENCE_DATA_NOT_FOUND);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\t}", "public void onEncodeSerialData(StreamWriter streamWriter) throws IOException {\n Vector<BlockHeader> vector = this.blockHeaderVector;\n if (vector == null) {\n streamWriter.writeVariableInt(0);\n return;\n }\n Iterator it = vector.iterator();\n while (it.hasNext()) {\n ((BlockHeader) it.next()).mo44659c(streamWriter);\n }\n }", "@Override\r\n public void completeElementContent() {\r\n numBytes = 0;\r\n String theElementValue = this.getText();\r\n this.mySequenceFragment = theElementValue;\r\n myByteSpecifierSequence = new ArrayList<ByteSeqSpecifier>();\r\n StringBuffer allSpecifiers = new StringBuffer(theElementValue);\r\n while (allSpecifiers.length() > 0) {\r\n try {\r\n ByteSeqSpecifier bss = new ByteSeqSpecifier(allSpecifiers);\r\n myByteSpecifierSequence.add(bss);\r\n numBytes += bss.getNumBytes();\r\n } catch (Exception e) {\r\n }\r\n }\r\n\r\n }", "protected void encode() {\t\n\t\tsuper.rawPkt = new byte[12 + this.pktData.length];\n\t\tbyte[] tmp = StaticProcs.uIntLongToByteWord(super.ssrc);\n\t\tSystem.arraycopy(tmp, 0, super.rawPkt, 4, 4);\n\t\tSystem.arraycopy(this.pktName, 0, super.rawPkt, 8, 4);\n\t\tSystem.arraycopy(this.pktData, 0, super.rawPkt, 12, this.pktData.length);\n\t\twriteHeaders();\n\t\t//System.out.println(\"ENCODE: \" + super.length + \" \" + rawPkt.length + \" \" + pktData.length);\n\t}", "@Override\n public void updateFirstHeader() {\n padToCacheAlign();\n long pos = bytes.writePosition();\n updateFirstHeader(pos);\n }", "com.google.protobuf.ByteString\n getField1152Bytes();", "@Override // jcifs.smb.SmbComTransactionResponse\n public int readParametersWireFormat(byte[] buffer, int bufferIndex, int len) {\n this.status = readInt2(buffer, bufferIndex);\n int bufferIndex2 = bufferIndex + 2;\n this.converter = readInt2(buffer, bufferIndex2);\n int bufferIndex3 = bufferIndex2 + 2;\n this.numEntries = readInt2(buffer, bufferIndex3);\n int bufferIndex4 = bufferIndex3 + 2;\n this.totalAvailableEntries = readInt2(buffer, bufferIndex4);\n return (bufferIndex4 + 2) - bufferIndex;\n }", "@Override\n public void read(javolution.xml.XMLFormat.InputElement xml, FCIBCCCAMELsequence1SMSImpl fcibccSms)\n throws XMLStreamException {\n fcibccSms.appendFreeFormatData = AppendFreeFormatData\n .valueOf(xml.getAttribute(APPEND_FREE_FORMAT_DATA, \"overwrite\"));\n\n fcibccSms.freeFormatData = xml.get(FREE_FORMAT_DATA, FreeFormatDataSMSImpl.class);\n }", "public GSO118(ByteBuffer buffer) throws StrlException {\n\t\tbuffer.get(this.gso);\n\t\tif (validRecordStart(Arrays.toString(this.gso))) {\n\t\t\tbuilder(buffer);\n\t\t\tsetNext(buffer, buffer.position());\n\t\t} else {\n\t\t\tthrow new StrlException();\n\t\t}\n\t}", "protected void parseFlvSequenceHeader(byte[] data) throws UnsupportedOperationException, IOException {\n // Sound format: first 4 bits\n final int soundFormatInt = (data[0] >>> 4) & 0x0f;\n try {\n audioFormat = AudioFormat.valueOf(soundFormatInt);\n } catch (IllegalArgumentException ex) {\n throw new UnsupportedOperationException(\"Sound format not supported: \" + soundFormatInt);\n }\n switch (audioFormat) {\n case AAC:\n delegateWriter = new AacWriter(out);\n break;\n case MP3:\n delegateWriter = new Mp3Writer(out);\n break;\n default:\n throw new UnsupportedOperationException(\"Sound format not supported: \" + audioFormat);\n }\n }", "public DataBuffer encode() {\n try {\n\n DataBuffer buffer = new DataBuffer();\n // length\n int length = Header.PROTOCOL_HEADER_LENGTH;\n if (mData != null) {\n length += mData.readableBytes();\n }\n buffer.writeInt(length);\n // header\n mHeader.setLength(length);\n buffer.writeDataBuffer(mHeader.encode(mHeader.getVersion()));\n // data\n buffer.writeDataBuffer(mData);\n\n return buffer;\n } catch (Exception e) {\n //logger.error(\"encode error!!!\", e);\n System.out.println(\"encode error!!\");\n throw new RuntimeException(\"encode error!!!\");\n }\n }", "private NetFlowHeader prepareHeader() throws IOException {\n NetFlowHeader internalHeader;\n int numBytesRead = 0;\n int lenRead = 0;\n WrappedByteBuf buf;\n byte[] headerArray;\n\n // Read header depending on stream version (different from flow version)\n if (streamVersion == 1) {\n // Version 1 has static header\n // TODO: verify header size for stream version 1\n lenRead = NetFlowHeader.S1_HEADER_SIZE - METADATA_LENGTH;\n internalHeader = new NetFlowHeader(streamVersion, byteOrder);\n } else {\n // Version 3 with dynamic header size\n headerArray = new byte[HEADER_OFFSET_LENGTH];\n numBytesRead = in.read(headerArray, 0, HEADER_OFFSET_LENGTH);\n if (numBytesRead != HEADER_OFFSET_LENGTH) {\n throw new UnsupportedOperationException(\"Short read while loading header offset\");\n }\n\n buf = WrappedByteBuf.init(headerArray, byteOrder);\n int headerSize = (int)buf.getUnsignedInt(0);\n if (headerSize <= 0) {\n throw new UnsupportedOperationException(\"Failed to load header of size \" + headerSize);\n }\n\n // Actual header length, determine how many bytes to read\n lenRead = headerSize - METADATA_LENGTH - HEADER_OFFSET_LENGTH;\n internalHeader = new NetFlowHeader(streamVersion, byteOrder, headerSize);\n }\n\n // allocate buffer for length to read\n headerArray = new byte[lenRead];\n numBytesRead = in.read(headerArray, 0, lenRead);\n if (numBytesRead != lenRead) {\n throw new UnsupportedOperationException(\"Short read while loading header data\");\n }\n // build buffer\n buf = WrappedByteBuf.init(headerArray, byteOrder);\n\n // resolve stream version (either 1 or 3)\n if (streamVersion == 1) {\n internalHeader.setFlowVersion((short)buf.getUnsignedShort(0));\n internalHeader.setStartCapture(buf.getUnsignedInt(2));\n internalHeader.setEndCapture(buf.getUnsignedInt(6));\n internalHeader.setHeaderFlags(buf.getUnsignedInt(10));\n internalHeader.setRotation(buf.getUnsignedInt(14));\n internalHeader.setNumFlows(buf.getUnsignedInt(18));\n internalHeader.setNumDropped(buf.getUnsignedInt(22));\n internalHeader.setNumMisordered(buf.getUnsignedInt(26));\n // Read hostname fixed bytes\n byte[] hostnameBytes = new byte[NetFlowHeader.S1_HEADER_HN_LEN];\n buf.getBytes(30, hostnameBytes, 0, hostnameBytes.length);\n internalHeader.setHostname(new String(hostnameBytes));\n // Read comments fixed bytes\n byte[] commentsBytes = new byte[NetFlowHeader.S1_HEADER_CMNT_LEN];\n buf.getBytes(30 + hostnameBytes.length, commentsBytes, 0, commentsBytes.length);\n internalHeader.setComments(new String(commentsBytes));\n\n // Dereference arrays\n hostnameBytes = null;\n commentsBytes = null;\n } else {\n // Resolve TLV (type-length value)\n // Set decode pointer to first tlv\n int dp = 0;\n int left = lenRead;\n // Smallest TLV is 2+2+0 (null TLV)\n // tlv_t - TLV type, tlv_l - TLV length, tlv_v - TLV value\n int tlv_t = 0;\n int tlv_l = 0;\n int tlv_v = 0;\n\n // Byte array for holding Strings\n byte[] pr;\n\n while (left >= 4) {\n // Parse type, store in host byte order\n tlv_t = buf.getUnsignedShort(dp);\n dp += 2;\n left -= 2;\n\n // Parse len, store in host byte order\n tlv_l = buf.getUnsignedShort(dp);\n dp += 2;\n left -= 2;\n\n // Parse val\n tlv_v = dp;\n\n // Point decode buffer at next tlv\n dp += tlv_l;\n left -= tlv_l;\n\n // TLV length check\n if (left < 0) {\n break;\n }\n\n switch(tlv_t) {\n // FT_TLV_VENDOR\n case 0x1:\n internalHeader.setVendor(buf.getUnsignedShort(tlv_v));\n break;\n // FT_TLV_EX_VER\n case 0x2:\n internalHeader.setFlowVersion((short) buf.getUnsignedShort(tlv_v));\n break;\n // FT_TLV_AGG_VER\n case 0x3:\n internalHeader.setAggVersion(buf.getUnsignedByte(tlv_v));\n break;\n // FT_TLV_AGG_METHOD\n case 0x4:\n internalHeader.setAggMethod(buf.getUnsignedByte(tlv_v));\n break;\n // FT_TLV_EXPORTER_IP\n case 0x5:\n internalHeader.setExporterIP(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_START\n case 0x6:\n internalHeader.setStartCapture(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_END\n case 0x7:\n internalHeader.setEndCapture(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_HEADER_FLAGS\n case 0x8:\n internalHeader.setHeaderFlags(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_ROT_SCHEDULE\n case 0x9:\n internalHeader.setRotation(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_COUNT\n case 0xA:\n internalHeader.setNumFlows(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_LOST\n case 0xB:\n internalHeader.setNumDropped(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_MISORDERED\n case 0xC:\n internalHeader.setNumMisordered(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_PKT_CORRUPT\n case 0xD:\n internalHeader.setNumCorrupt(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_SEQ_RESET\n case 0xE:\n internalHeader.setSeqReset(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_HOSTNAME\n case 0xF:\n pr = new byte[tlv_l];\n buf.getBytes(tlv_v, pr, 0, pr.length);\n // Expected null-terminated string\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n\n internalHeader.setHostname(new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_COMMENTS\n case 0x10:\n pr = new byte[tlv_l];\n buf.getBytes(tlv_v, pr, 0, pr.length);\n // Expected null-terminated string\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n internalHeader.setComments(new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_IF_NAME\n case 0x11:\n // uint32_t, uint16_t, string:\n // - IP address of device\n // - ifIndex of interface\n // - interface name\n long ip = buf.getUnsignedInt(tlv_v);\n int ifIndex = buf.getUnsignedShort(tlv_v + 4);\n pr = new byte[tlv_l - 4 - 2];\n buf.getBytes(tlv_v + 4 + 2, pr, 0, pr.length);\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n internalHeader.setInterfaceName(ip, ifIndex, new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_IF_ALIAS\n case 0x12:\n // uint32_t, uint16_t, uint16_t, string:\n // - IP address of device\n // - ifIndex count\n // - ifIndex of interface (count times)\n // - alias name\n long aliasIP = buf.getUnsignedInt(tlv_v);\n int aliasIfIndexCnt = buf.getUnsignedShort(tlv_v + 4);\n int aliasIfIndex = buf.getUnsignedShort(tlv_v + 4 + 2);\n pr = new byte[tlv_l - 4 - 2 - 2];\n buf.getBytes(tlv_v + 4 + 2 + 2, pr, 0, pr.length);\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n\n internalHeader.setInterfaceAlias(aliasIP, aliasIfIndexCnt, aliasIfIndex,\n new String(pr, 0, pr.length - 1));\n break;\n // Case 0x0\n default:\n break;\n }\n }\n buf = null;\n pr = null;\n }\n return internalHeader;\n }", "public ProtocolControlFrame(byte[] buffer) throws FrameException {\n super(Frame.PROTOCOLCONTROLFRAME_T, buffer);\n this.infoElements = new Hashtable<Integer, byte[]>();\n try {\n byte[] iesBuffer = new byte[buffer.length - FULLFRAME_HEADER_LENGTH];\n System.arraycopy(buffer, FULLFRAME_HEADER_LENGTH, iesBuffer, 0, iesBuffer.length);\n int bytesRemaining = iesBuffer.length;\n //This while iterate the buffer to search information elements. \n //These are variable in number, type and size. \n while(bytesRemaining > 0) {\n byte[] aux = new byte[bytesRemaining];\n System.arraycopy(iesBuffer, iesBuffer.length - bytesRemaining, aux, 0, aux.length);\n ByteBuffer byteBuffer = new ByteBuffer(aux);\n int id = byteBuffer.get8bits();\n int dataLength = byteBuffer.get8bits();\n byte[] data = new byte[dataLength];\n System.arraycopy(byteBuffer.getByteArray(), 0, data, 0, data.length);\n infoElements.put(new Integer(id),data);\n bytesRemaining -= InfoElement.HEADER_LENGTH + dataLength;\n }\n } catch (Exception e) {\n throw new FrameException(e);\n } \n }", "@Override\r\n\tprotected void writeImpl(L2Client client, L2Player activeChar, MMOBuffer buf) throws RuntimeException\r\n\t{\n\t\tfinal boolean god = client.getVersion().isNewerThanOrEqualTo(ClientProtocolVersion.GODDESS_OF_DESTRUCTION);\r\n\t\tbuf.writeD(0); // Type\r\n\t\tbuf.writeD(0); // Servitor OID\r\n\t\tbuf.writeD(0); // Servitor\r\n\t\tbuf.writeD(0); // Attackable\r\n\t\tbuf.writeD(0); // Location X\r\n\t\tbuf.writeD(0); // Location Y\r\n\t\tbuf.writeD(0); // Location Z\r\n\t\tbuf.writeD(0); // Heading\r\n\t\tbuf.writeD(0); // 0\r\n\t\tbuf.writeD(0); // Casting speed\r\n\t\tbuf.writeD(0); // Attack speed\r\n\t\tbuf.writeD(0); // Running speed (on ground)\r\n\t\tbuf.writeD(0); // Walking speed (on ground)\r\n\t\tbuf.writeD(0); // Running speed (in water)\r\n\t\tbuf.writeD(0); // Walking speed (in water)\r\n\t\tbuf.writeD(0); // Running speed (in air) ???\r\n\t\tbuf.writeD(0); // Walking speed (in air) ???\r\n\t\tbuf.writeD(0); // Running speed (in air) while mounted?\r\n\t\tbuf.writeD(0); // Walking speed (in air) while mounted?\r\n\t\tbuf.writeF(0D); // Movement speed multiplier\r\n\t\tbuf.writeF(0D); // Attack speed multiplier\r\n\t\tbuf.writeF(0D); // Collision radius\r\n\t\tbuf.writeF(0D); // Collision height\r\n\t\tbuf.writeD(0); // Main weapon\r\n\t\tbuf.writeD(0); // Chest armor\r\n\t\tbuf.writeD(0); // Shield/support weapon\r\n\t\tbuf.writeC(0); // Owner online\r\n\t\tbuf.writeC(0); // Moving\r\n\t\tbuf.writeC(0); // In combat\r\n\t\tbuf.writeC(0); // Lying dead\r\n\t\tbuf.writeC(0); // Status\r\n\t\tbuf.writeD(0); // ???\r\n\t\tbuf.writeS(\"\"); // Name\r\n\t\tbuf.writeD(0); // ???\r\n\t\tbuf.writeS(\"\"); // Title\r\n\t\tbuf.writeD(0); // 1\r\n\t\tbuf.writeD(0); // In PvP\r\n\t\tbuf.writeD(0); // Karma\r\n\t\tbuf.writeD(0); // Current satiation\r\n\t\tbuf.writeD(0); // Maximum satiation\r\n\t\tbuf.writeD(0); // Current HP\r\n\t\tbuf.writeD(0); // Maximum HP\r\n\t\tbuf.writeD(0); // Current MP\r\n\t\tbuf.writeD(0); // Maximum MP\r\n\t\tbuf.writeD(0); // SP\r\n\t\tbuf.writeD(0); // Level\r\n\t\tbuf.writeQ(0L); // XP\r\n\t\tbuf.writeQ(0L); // Current level XP\r\n\t\tbuf.writeQ(0L); // Next level XP\r\n\t\tbuf.writeD(0); // Current carried weight\r\n\t\tbuf.writeD(0); // Maximum carried weight\r\n\t\tbuf.writeD(0); // P. Atk.\r\n\t\tbuf.writeD(0); // P. Def.\r\n\t\tif (god)\r\n\t\t{\r\n\t\t\tbuf.writeD(0); // P. Accuracy\r\n\t\t\tbuf.writeD(0); // P. Evasion\r\n\t\t\tbuf.writeD(0); // P. Critical\r\n\t\t}\r\n\t\tbuf.writeD(0); // M. Atk.\r\n\t\tbuf.writeD(0); // M. Def.\r\n\t\tif (god)\r\n\t\t{\r\n\t\t\tbuf.writeD(0); // M. Accuracy\r\n\t\t\tbuf.writeD(0); // M. Evasion\r\n\t\t\tbuf.writeD(0); // M. Critical\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tbuf.writeD(0); // Accuracy\r\n\t\t\tbuf.writeD(0); // Evasion\r\n\t\t\tbuf.writeD(0); // Critical\r\n\t\t}\r\n\t\tbuf.writeD(0); // Actual movement speed\r\n\t\tbuf.writeD(0); // Attack speed\r\n\t\tbuf.writeD(0); // Casting speed\r\n\t\tbuf.writeD(0); // Abnormal effect\r\n\t\tbuf.writeH(0); // Mountable\r\n\t\tbuf.writeC(0); // Weapon enchant glow\r\n\t\tbuf.writeH(0); // ??? 0\r\n\t\tbuf.writeC(0); // Duel team\r\n\t\tbuf.writeD(0); // Soulshot usage\r\n\t\tbuf.writeD(0); // Spiritshot usage\r\n\t\tbuf.writeD(0); // Ability level\r\n\t\tbuf.writeD(0); // Special effect\r\n\t\tif (god)\r\n\t\t{\r\n\t\t\tbuf.writeD(0); // ??? 0\r\n\t\t\tbuf.writeD(0); // ??? 0\r\n\t\t\tbuf.writeD(0); // ??? 0\r\n\t\t}\r\n\t}", "private void addHeaderItems(final List<ItemBO> itemList)\n\t{\n\t\tif (itemList != null && (!itemList.isEmpty()))\n\t\t{\n\t\t\tfinal List<Integer> lineNumbersList = new ArrayList<Integer>(itemList.size());\n\t\t\tfinal List<ItemBO> headerItemsList = new ArrayList<ItemBO>();\n\t\t\tint processOrderLineNumber = 1;\n\t\t\tfor (final ItemBO anItem : itemList)\n\t\t\t{\n\t\t\t\tlineNumbersList.add(anItem.getLineNumber());\n\t\t\t\tif (ExternalSystem.EVRST == anItem.getExternalSystem())\n\t\t\t\t{\n\t\t\t\t\t//Header ItemBO for current ECC Item\n\t\t\t\t\tfinal ItemBO anHeader = new PartBO();\n\t\t\t\t\tanHeader.setDisplayPartNumber(anItem.getDisplayPartNumber());\n\t\t\t\t\tanHeader.setPartNumber(anItem.getPartNumber());\n\t\t\t\t\tanHeader.setComment(\"This is The Header Record :: \" + anItem.getPartNumber());\n\t\t\t\t\tanHeader.setInventory(anItem.getInventory());\n\t\t\t\t\tanHeader.setRequestedInventory(anItem.getRequestedInventory());\n\t\t\t\t\tanHeader.setScacCode(anItem.getScacCode());\n\t\t\t\t\tanHeader.setCarrierCode(anItem.getCarrierCode());\n\t\t\t\t\tanHeader.setShippingMethodCode(anItem.getShippingMethodCode());\n\t\t\t\t\tanHeader.setTransportationMethodCode(anItem.getTransportationMethodCode());\n\t\t\t\t\t((PartBO) anHeader).setHeader(true);\n\t\t\t\t\t((PartBO) anHeader).setProcessOrderLineNumber(processOrderLineNumber);\n\n\t\t\t\t\tanHeader.setItemQty(anItem.getItemQty());\n\t\t\t\t\tanHeader.setExternalSystem(ExternalSystem.EVRST);\n\n\t\t\t\t\t//Make Sure Actual Item also has the same ProcessOrderLineNumber\n\t\t\t\t\tanItem.setProcessOrderLineNumber(processOrderLineNumber);\n\n\t\t\t\t\theaderItemsList.add(anHeader);\n\t\t\t\t\tprocessOrderLineNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!headerItemsList.isEmpty())\n\t\t\t{\n\t\t\t\t//Find the Highest line number\n\t\t\t\tArrays.sort(lineNumbersList.toArray());\n\t\t\t\tint itemLineNumber = lineNumbersList.get(lineNumbersList.size() - 1);\n\t\t\t\tfor (final ItemBO headerItem : headerItemsList)\n\t\t\t\t{\n\t\t\t\t\theaderItem.setLineNumber(++itemLineNumber);\n\t\t\t\t}\n\t\t\t\t//Make Sure the Header Items are inserted first - Enforced by ECC RFC\n\t\t\t\titemList.addAll(0, headerItemsList);\n\t\t\t\tlogger.debug(\"addHeaderItems(...): Added Header Items for ECC Items \" + headerItemsList.size());\n\t\t\t}\n\t\t}\n\t}", "private Object getDataSet(int itemLength, final boolean endianess, final String name) throws IOException {\r\n final FileDicomItem item = new FileDicomItem();\r\n\r\n String type;\r\n int iValue = 0;\r\n float fValue = 0;\r\n double dValue = 0;\r\n boolean nullEntry = false;\r\n\r\n if ( (itemLength == UNDEFINED_LENGTH) || (itemLength == ILLEGAL_LENGTH)) {\r\n itemLength = Integer.MAX_VALUE;\r\n }\r\n\r\n if (itemLength == 0) {\r\n itemLength = elementLength; // use the length of the SQ tag\r\n }\r\n\r\n final int startfptr = getFilePointer();\r\n\r\n // preread the next tag, because we do not want to store the\r\n if ( (getFilePointer() - startfptr) <= itemLength) {\r\n\r\n // Sequence ITEM delimiter tags\r\n final boolean oldSQ = inSQ;\r\n inSQ = true;\r\n getNextElement(endianess);\r\n nameSQ = convertGroupElement(groupWord, elementWord);\r\n\r\n // System.err.println(\"nameSQ \" + nameSQ);\r\n inSQ = oldSQ;\r\n }\r\n // Preferences.debug(\"Item: \"+Integer.toString(groupWord, 0x10)+\",\"+\r\n // Integer.toString(elementWord, 0x10)+\r\n // \" for \" + Integer.toString(elementLength, 0x10) +\r\n // \" # readfrom: \" + Long.toString(getFilePointer(), 0x10) + \"\\n\");\r\n\r\n // either there's an \"item end\" or we've read the entire element length\r\n while ( !nameSQ.equals(FileDicomInner.SEQ_ITEM_END) && ( (getFilePointer() - startfptr) < itemLength)) {\r\n // The following is almost exactly the same as the code in readHeader. The main difference is the\r\n // information is stored in a hashtable in DicomItem that is initially empty.\r\n\r\n FileDicomTag entry;\r\n\r\n if (fileInfo.vr_type == FileInfoDicom.IMPLICIT) {\r\n\r\n FileDicomTagInfo info;\r\n\r\n if (DicomDictionary.containsTag(new FileDicomKey(groupWord, elementWord))) {\r\n FileDicomKey key = null;\r\n info = DicomDictionary.getInfo(key = new FileDicomKey(groupWord, elementWord));\r\n // this is required if DicomDictionary contains wild card characters\r\n info.setKey(key);\r\n entry = new FileDicomTag(info);\r\n type = entry.getType();\r\n } else {\r\n\r\n // the tag was not found in the dictionary..\r\n entry = new FileDicomTag(new FileDicomTagInfo(new FileDicomKey(groupWord, elementWord), null,\r\n 0, \"PrivateTag\", \"Private tag\"));\r\n type = \"typeUnknown\";\r\n }\r\n } else {\r\n FileDicomTagInfo info;\r\n\r\n if (DicomDictionary.containsTag(new FileDicomKey(groupWord, elementWord))) {\r\n FileDicomKey key = null;\r\n info = (FileDicomTagInfo) DicomDictionary.getInfo(\r\n key = new FileDicomKey(groupWord, elementWord)).clone();\r\n // this is required if DicomDictionary contains wild card characters\r\n info.setKey(key);\r\n entry = new FileDicomTag(info);\r\n entry.setValueRepresentation(new String(vr));\r\n } else {\r\n info = new FileDicomTagInfo(new FileDicomKey(groupWord, elementWord), new String(vr), 0,\r\n \"PrivateTag\", \"Private tag\");\r\n entry = new FileDicomTag(info);\r\n }\r\n\r\n if (fileInfo.isCurrentTagSQ) {\r\n type = \"typeSequence\";\r\n } else {\r\n type = entry.getType();\r\n }\r\n\r\n nullEntry = true;\r\n }\r\n\r\n try {\r\n final long bPtrOld = bPtr;\r\n String strValue = new String();\r\n Object data = null;\r\n // (type == \"typeUnknown\" && elementLength == -1) Implicit sequence tag if not in DICOM dictionary.\r\n if (type.equals(\"typeUnknown\") && (elementLength != -1)) {\r\n final FileDicomTagInfo info = entry.getInfo();\r\n\r\n entry = new FileDicomTag(info, readUnknownData());\r\n\r\n item.putTag(nameSQ, entry);\r\n item.setLength(nameSQ, elementLength);\r\n } else if (type.equals(\"typeString\") || type.equals(\"otherWordString\")) {\r\n\r\n if (elementLength == UNDEFINED_LENGTH) {\r\n elementLength = 0;\r\n }\r\n\r\n strValue = getString(elementLength);\r\n entry.setValue(strValue, elementLength);\r\n item.putTag(nameSQ, entry);\r\n item.setLength(nameSQ, elementLength);\r\n // Preferences.debug(\"aaaaaaString Tag: (\" + nameSQ + \");\\t\" + type + \"; value = \" + strValue +\r\n // \";\r\n // element length = \"+ elementLength + \"\\n\", 2);\r\n } else if (type.equals(\"otherByteString\")) {\r\n\r\n if ( !nullEntry && (DicomDictionary.getVM(new FileDicomKey(nameSQ)) > 1)) {\r\n entry.setValue(data = readUnknownData(), elementLength);\r\n } else if (elementLength >= 2) {\r\n entry.setValue(data = readUnknownData(), elementLength);\r\n }\r\n\r\n entry.setValueRepresentation(\"OB\");\r\n item.putTag(nameSQ, entry);\r\n item.setLength(nameSQ, elementLength);\r\n // Preferences.debug(\"Tag: (\" + nameSQ + \");\\t\" + type + \"; value = \" + iValue + \"; element\r\n // length\r\n // = \"+ elementLength + \"\\n\", 2);\r\n } else if (type.equals(\"typeShort\")) {\r\n\r\n if ( !nullEntry && (DicomDictionary.getVM(new FileDicomKey(nameSQ)) > 1)) {\r\n entry.setValue(data = readUnknownData(), elementLength);\r\n } else if (elementLength > 2) {\r\n entry.setValue(data = readUnknownData(), elementLength);\r\n } else {\r\n iValue = getUnsignedShort(endianess);\r\n data = iValue;\r\n entry.setValue(new Short((short) iValue), elementLength);\r\n }\r\n\r\n item.putTag(nameSQ, entry);\r\n item.setLength(nameSQ, elementLength);\r\n // Preferences.debug(\"Tag: (\" + nameSQ + \");\\t\" + type + \"; value = \" + iValue + \"; element\r\n // length\r\n // = \"+ elementLength + \"\\n\", 2);\r\n } else if (type.equals(\"typeInt\")) {\r\n\r\n if ( !nullEntry && (DicomDictionary.getVM(new FileDicomKey(nameSQ)) > 1)) {\r\n entry.setValue(data = readUnknownData(), elementLength);\r\n } else if (elementLength > 4) {\r\n entry.setValue(data = readUnknownData(), elementLength);\r\n } else {\r\n iValue = getInt(endianess);\r\n data = iValue;\r\n entry.setValue(new Integer(iValue), elementLength);\r\n }\r\n\r\n item.putTag(nameSQ, entry);\r\n item.setLength(nameSQ, elementLength);\r\n // Preferences.debug(\"Tag: (\" + nameSQ + \");\\t\" + type + \"; value = \" + iValue + \"; element\r\n // length\r\n // = \"+ elementLength + \"\\n\", 2);\r\n } else if (type.equals(\"typeFloat\")) {\r\n\r\n if ( !nullEntry && (DicomDictionary.getVM(new FileDicomKey(nameSQ)) > 1)) {\r\n entry.setValue(data = readUnknownData(), elementLength);\r\n } else if (elementLength > 4) {\r\n entry.setValue(data = readUnknownData(), elementLength);\r\n } else {\r\n fValue = getFloat(endianess);\r\n data = fValue;\r\n entry.setValue(new Float(fValue), elementLength);\r\n }\r\n\r\n item.putTag(nameSQ, entry);\r\n item.setLength(nameSQ, elementLength);\r\n // Preferences.debug(\"Tag: (\" + nameSQ + \");\\t\" + type + \"; value = \" + fValue + \"; element\r\n // length\r\n // = \"+ elementLength + \"\\n\", 2);\r\n } else if (type.equals(\"typeDouble\")) {\r\n\r\n if ( !nullEntry && (DicomDictionary.getVM(new FileDicomKey(nameSQ)) > 1)) {\r\n entry.setValue(data = readUnknownData(), elementLength);\r\n } else if (elementLength % 8 == 0 && elementLength != 8) {\r\n final Double[] dArr = new Double[elementLength / 8];\r\n for (int i = 0; i < dArr.length; i++) {\r\n dArr[i] = getDouble(endianess);\r\n }\r\n entry.setValue(data = dArr, elementLength);\r\n } else if (elementLength > 8) {\r\n entry.setValue(data = readUnknownData(), elementLength);\r\n } else {\r\n dValue = getDouble(endianess);\r\n data = dValue;\r\n entry.setValue(new Double(dValue), elementLength);\r\n }\r\n\r\n item.putTag(nameSQ, entry);\r\n item.setLength(nameSQ, elementLength);\r\n // Preferences.debug(\"Tag: (\" + nameSQ + \");\\t\" + type + \"; value = \" + dValue + \"; element\r\n // length\r\n // = \"+ elementLength + \"\\n\", 2);\r\n }\r\n // (type == \"typeUnknown\" && elementLength == -1) Implicit sequence tag if not in DICOM dictionary.\r\n else if (type.equals(\"typeSequence\") || ( (type == \"typeUnknown\") && (elementLength == -1))) {\r\n final int len = elementLength;\r\n // name of sub-sequence\r\n final String nameTemp = nameSQ;\r\n final Object sq2 = getSequence(endianess, len, nameTemp);\r\n entry.setValue(sq2, len);\r\n item.putTag(nameTemp, entry);\r\n item.setLength(nameTemp, len);\r\n // Preferences.debug(\"Tag: (\" + nameSQ + \");\\t\" + type +\r\n // \"; element length = \"+ elementLength + \"\\n\", 2);\r\n }\r\n\r\n // System.out.println(\"At this sequence name currently: \"+nameSQ);\r\n if (tagExistInAnonymizeTagIDs(nameSQ) || tagExistInAnonymizeTagIDs(name)) {\r\n // System.out.print(\"Writing \"+nameSQ+\"\\t\");\r\n\r\n final long raPtrOld = raFile.getFilePointer();\r\n if (type.equals(\"typeString\")) {\r\n System.out.println(strValue);\r\n String anonStr = \"\";\r\n if (nameSQ.equals(\"0008,1155\")) {\r\n for (int i = 0; i < strValue.length(); i++) {\r\n if (strValue.charAt(i) == '.') {\r\n anonStr = anonStr + \".\";\r\n } else {\r\n anonStr = anonStr + \"1\";\r\n }\r\n }\r\n } else {\r\n for (int i = 0; i < strValue.length(); i++) {\r\n anonStr = anonStr + \"X\";\r\n }\r\n }\r\n\r\n raFile.seek(bPtrOld);\r\n raFile.writeBytes(anonStr); // non-anon would be strValue\r\n raFile.seek(raPtrOld);\r\n // System.out.println(\"Writing \"+strValue+\" to \"+bPtrOld+\". Returned raPtr to \"+raPtrOld);\r\n } else if (type.equals(\"otherByteString\")) {\r\n\r\n if ( !nameSQ.equals(FileDicomInner.IMAGE_TAG)) {\r\n // System.out.println(data);\r\n\r\n final byte[] b = new byte[ ((Byte[]) data).length];\r\n for (int i = 0; i < b.length; i++) {\r\n b[i] = 0;\r\n }\r\n raFile.seek(bPtrOld);\r\n raFile.write(b);\r\n raFile.seek(raPtrOld);\r\n }\r\n } else if (type.equals(\"otherWordString\") && !nameSQ.equals(\"0028,1201\")\r\n && !nameSQ.equals(\"0028,1202\") && !nameSQ.equals(\"0028,1203\")) {\r\n\r\n if ( !nameSQ.equals(FileDicomInner.IMAGE_TAG)) {\r\n // System.out.println(data);\r\n\r\n final byte[] b = new byte[ ((Byte[]) data).length];\r\n for (int i = 0; i < b.length; i++) {\r\n b[i] = 0;\r\n }\r\n raFile.seek(bPtrOld);\r\n raFile.write(b);\r\n raFile.seek(raPtrOld);\r\n }\r\n } else if (type.equals(\"typeShort\")) {\r\n // System.out.println(data);\r\n\r\n raFile.seek(bPtrOld);\r\n if (data instanceof Short || data instanceof Integer) {\r\n writeShort((short) 0, endianess);\r\n } else if (data instanceof Short[] || data instanceof Integer[]) {\r\n if (data instanceof Integer[]) {\r\n System.err.println(\"Unusual data type encountered\");\r\n }\r\n for (int i = 0; i < ((Short[]) data).length; i++) {\r\n writeShort((short) 0, endianess);\r\n }\r\n } else {\r\n System.err.println(\"Data corruption\");\r\n }\r\n raFile.seek(raPtrOld);\r\n } else if (type.equals(\"typeInt\")) {\r\n // System.out.println(data);\r\n\r\n raFile.seek(bPtrOld);\r\n if (data instanceof Integer) {\r\n writeInt(0, endianess);\r\n } else if (data instanceof Integer[]) {\r\n for (int i = 0; i < ((Integer[]) data).length; i++) {\r\n writeInt(0, endianess);\r\n }\r\n } else {\r\n System.err.println(\"Data corruption\");\r\n }\r\n raFile.seek(raPtrOld);\r\n } else if (type.equals(\"typeFloat\")) {\r\n // System.out.println(data);\r\n\r\n raFile.seek(bPtrOld);\r\n if (data instanceof Float || data instanceof Double) {\r\n writeFloat(0, endianess);\r\n } else if (data instanceof Float[] || data instanceof Double[]) {\r\n if (data instanceof Double[]) {\r\n System.err.println(\"Unusual data type encountered\");\r\n }\r\n for (int i = 0; i < ((Float[]) data).length; i++) {\r\n writeFloat(0, endianess);\r\n }\r\n } else {\r\n System.err.println(\"Data corruption\");\r\n }\r\n raFile.seek(raPtrOld);\r\n } else if (type.equals(\"typeDouble\")) {\r\n // System.out.println(data);\r\n\r\n raFile.seek(bPtrOld);\r\n if (data instanceof Double) {\r\n writeDouble(0, endianess);\r\n } else if (data instanceof Double[]) {\r\n for (int i = 0; i < ((Double[]) data).length; i++) {\r\n writeDouble(0, endianess);\r\n }\r\n } else {\r\n System.err.println(\"Data corruption\");\r\n }\r\n raFile.seek(raPtrOld);\r\n }\r\n\r\n }\r\n } catch (final OutOfMemoryError e) {\r\n\r\n if ( !isQuiet()) {\r\n\r\n // Must add back Matt/Dave 11/2003\r\n MipavUtil.displayError(\"Out of memory in FileDicom.getDataSet\");\r\n // yup, done.... Dave, 04-2004\r\n } else {\r\n Preferences.debug(\"Out of memory in FileDicom.getDataSet\\n\");\r\n // System.err.println(\"Out of memory in FileDicom.getDataSet\");\r\n }\r\n\r\n throw new IOException();\r\n }\r\n\r\n if ( (getFilePointer() - startfptr) < itemLength) {\r\n // preread the next tag, because we have yet to see the\r\n // end-sequence tag because we don't want to accidently\r\n // read the next new-item tag.\r\n\r\n // except that SQ is undef-len, and def-len items get an\r\n // extra tag read out. // 30-jun-2004\r\n getNextElement(endianess);\r\n nameSQ = convertGroupElement(groupWord, elementWord);\r\n\r\n // Preferences.debug(\"Item: \"+Integer.toString(groupWord, 0x10)+\",\"+\r\n // Integer.toString(elementWord, 0x10)+\r\n // \" for \" + Integer.toString(elementLength, 0x10) +\r\n // \" # readfrom: \" + Long.toString(getFilePointer(), 0x10) + \"\\n\");\r\n\r\n }\r\n }\r\n\r\n // System.err.println(\"\\t\\t\\tItem done.\");\r\n return item;\r\n }", "public void parse(byte[] buffer) {\n if (buffer == null) {\n MMLog.log(TAG, \"parse failed buffer = \" + null);\n return;\n }\n\n if (buffer.length >= 9) {\n this.msgHead = getIntVale(0, 2, buffer);\n if(this.msgHead != DEFAULT_HEAD) return;\n\n this.msgEnd = getIntVale(buffer.length - 1, 1, buffer);\n if(this.msgEnd != DEFAULT_END) return;\n\n this.msgID = getIntVale(2, 2, buffer);\n this.msgIndex = getIntVale(4, 1, buffer);\n this.msgLength = getIntVale(5, 2, buffer);\n this.msgCRC = getIntVale(buffer.length - 2, 1, buffer);\n\n } else {\n MMLog.log(TAG, \"parse failed length = \" + buffer.length);\n }\n if (msgLength <= 0) return;\n datas = new byte[msgLength];\n System.arraycopy(buffer, 7, datas, 0, this.msgLength);\n }", "public void doPack() {\n if (this._sendData == null) {\n this._sendData = new byte[13];\n }\n this._sendData[0] = 0;\n if (this.isMenu) {\n byte[] bArr = this._sendData;\n bArr[0] = (byte) (bArr[0] | 1);\n }\n if (this.isPlayback) {\n byte[] bArr2 = this._sendData;\n bArr2[0] = (byte) (bArr2[0] | 2);\n }\n if (this.isRecord) {\n byte[] bArr3 = this._sendData;\n bArr3[0] = (byte) (bArr3[0] | 4);\n }\n BytesUtil.arraycopy(generateChannelByte(), this._sendData, 1);\n this._sendData[11] = 0;\n if (this.isButton) {\n byte[] bArr4 = this._sendData;\n bArr4[11] = (byte) (bArr4[11] | 1);\n }\n byte[] bArr5 = this._sendData;\n bArr5[11] = (byte) (bArr5[11] | (this.buttonData << 1));\n byte[] bArr6 = this._sendData;\n bArr6[11] = (byte) (bArr6[11] | (this.symbol << 6));\n byte[] bArr7 = this._sendData;\n bArr7[11] = (byte) (bArr7[11] | (this.change << 7));\n byte[] bArr8 = this._sendData;\n bArr8[12] = (byte) (bArr8[12] | this.shutter);\n byte[] bArr9 = this._sendData;\n bArr9[12] = (byte) (bArr9[12] | (this.focus << 1));\n byte[] bArr10 = this._sendData;\n bArr10[12] = (byte) (bArr10[12] | (this.mode_sw << 2));\n byte[] bArr11 = this._sendData;\n bArr11[12] = (byte) (bArr11[12] | (this.transform_sw << 4));\n byte[] bArr12 = this._sendData;\n bArr12[12] = (byte) (bArr12[12] | (this.gohome << 6));\n }", "public RTCMPackage decodeValue(BerCoder coder, DecoderInput source)\n\t throws DecoderException\n {\n\tint total_len0 = source.mLength;\n\tint end_pos0 = (total_len0 < 0) ? java.lang.Integer.MAX_VALUE : (source.position() + total_len0);\n\tint tag;\n\n\tdo {\n\t tag = source.decodeTagLength();\n\t if (tag == 0xA0) {\n\t\ttry {\n\t\t this.anchorPoint = new FullPositionVector();\n\t\t this.anchorPoint.decodeValue(coder, source);\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"anchorPoint\", \"FullPositionVector\");\n\t\t throw ee;\n\t\t}\n\t\ttag = source.decodeTagLength();\n\t }\n\t if (tag != 0x81 && tag != 0xA1)\n\t\tsource.raiseTagMismatchException(tag);\n\t try {\n\t\tthis.rtcmHeader = new RTCMHeader(coder.decodeOctetString(source));\n\t } catch (Exception e) {\n\t\tDecoderException ee = DecoderException.wrapException(e);\n\t\tee.appendFieldContext(\"rtcmHeader\", \"RTCMHeader\");\n\t\tthrow ee;\n\t }\n\t if (source.position() >= end_pos0)\n\t\tbreak;\n\t tag = source.decodeTagLength();\n\t if (tag == 0)\n\t\tbreak;\n\t if (tag == 0x82 || tag == 0xA2) {\n\t\ttry {\n\t\t this.msg1001 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1001\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x83 || tag == 0xA3) {\n\t\ttry {\n\t\t this.msg1002 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1002\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x84 || tag == 0xA4) {\n\t\ttry {\n\t\t this.msg1003 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1003\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x85 || tag == 0xA5) {\n\t\ttry {\n\t\t this.msg1004 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1004\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x86 || tag == 0xA6) {\n\t\ttry {\n\t\t this.msg1005 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1005\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x87 || tag == 0xA7) {\n\t\ttry {\n\t\t this.msg1006 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1006\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x88 || tag == 0xA8) {\n\t\ttry {\n\t\t this.msg1007 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1007\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x89 || tag == 0xA9) {\n\t\ttry {\n\t\t this.msg1008 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1008\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x8A || tag == 0xAA) {\n\t\ttry {\n\t\t this.msg1009 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1009\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x8B || tag == 0xAB) {\n\t\ttry {\n\t\t this.msg1010 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1010\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x8C || tag == 0xAC) {\n\t\ttry {\n\t\t this.msg1011 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1011\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x8D || tag == 0xAD) {\n\t\ttry {\n\t\t this.msg1012 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1012\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x8E || tag == 0xAE) {\n\t\ttry {\n\t\t this.msg1013 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1013\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x8F || tag == 0xAF) {\n\t\ttry {\n\t\t this.msg1014 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1014\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x90 || tag == 0xB0) {\n\t\ttry {\n\t\t this.msg1015 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1015\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x91 || tag == 0xB1) {\n\t\ttry {\n\t\t this.msg1016 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1016\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x92 || tag == 0xB2) {\n\t\ttry {\n\t\t this.msg1017 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1017\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x93 || tag == 0xB3) {\n\t\ttry {\n\t\t this.msg1019 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1019\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x94 || tag == 0xB4) {\n\t\ttry {\n\t\t this.msg1020 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1020\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x95 || tag == 0xB5) {\n\t\ttry {\n\t\t this.msg1021 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1021\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x96 || tag == 0xB6) {\n\t\ttry {\n\t\t this.msg1022 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1022\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x97 || tag == 0xB7) {\n\t\ttry {\n\t\t this.msg1023 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1023\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x98 || tag == 0xB8) {\n\t\ttry {\n\t\t this.msg1024 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1024\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x99 || tag == 0xB9) {\n\t\ttry {\n\t\t this.msg1025 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1025\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x9A || tag == 0xBA) {\n\t\ttry {\n\t\t this.msg1026 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1026\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x9B || tag == 0xBB) {\n\t\ttry {\n\t\t this.msg1027 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1027\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x9C || tag == 0xBC) {\n\t\ttry {\n\t\t this.msg1029 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1029\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x9D || tag == 0xBD) {\n\t\ttry {\n\t\t this.msg1030 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1030\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x9E || tag == 0xBE) {\n\t\ttry {\n\t\t this.msg1031 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1031\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x9F1F || tag == 0xBF1F) {\n\t\ttry {\n\t\t this.msg1032 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1032\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t for (;;) {\n\t\ttry {\n\t\t coder.skipContents(source);\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendExtensionContext(\"RTCMPackage\", -1);\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t} while(false);\n\n\tif (source.position() > end_pos0)\n\t throw new DecoderException(ExceptionDescriptor._inconsis_len, null);\n\tif (total_len0 < 0 && source.mLength != 0)\n\t throw new DecoderException(ExceptionDescriptor._non_std_eoc, null);\n\n\treturn this;\n }", "com.google.protobuf.ByteString getSerializedItem();", "private void parseHeader()\n throws IOException {\n\n while (headerPending) {\n\n // check if we have a complete line\n int eol = -1;\n while (eol < 0) {\n for (int i = 0; (eol < 0) && (i < nEncoded); ++i) {\n if (encoded[i] == '\\n') {\n eol = i;\n }\n } \n if (eol < 0) {\n // we don't have enough characters\n if (readEncodedBytes() < 0) {\n throw new IOException(\"missing uuencode header\");\n }\n }\n }\n \n if (eol == 0) {\n eol = 1;\n System.arraycopy(encoded, eol, encoded, 0, nEncoded - eol);\n nEncoded -= 1;\n } else\n if ((eol < 4) || (encoded[0] != 'b') || (encoded[1] != 'e')\n || (encoded[2] != 'g') || (encoded[3] != 'i') || (encoded[4] != 'n')) {\n // this is not the header line, skip it\n \t//System.out.println(\"eol:\" + eol);\n \t//System.out.println(\"srcpos: \" + (eol + 1) + \" \" + (nEncoded - eol));\n System.arraycopy(encoded, eol + 1, encoded, 0,\n nEncoded - eol);\n nEncoded -= eol;\n } else {\n\n // skip the whitespace characters\n int i = 5;\n while ((i < eol) && Character.isWhitespace((char) encoded[i])) {\n ++i;\n }\n\n if (((i + 2) < eol)\n && (encoded[i] >= '0') && (encoded[i] <= '7')\n && (encoded[i+1] >= '0') && (encoded[i+1] <= '7')\n && (encoded[i+2] >= '0') && (encoded[i+2] <= '7')) {\n \n // store the permissions\n userPerms = encoded[i] - '0';\n groupPerms = encoded[i+1] - '0';\n othersPerms = encoded[i+2] - '0';\n\n // in order to allow space in file names, uudecode as provided in\n // version 4.3.x of the GNU sharutils package uses a single space\n // between permissions and file name\n if (encoded[i+3] == ' ') {\n i += 4;\n\n // store the file name (which may contain space characters)\n StringBuffer buffer = new StringBuffer();\n while (i < eol) {\n buffer.append((char) encoded[i++]);\n }\n name = buffer.toString();\n\n // set up state for data decoding\n headerPending = false;\n System.arraycopy(encoded, eol + 1, encoded, 0, nEncoded - eol);\n nEncoded -= eol;\n firstQuantum = 1;\n current = 0;\n return;\n\n }\n }\n\n throw new IOException(\"malformed uuencode header\");\n\n }\n\n }\n\n }", "byte[] getStructuredData(String messageData);", "@Override // jcifs.smb.SmbComTransactionResponse\n public int readSetupWireFormat(byte[] buffer, int bufferIndex, int len) {\n return 0;\n }", "public void getPackByte(DataPacket packet) {\n\t\t\tint limit = 10;\r\n\t\t\tint newFrameSep = 0x3c;\r\n\t\t\t// bytes avail = packet.getDataSize() - limit;\r\n\t\t\t// write(lbuf, limit, 32)\r\n\t\t\t// write(newFrame)\r\n\t\t\t// limit += 32;\r\n\t\t\t// check packet.getDataSize() - limit > 31\r\n\t\t\tbyte[] lbuf = new byte[packet.getDataSize()];\r\n\t\t\ttry {\r\n\t\t\tif ( packet.getDataSize() > 0)\r\n\r\n\t\t\t\tlbuf = packet.getDataAsArray();\r\n\t\t\t//first frame includes the 1 byte frame header whose value should be used \r\n\t\t\t// to write subsequent frame separators \r\n\r\n\r\n\t\t\t\t\tobuff.write(lbuf, limit, 32);\r\n\r\n\t\t\t\tlimit += 32;\r\n\t\t\t\r\n\t\t do {\r\n\r\n\t\t \t\t obuff.write(newFrameSep); \r\n\t\t\t\t\tobuff.write(lbuf, limit, 31);\r\n\t\t\t\t\tlimit += 31;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\r\n\t\t \t \r\n\t\t } while (packet.getDataSize() - limit > 31);\t\t\t\t\t\t\t\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}", "public static void srs_print_bytes(String tag, ByteBuffer bb, int size) {\n StringBuilder sb = new StringBuilder();\n int i = 0;\n int bytes_in_line = 16;\n int max = bb.remaining();\n for (i = 0; i < size && i < max; i++) {\n sb.append(String.format(\"0x%s \", Integer.toHexString(bb.get(i) & 0xFF)));\n if (((i + 1) % bytes_in_line) == 0) {\n Log.i(tag, String.format(\"%03d-%03d: %s\", i / bytes_in_line * bytes_in_line, i, sb.toString()));\n sb = new StringBuilder();\n }\n }\n if (sb.length() > 0) {\n Log.i(tag, String.format(\"%03d-%03d: %s\", size / bytes_in_line * bytes_in_line, i - 1, sb.toString()));\n }\n }", "public void doPack() {\n this._sendData = new byte[2];\n this._sendData[0] = (byte) this.expMode;\n if (this.expMode == 6) {\n this._sendData[1] = (byte) this.senceMode;\n }\n }", "com.google.protobuf.ByteString\n getScStrBytes();", "Slot(int slot) {\n\n this.slot = slot;\n this.cardSessionId = 1;\n this.locked = false;\n this.powered = false;\n this.SIMPresent = false;\n this.basicChannelInUse = false;\n this.respBuffer = new byte[respBufferSize];\n this.atr = null;\n this.FCI = null;\n \n this.getChannelAPDU = new byte[] {0, 0x70, 0, 0, 1};\n this.closeChannelAPDU = new byte[] {0, 0x70, (byte) 0x80, 0};\n this.getResponseAPDU = new byte[] {0, (byte)0xC0, 0, 0, 0};\n this.isAliveAPDU = new byte[] {0, 0x70, (byte) 0x80, 0};\n\n }", "private void processSCCommand(APDU apdu) {\r\n\t\t// apdu is processed by SecureChannel instance. All errors occurring\r\n\t\t// during this process\r\n\t\t// are for Secure Domain to handle. Applet is only required to pass\r\n\t\t// answer, if any.\r\n\t\tbyte responseLength = (byte) mSecureChannel.processSecurity(apdu);\r\n\t\tif (responseLength != 0)\r\n\t\t\tapdu.setOutgoingAndSend((short) ISO7816.OFFSET_EXT_CDATA,\r\n\t\t\t\t\tresponseLength);\r\n\t}", "private int handleTestSetValuePacket()\n{\n \n int dataSize = 5; //one byte plus one integer (4 bytes)\n \n //read remainder of packet from socket and verify against the checksum\n int lStatus = readBlockAndVerify(dataSize, Notcher.TEST_SET_VALUE_CMD);\n\n //on error reading and verifying, return the error code\n if (lStatus == -1){ return(status); }\n \n //only store the values if there was no error -- errors cause return above\n\n outBufScrIndex = 0; //start with byte 0 in array\n \n testSetByte = inBuffer[outBufScrIndex];\n \n testSetInt = extractInt(inBuffer);\n \n sendACKPacket();\n \n return(lStatus);\n \n}", "private void fillTimeStampParam(byte[] buffer, int startPos) {\n int keyId = ST_Param_Key.ST_PARAM_KEY_TIMESTAMP.ordinal();\n int startIndex = startPos;\n fillInt(buffer, startIndex, keyId);\n\n // fill the payload size\n int payloadSize = SIZE_OF_TIME_STAMP_INFO;\n startIndex = startPos + 4;\n fillInt(buffer, startIndex, payloadSize);\n\n long timeStamp = System.currentTimeMillis();\n startIndex = startPos + 8;\n fillLong(buffer, startIndex, timeStamp);\n }", "public String toString() {\n StringBuffer ret = new StringBuffer(\"APDU_Buffer = \");\n ret.append(makeHex(getBytes()));\n ret.append(\" (hex) | lc = \");\n ret.append(lc);\n ret.append(\" | le = \");\n ret.append(le);\n\n // make hex representation of byte array\n return ret.toString();\n }", "@Override\n\tpublic String[] toArray() {\n\t\tString strValue[] = new String[DSPPackager.PACKAGER_MBASE_88301I\n\t\t\t\t.getFieldDefinitionList().length];\n\t\tString strHostName = null;\n\t\ttry {\n\t\t\tstrHostName = InetAddress.getLocalHost().getHostAddress();\n\t\t} catch (UnknownHostException ex) {\n\t\t\tstrHostName = \"localhost\";\n\t\t}\n\t\tstrValue[0] = \"*LINX\"; // Header type\n\t\tstrValue[1] = strHostName; // Device Name\n\t\tstrValue[5] = \"213\"; // Header Length\n\t\tstrValue[7] = \"0200\"; // Version\n\t\tstrValue[8] = \"*DSP\"; // Version\n\t\tstrValue[9] = \"MBSD\"; // Data format\n\t\tstrValue[10] = \"*LINX\"; // Source ID\n\t\tstrValue[14] = \"01\"; // Source ID\n\t\tstrValue[17] = \"BBMBSLNMNTFNC\"; // Scenario Number\n\t\tstrValue[22] = \"1\";\n\t\tstrValue[23] = \"10\";\n\t\tstrValue[24] = aa.getTeller(); // User ID\n\t\tstrValue[25] = strHostName; // Terminal ID\n\t\tstrValue[26] = \"88301\"; // Supervisor ID\n\t\tstrValue[27] = \"N\";\n\t\tstrValue[31] = aa.getTeller(); // Message Header\n\t\tstrValue[32] = \"1\"; // Message Header\n\t\tstrValue[34] = \"*END\";\n\t\tstrValue[36] = \"BTS\";\n\t\tstrValue[37] = \"RBS\";\n\t\tstrValue[39] = strHostName; // Terminal ID\n\t\tstrValue[40] = \"27\"; // Journal Seq\n\t\tstrValue[41] = aa.getBranch(); // Branch Code\n\t\tstrValue[45] = \"88301\"; // Transaction Code\n\t\tstrValue[46] = \"C\"; // add\n\t\tstrValue[47] = \"R\"; // response\n\t\tstrValue[48] = \"1\"; // Work station\n\t\tstrValue[49] = \"N\";\n\t\tstrValue[50] = \"F\";\n\t\tstrValue[56] = \"\";\n\t\tstrValue[67] = aa.getApplicationNo(); // application Number\n\t\tstrValue[68] = aa.getCifNum();\n\t\tstrValue[69] = aa.getApplicationDate();\n\t\tstrValue[71] = aa.getBranch(); // lpad 5 '0'\n\t\tstrValue[72] = aa.getWorkingEx();\n\t\tstrValue[73] = aa.getSpecProvision(); // Y/N\n\t\tstrValue[74] = aa.getClasifielDate();\n\t\tstrValue[75] = aa.getCarCode();\n\t\tstrValue[76] = aa.getReviewDate();\n\t\tstrValue[77] = aa.getRetention();\n\t\tstrValue[78] = aa.getReviewReMark();\n\t\tstrValue[79] = aa.getRefinanceFrom();\n\t\tstrValue[80] = aa.getTucachPn();\n\t\tstrValue[81] = aa.getTinhHinhTc();\n\t\tstrValue[82] = aa.getKhaNangVayVon();\n\t\tstrValue[83] = aa.getDamBaoTienVay();\n\t\tstrValue[84] = aa.getLimitAmount();\n\t\tstrValue[85] = aa.getCurencyType();\n\t\tstrValue[86] = aa.getOfficeCode();\n\t\tstrValue[87] = aa.getClassification();\n\t\tstrValue[88] = aa.getMARemarck();\n\t\tstrValue[89] = aa.getMADate();\n\t\treturn strValue;\n\t}", "@Override\n\tpublic void encode() {\n\t\tbyte[] messageData = encodeStarsMessage(message);\n\t\t\n\t\t// Allocate\n byte[] res = new byte[10 + messageData.length];\n\n // Write members\n Util.write16(res, 0, unknownWord0);\n Util.write16(res, 2, unknownWord2);\n Util.write16(res, 4, senderId);\n Util.write16(res, 6, receiverId);\n Util.write16(res, 8, unknownWord8);\n \n // Copy in message data\n System.arraycopy(messageData, 0, res, 10, messageData.length);\n \n // Save as decrypted data\n setDecryptedData(res, res.length);\n\t}", "public /*byte[]*/String BinaryCaster(Object item){\n String Sitem = Integer.toBinaryString((int)item);\n //byte[] b = new byte[Sitem.length()];\n //for(int i=0;i<Sitem.length();i++){\n // b[i] = (byte)Sitem.charAt(i);\n //}\n //return b;\n return Sitem;\n }", "void format09(String line, int lineCount) {\n\n // is this the first record in the file?\n checkFirstRecord(code, lineCount);\n\n // there can only be one code 09 record per substation\n code09Count++;\n if (code09Count > 1) {\n outputError(lineCount + \" - Fatal - \" +\n \"More than 1 code 09 record in substation\");\n } // if (code09Count > 1)\n\n // get the data off the line\n java.util.StringTokenizer t = new java.util.StringTokenizer(line, \" \");\n String dummy = t.nextToken(); // get 'rid' of the code\n\n if (dataType == SEDIMENT) {\n\n //01 a2 format code always \"09\" n/a\n //02 a12 stnid station id: composed as for format 03 sedphy\n //03 f10.3 calcium µgm / gram sedchem2\n //04 f8.2 magnesium µgm / gram sedchem2\n //05 f7.3 sulphide(SO3) µgm / gram sedchem2\n //06 f8.3 potassium µgm / gram sedchem2\n //07 f8.2 sodium µgm / gram sedchem2\n //08 f9.3 strontium µgm / gram sedchem2\n\n if (t.hasMoreTokens()) sedphy.setStationId(toString(t.nextToken()));\n if (t.hasMoreTokens()) sedchem2.setCalcium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedchem2.setMagnesium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedchem2.setSo3(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedchem2.setPotassium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedchem2.setSodium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedchem2.setStrontium(toFloat(t.nextToken(), 1f));\n\n // station Id must match that of previous station record\n checkStationId(lineCount, sedphy.getStationId(\"\"));\n\n if (dbg) System.out.println(\"format09: sedchem2 = \" + sedchem2);\n\n } else if (dataType == WATER) {\n\n //01 a2 format code always \"09\" n/a\n //02 a12 stnid station id: composed as for format 03 watphy\n //03 f7.3 suspendedSolids mgm / litre watchem2\n //04 f10.3 calcium µgm / litre watchem2\n //05 f7.4 sulphate(SO4) gm / litre watchem2\n //06 f8.3 potassium µgm / litre watchem2\n //07 f8.2 magnesium µgm / litre watchem2\n //08 f8.2 sodium µgm / litre watchem2\n //09 f9.3 strontium µgm / litre watchem2\n\n if (t.hasMoreTokens()) watphy.setStationId(toString(t.nextToken()));\n if (t.hasMoreTokens()) watchem2.setSussol(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watchem2.setCalcium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watchem2.setSo4(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watchem2.setPotassium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watchem2.setMagnesium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watchem2.setSodium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watchem2.setStrontium(toFloat(t.nextToken(), 1f));\n\n // station Id must match that of previous station record\n checkStationId(lineCount, watphy.getStationId(\"\"));\n\n if (dbg) System.out.println(\"format09: watchem2 = \" + watchem2);\n\n } // if (dataType == SEDIMENT)\n\n }", "public byte[] serialize() { length 9 bits, each value == byte\n // info string\n final short scratch = (short) ((0x7f & this.type) << 9 | 0x1ff & this.length);\n final byte[] data = new byte[2 + this.length];\n final ByteBuffer bb = ByteBuffer.wrap(data);\n bb.putShort(scratch);\n if (this.value != null) {\n bb.put(this.value);\n }\n return data;\n }", "private void createValue()\n\t{\n\t\ttry\n\t\t{\n\t\t\tm_usage = ((DERBitString)new ASN1InputStream(\n\t\t\t\t\t new ByteArrayInputStream(getDEROctets())).readObject()).intValue();\n\t\t} catch (Exception a_e)\n\t\t{\n\t\t\tthrow new RuntimeException(\"Could not read key usage from byte array!\");\n\t\t}\n\t}", "void processHeader(InputStream dataInput) throws IOException {\n int formatVersion = dataInput.read();\n if (formatVersion < 0) {\n throw new EOFException();\n }\n ensureCondition(formatVersion == SERIALIZER_VERSION, \"Unsupported format version %d.\", formatVersion);\n }", "public String clientToString(){\n return leftPad(itemId, 15) + itemDescription;\n }", "private void sstring(Tlv tlv, String a){\n if(a != null){\n byte[] data = StringUtil.bytesOfStringCP_1251(a); \n //uint16 value (length)\n uint16(tlv, data.length + 1);\n //asciiz string \n tlv.addTlvData(DataWork.putArray(data)); \n tlv.addTlvData(DataWork.putByte(0x00)); \n }else{\n tlv.addTlvData(DataWork.putWordLE(0x00));\n tlv.addTlvData(DataWork.putWordLE(0x00));\n } \n }", "void format11(String line, int lineCount) {\n\n // is this the first record in the file?\n checkFirstRecord(code, lineCount);\n\n // there can only be one code 11 record per substation\n code11Count++;\n if (code11Count > 1) {\n outputError(lineCount + \" - Fatal - \" +\n \"More than 1 code 11 record in substation\");\n } // if (code11Count > 1)\n\n // get the data off the line\n java.util.StringTokenizer t = new java.util.StringTokenizer(line, \" \");\n String dummy = t.nextToken(); // get 'rid' of the code\n\n if (dataType == SEDIMENT) {\n\n //01 a2 format code always \"11\" n/a\n //02 a12 stnid station id: composed as for format 03 sedphy\n //03 f7.3 cadmium µgm / gram sedpol1\n //04 f8.3 lead µgm / gram sedpol1\n //05 f8.3 copper µgm / gram sedpol1\n //06 f8.3 zinc µgm / gram sedpol1\n //07 f8.4 mercury µgm / gram sedpol1\n //08 f8.3 nickel µgm / gram sedpol1\n\n if (t.hasMoreTokens()) sedphy.setStationId(toString(t.nextToken()));\n if (t.hasMoreTokens()) sedpol1.setCadmium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setLead(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setCopper(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setZinc(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setMercury(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setNickel(toFloat(t.nextToken(), 1f));\n\n // station Id must match that of previous station record\n checkStationId(lineCount, sedphy.getStationId(\"\"));\n\n if (dbg) System.out.println(\"format11: sedpol1 = \" + sedpol1);\n\n } else if (dataType == WATER) {\n\n //01 a2 format code always \"11\" n/a\n //02 a12 stnid station id: composed as for format 03 watphy\n //03 f7.3 cadmium µgm / litre watpol1\n //04 f8.3 lead µgm / litre watpol1\n //05 f8.3 copper µgm / litre watpol1\n //06 f8.3 zinc µgm / litre watpol1\n //07 f8.4 mercury µgm / litre watpol1\n //08 f8.3 nickel µgm / litre watpol1\n\n if (t.hasMoreTokens()) watphy.setStationId(toString(t.nextToken()));\n if (t.hasMoreTokens()) watpol1.setCadmium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setLead(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setCopper(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setZinc(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setMercury(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setNickel(toFloat(t.nextToken(), 1f));\n\n // station Id must match that of previous station record\n checkStationId(lineCount, watphy.getStationId(\"\"));\n\n if (dbg) System.out.println(\"format11: watpol1 = \" + watpol1);\n\n } // if (dataType == SEDIMENT)\n\n }", "CRBase(final byte[] data, final int offset) throws KNXFormatException\n\t{\n\t\tint i = offset;\n\t\tlength = data[i++] & 0xFF;\n\t\tconnType = data[i++] & 0xFF;\n\t\tif (length > data.length - offset)\n\t\t\tthrow new KNXFormatException(\"structure length bigger than buffer\", length);\n\t\topt = new byte[length - 2];\n\t\tfor (int k = 0; k < length - 2; ++i, ++k)\n\t\t\topt[k] = data[i];\n\t}", "public Builder setS4Bytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n s4_ = value;\n onChanged();\n return this;\n }", "private static byte[] createDataBA(byte[] dataRead) {\n\t\t//Creating byte and adding content to byte[]\n\t\tbyte[] data = new byte[SIZE_PACKET];\n\t\tByteBuffer b = ByteBuffer.wrap(data);\n\t\tb.clear();\n\t\t\n\t\t//Adding content of byte[] to data byte[]\n\t\tfor(int a = 0; a < dataRead.length; a++) {\n\t\t\tdata[a + INDEX_CONTENT] = dataRead[a]; \n\t\t}\n\n\t\t//Adding headers to the byte[]\n\t\tb.rewind();\n\t\tb.putLong(0);\n\t\tb.putInt(seqNumber);\n\t\tb.putInt(PACKET_DATA);\n\t\tb.putInt(dataRead.length);\n\n\t\t//Calculating checksum and adding to byte[]\n\t\tchecksum = new CRC32();\n\t\tchecksum.reset();\n\t\tchecksum.update(data, INDEX_SEQ, data.length-INDEX_SEQ);\n\t\tlong chksum = checksum.getValue();\n\t\tb.rewind();\n\t\tb.putLong(chksum);\n\n\t\t//Return data byte[]\n\t\treturn data;\n\t}", "@Override\n public Bitstream createSingleBitstream(Context context, Item item, InputStream is)\n throws AuthorizeException, IOException, SQLException\n {\n return createSingleBitstream(context, item, is, \"ORIGINAL\");\n }", "@Test\n void testFirstBlock() throws Exception {\n HMEFMessage msg;\n try (InputStream is = _samples.openResourceAsStream(\"quick-winmail.dat\")) {\n msg = new HMEFMessage(is);\n }\n\n MAPIAttribute attr = msg.getMessageMAPIAttribute(MAPIProperty.RTF_COMPRESSED);\n assertNotNull(attr);\n MAPIRtfAttribute rtfAttr = (MAPIRtfAttribute) attr;\n\n // Truncate to header + flag + data for flag\n byte[] data = Arrays.copyOf(rtfAttr.getRawData(), 16 + 12);\n\n // Decompress it\n CompressedRTF comp = new CompressedRTF();\n byte[] decomp = comp.decompress(new ByteArrayInputStream(data));\n String decompStr = new String(decomp, StandardCharsets.US_ASCII);\n\n // Test\n assertEquals(block1.length(), decomp.length);\n assertEquals(block1, decompStr);\n }", "public void setItemSeq(Integer itemSeq) {\n this.itemSeq = itemSeq;\n }", "public TagHeader_v2_3(byte[] data, InputStream in)\n throws IOException\n {\n super(data);\n if (usesExtendedHeader())\n extHeader = makeExtendedHeader(in);\n }", "private static byte[] addLengthOctet(String s)\n {\n byte buf[], buf2[];\n\n buf = s.getBytes();\n buf2 = new byte[buf.length + 1];\n System.arraycopy(buf, 0, buf2, 1, buf.length);\n buf2[0] = (byte)buf.length;\n\n return buf2;\n }", "public ItemSerializer(int size) {\n this(size, SerializerOutputType.RAW);\n }", "public void testSetPropertyStart()\n throws IOException\n {\n HeaderBlockWriter block = new HeaderBlockWriter();\n\n block.setPropertyStart(0x01234567);\n ByteArrayOutputStream output = new ByteArrayOutputStream(512);\n\n block.writeBlocks(output);\n byte[] copy = output.toByteArray();\n byte[] expected =\n {\n ( byte ) 0xD0, ( byte ) 0xCF, ( byte ) 0x11, ( byte ) 0xE0,\n ( byte ) 0xA1, ( byte ) 0xB1, ( byte ) 0x1A, ( byte ) 0xE1,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x3B, ( byte ) 0x00, ( byte ) 0x03, ( byte ) 0x00,\n ( byte ) 0xFE, ( byte ) 0xFF, ( byte ) 0x09, ( byte ) 0x00,\n ( byte ) 0x06, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x67, ( byte ) 0x45, ( byte ) 0x23, ( byte ) 0x01,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x10, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0xFE, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0xFE, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF\n };\n\n assertEquals(expected.length, copy.length);\n for (int j = 0; j < 512; j++)\n {\n assertEquals(\"testing byte \" + j, expected[ j ], copy[ j ]);\n }\n }", "private List<GPSData> decodeMessageFrame(ChannelBuffer buff, Channel channel, int fSize, int wSize) {\n\t\tbuff.skipBytes(INITIAL_ZERO_BYTES + FRAME_BYTES_SIZE);\n\t\t\n\t\t// codecId byte is ignored\n\t\tbuff.skipBytes(CODEC_BYTE);\n\t\t\n\t\tshort numberOfData = buff.readUnsignedByte();\n\t\t// response to modem about data reception\n\t\tacknowledgeTeltonikaModem(channel, numberOfData);\n\t\tList<GPSData> list = new ArrayList<GPSData>();\n\t\tString imeiLast7digits = imeiMap.get(channel.getId());\n\t\tLOGGER.info(\"Received package decode start: \" + System.currentTimeMillis() + \"ms from device: \" + imeiLast7digits);\n\t\tfor (int i = 0; i < numberOfData; i++) {\n\n\t\t\tGPSData data = new GPSData();\n\n\t\t\tDate timestamp = new Date(buff.getLong(buff.readerIndex()));\n\t\t\tbuff.readerIndex(buff.readerIndex() + 8);\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n\t\t\tdata.setTimestamp(format.format(timestamp));\n\n\t\t\tdata.setUnitId(imeiMap.get(channel.getId()));\n\n\t\t\t// priority byte is ignored\n\t\t\tbuff.skipBytes(1);\n\n\t\t\t// X\n\t\t\tStringBuilder longitude = new StringBuilder(String.valueOf(buff\n\t\t\t\t\t.readUnsignedInt()));\n\t\t\tlongitude.insert(2, '.');\n\t\t\tdata.setLongitude(Double.parseDouble(longitude.toString()));\n\n\t\t\t// Y\n\t\t\tStringBuilder latitude = new StringBuilder(String.valueOf(buff\n\t\t\t\t\t.readUnsignedInt()));\n\t\t\tlatitude.insert(2, '.');\n\t\t\tdata.setLatitude(Double.parseDouble(latitude.toString()));\n\n\t\t\t// H\n\t\t\tint altitude = buff.readUnsignedShort();\n\t\t\tdata.setAltitude((double) altitude);\n\n\t\t\tint angle = buff.readUnsignedShort();\n\t\t\tdata.setAngle(angle);\n\n\t\t\tshort satelite = buff.readUnsignedByte();\n\t\t\tdata.setSatelite(satelite);\n\n\t\t\tint speed = buff.readUnsignedShort();\n\t\t\tdata.setSpeed((double) speed);\n\n\t\t\t// IO INFORMATION START\n\n\t\t\t// IO ENETS\n\t\t\t//\n\t\t\t// IO element ID of Event generated (in case when 00 data\n\t\t\t// generated not on event)\n\t\t\t// we skip this byte\n\t\t\t\n\t\t\tbuff.skipBytes(1);\n\t\t\t\n\t\t\t// could read elements number but not necessary\n\t\t\t// instead we can skip it\n\t\t\t// short elementsNumber = buff.readUnsignedByte();\n\n\t\t\tbuff.skipBytes(1);\n\n\t\t\t// number of records with value 1 byte length\n\t\t\tshort oneByteElementNum = buff.readUnsignedByte();\n\n\t\t\tfor (int j = 0; j < oneByteElementNum; j++) {\n\t\t\t\tbuff.skipBytes(1);\n\t\t\t\tbuff.skipBytes(1);\n\t\t\t}\n\n\t\t\t// number of records with value 2 byte length\n\t\t\tshort twoByteElementNum = buff.readUnsignedByte();\n\n\t\t\tfor (int j = 0; j < twoByteElementNum; j++) {\n\t\t\t\tbuff.skipBytes(1);\n\t\t\t\tbuff.skipBytes(2);\n\t\t\t}\n\n\t\t\t// number of records with value 4 byte length\n\t\t\tshort fourByteElementNum = buff.readUnsignedByte();\n\n\t\t\tfor (int j = 0; j < fourByteElementNum; j++) {\n\t\t\t\tbuff.skipBytes(1);\n\t\t\t\tbuff.skipBytes(4);\n\t\t\t}\n\n\t\t\t// number of records with value 8 byte length\n\t\t\tshort eightByteElementNum = buff.readUnsignedByte();\n\n\t\t\tfor (int j = 0; j < eightByteElementNum; j++) {\n\t\t\t\tbuff.skipBytes(1);\n\t\t\t\tbuff.skipBytes(8);\n\t\t\t}\n\t\t\t// IO INFORMATION END\n\t\t\tlist.add(data);\n\t\t}\n\t\tLOGGER.info(\"Received package decode end: \" + System.currentTimeMillis() + \"ms from device: \" + imeiLast7digits);\n\t\t// records number(1 byte) and CRC(4 bytes) left in the buffer unread\n\t\tLOGGER.info(\"Number of packages decoded: \" + numberOfData);\n\t\tnumberOfData = buff.readByte();\n\t\t// skip CRC bytes\n\t\tlong CRC = buff.readUnsignedInt();\n\t\tLOGGER.info(\"Data CRC: \" + CRC);\n\t\t\n\t\treturn list;\n\t}", "public com.google.protobuf.ByteString\n getField1152Bytes() {\n java.lang.Object ref = field1152_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n field1152_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public static byte[] stageCPacket(ServerValuesHolder values) {\n\t\tbyte[] payload = new byte[13];\n\t\tSystem.arraycopy(values.getNum2_byte(), 0, payload, 0, 4);\n\t\tSystem.arraycopy(values.getLen2_byte(), 0, payload, 4, 4);\n\t\tSystem.arraycopy(values.getSecretC_byte(), 0, payload, 8, 4);\n\t\tpayload[12] = (byte) values.getC();\n\t\t\n\t\treturn createPacket(values.getSecretB(), 2, values.getStudentID(), payload);\n\t}", "@Override\r\n\tprotected void readImpl()\r\n\t{\r\n\t\t_listId = readD();\r\n\t\tint count = readD();\r\n\t\tif (count <= 0 || count > Config.MAX_ITEM_IN_PACKET || count * BATCH_LENGTH != getByteBuffer().remaining())\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t_items = new Item[count];\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t{\r\n\t\t\tint objectId = readD();\r\n\t\t\tint itemId = readD();\r\n\t\t\tlong cnt = readQ();\r\n\t\t\tif (objectId < 1 || itemId < 1 || cnt < 1)\r\n\t\t\t{\r\n\t\t\t\t_items = null;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t_items[i] = new Item(objectId, itemId, cnt);\r\n\t\t}\r\n\t}", "public void setCSeq\n (CSeqHeader cseqHeader) {\n this.setHeader(cseqHeader);\n }", "@Override\n public void updateDescription() {\n description = DESCRIPTIONS[0]+ ReceiveBlockAmount + DESCRIPTIONS[1];\n }", "public static String[] parsingMSRData(byte[] rawData)\n {\n final byte[] FS = { (byte) 0x1C };\n final byte[] ETX = { (byte) 0x03 };\n\n String temp = new String(rawData);\n String trackData[] = new String[3];\n\n // ETX , FS\n String[] rData = temp.split(new String(ETX));\n temp = rData[0];\n String[] tData = temp.split(new String(FS));\n\n switch (tData.length)\n {\n case 1:\n break;\n case 2:\n trackData[0] = tData[1];\n break;\n case 3:\n trackData[0] = tData[1];\n trackData[1] = tData[2];\n break;\n case 4:\n trackData[0] = tData[1];\n trackData[1] = tData[2];\n trackData[2] = tData[3];\n break;\n }\n return trackData;\n }", "public MultiPacketInit(byte[] pkt) throws Exception\n\t{\t\t\n\t\t if((pkt[0] & 0xE0) != (0x80))\n\t\t\t throw new Exception (\"Invalid MultiPacket header.\");\n\t\t \n\t\t this.data = pkt;\n\t\t \n\t\t byte[] totLenBytes = new byte[4];\n\t\t System.arraycopy(pkt, 1, totLenBytes, 0, totLenBytes.length);\n\t\t this.totalLen = ByteBuffer.wrap(totLenBytes).getInt();\n\t}", "com.google.protobuf.ByteString\n getField1658Bytes();", "@Override\n public void readBody(DataInputStreamWrapper l) throws IOException {\n\n ByteBuffer buffer = ByteBuffer.allocate((int)bytesAfterHeader - IDField.getSize());\n\n id = l.readId();\n\n for (int i = 0; i < bytesAfterHeader - IDField.getSize(); i++) {\n buffer.put(l.readByte());\n }\n buffer.position(0);\n content = String.valueOf(StandardCharsets.UTF_8.decode(buffer));\n }", "@Test\n public void testDecodeETypeInfoEntry()\n {\n\n ByteBuffer stream = ByteBuffer.allocate( 0x0F );\n\n stream.put( new byte[]\n {\n 0x30, 0x0D,\n ( byte ) 0xA0, 0x03, // etype\n 0x02,\n 0x01,\n 0x05,\n ( byte ) 0xA1,\n 0x06, // salt\n 0x04,\n 0x04,\n 0x31,\n 0x32,\n 0x33,\n 0x34\n } );\n\n String decodedPdu = Strings.dumpBytes( stream.array() );\n stream.flip();\n\n ETypeInfoEntryContainer container = new ETypeInfoEntryContainer();\n\n try\n {\n Asn1Decoder.decode( stream, container );\n }\n catch ( DecoderException de )\n {\n de.printStackTrace();\n\n fail( de.getMessage() );\n }\n\n ETypeInfoEntry etypeInforEntry = container.getETypeInfoEntry();\n\n assertEquals( EncryptionType.DES3_CBC_MD5, etypeInforEntry.getEType() );\n assertTrue( Arrays.equals( Strings.getBytesUtf8( \"1234\" ), etypeInforEntry.getSalt() ) );\n\n ByteBuffer bb = ByteBuffer.allocate( etypeInforEntry.computeLength() );\n\n try\n {\n bb = etypeInforEntry.encode( bb );\n\n // Check the length\n assertEquals( 0x0F, bb.limit() );\n\n String encodedPdu = Strings.dumpBytes( bb.array() );\n\n assertEquals( encodedPdu, decodedPdu );\n }\n catch ( EncoderException ee )\n {\n fail();\n }\n }", "private void getCardData(APDU apdu, byte[] buffer) \r\n \t //@ requires [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n \t //@ ensures [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n\t{\r\n\t\t// check P1 and P2\r\n\t\tif (buffer[ISO7816.OFFSET_P1] != (byte) 0x00 || buffer[ISO7816.OFFSET_P2] != (byte) 0x00)\r\n\t\t\tISOException.throwIt(ISO7816.SW_INCORRECT_P1P2);\r\n\t\t// inform the JCRE that the applet has data to return\r\n\t\tapdu.setOutgoing();\r\n\t\t\r\n\t\t////@ open [1/2]valid();\r\n\t\t\t\t\t\t\t\t\r\n\t\tbyte[] data = identityFile.getData(); \r\n\t\t// Only the chip number is of importance: get this at tag position 2\r\n\t\tshort pos = 1;\r\n\t\t//@ open [1/2]identityFile.ElementaryFile(_, _, ?identityFileData, _, _, ?info); // todo (integrate with array_element search)\r\n\t\tshort dataLen = (short) data[pos];\r\n\t\tpos = (short) (pos + 1 + dataLen + 1);\r\n\t\t////@ close [1/2]identityFile.ElementaryFile(_, _, identityFileData, _, _, info); // auto\r\n\t\tif (dataLen <= 0 || dataLen + pos + 2 >= identityFile.getCurrentSize())\r\n\t\t\tISOException.throwIt(ISO7816.SW_DATA_INVALID);\r\n\t\t//@ open [1/2]identityFile.ElementaryFile(_, _, identityFileData, _, _, info);\r\n\t\tdataLen = (short) data[pos];\r\n\t\tpos = (short) (pos + 1);\r\n\t\t////@ close [1/2]identityFile.ElementaryFile(_, _, identityFileData, _, _, info); // auto\r\n\t\tif (dataLen < 0 || pos + dataLen >= identityFile.getCurrentSize())\r\n\t\t\tISOException.throwIt(ISO7816.SW_DATA_INVALID);\r\n\t\t//@ open [1/2]identityFile.ElementaryFile(_, _, identityFileData, _, _, info);\r\n\t\t// check Le\r\n\t\t// if (le != dataLen)\r\n\t\t// ISOException.throwIt((short)(ISO7816.SW_WRONG_LENGTH));\r\n\t\t/*VF*byte version[] = { (byte) 0xA5, (byte) 0x03, (byte) 0x01, (byte) 0x01, (byte) 0x01, (byte) 0x11, (byte) 0x00, (byte) 0x02, (byte) 0x00, (byte) 0x01, (byte) 0x01, (byte) 0x0F };*/\r\n\t\tbyte version[] = new byte[] { (byte) 0xA5, (byte) 0x03, (byte) 0x01, (byte) 0x01, (byte) 0x01, (byte) 0x11, (byte) 0x00, (byte) 0x02, (byte) 0x00, (byte) 0x01, (byte) 0x01, (byte) 0x0F };\r\n\t\tbyte chipNumber[] = new byte[(short) (dataLen + 12)];\r\n\t\tUtil.arrayCopy(data, pos, chipNumber, (short) 0, dataLen);\r\n\t\tUtil.arrayCopy(version, (short) 0, chipNumber, dataLen, (short) 12);\r\n\t\t// //Set serial number\r\n\t\t// Util.arrayCopy(tokenInfo.getData(), (short) 7, tempBuffer, (short) 0,\r\n\t\t// (short) 16);\r\n\t\t//\t\t\r\n\t\t// //Set component code: TODO\r\n\t\t//\t\t\r\n\t\t//\t\t\r\n\t\t// //Set OS number: TODO\r\n\t\t//\t\t\r\n\t\t//\t\t\r\n\t\t// //Set OS version: TODO\r\n\t\t// JCSystem.getVersion();\r\n\t\t//\t\t\r\n\t\t// //Set softmask number: TODO\r\n\t\t//\t\t\r\n\t\t// //Set softmask version: TODO\r\n\t\t//\t\t\r\n\t\t// //Set applet version: TODO : 4 bytes in file system\r\n\t\t//\t\t\r\n\t\t//\t\t\r\n\t\t// //Set Interface version: TODO\r\n\t\t//\t\t\r\n\t\t// //Set PKCS#15 version: TODO\r\n\t\t//\t\t\r\n\t\t// //Set applet life cycle\r\n\t\t// tempBuffer[(short)(le-1)] = GPSystem.getCardState();\r\n\t\t// set the actual number of outgoing data bytes\r\n\t\tapdu.setOutgoingLength((short) chipNumber.length);\r\n\t\t// send content of buffer in apdu\r\n\t\tapdu.sendBytesLong(chipNumber, (short) 0, (short) chipNumber.length);\r\n\t\t\t\t\t\t\t\t\r\n\t\t////@ close [1/2]identityFile.ElementaryFile(_, _, identityFileData, _, _, info); // auto\r\n\t\t////@ close [1/2]valid(); // auto\r\n\t}", "CharSequence formatEIP721Message(\n String messageData);", "public DsByteString getContentCoding() {\n return m_strCoding;\n }", "private static byte[] createHeader() {\n Random r = new Random();\n\n byte[] output = new byte[12];\n\n // Create random message id\n short messageID = (short) r.nextInt(Short.MAX_VALUE + 1);\n\n // Create a buffer we can construct the header in.\n ByteBuffer buf = ByteBuffer.wrap(output);\n\n // Place the message into the buffer.\n buf.putShort(messageID);\n\n // Sets QR, OPCODE, AA, TC, RD, RA, and RCODE\n buf.put((byte)0x01);\n buf.put((byte)0x20);\n\n // QDCOUNT, we're making one request.\n buf.putShort((short) 1);\n\n // Rest are 0\n buf.putShort((short) 0);\n buf.putShort((short) 0);\n buf.putShort((short) 0);\n\n return output;\n }", "public static String decodeStarsMessage(byte[] res) {\n\t\t// First 2 bytes contain message header\n\t\tint header = Util.read16(res, 0);\n\n\t\t// Lower 10 bits, this means 1023 max message bytesize!\n\t\tint byteSize = (header & 0x3ff); \n\t\tint asciiIndicator = header >> 10; // Upper 6 bits\n\n\t\t// If the top 6 bits are all 1's, then the entire message is ASCII\n\t\t// encoded instead of Stars! encoded and the bytesize bits are inverted\n\t\tboolean useAscii = false;\n\t\tif(asciiIndicator == 0x3f) {\n\t\t\tuseAscii = true;\n\t\t\tbyteSize = (~byteSize & 0x3ff);\n\t\t}\n\n\t\t// Convert byte array to hex string, stripping off first 2 header bytes\n\t\tbyte[] textBytes = Util.subArray(res, 2);\n\t\tString hexChars = Util.byteArrayToHex(textBytes);\n\n\t\tString decoded = \"Error decoding message\";\n\t\tif(useAscii)\n\t\t\tdecoded = Util.decodeHexAscii(hexChars, byteSize);\n\t\telse\n\t\t\tdecoded = Util.decodeHexStarsString(hexChars, byteSize);\n\n\t\treturn decoded;\n\t}", "private void readObject(java.io.ObjectInputStream s)\r\n throws java.io.IOException, ClassNotFoundException {\r\n // Read in any hidden serialization magic\r\n s.defaultReadObject();\r\n\r\n // Read in size\r\n int size = s.readInt();\r\n\r\n // Initialize header\r\n//INSTRUMENTATION BEGIN\r\n //header = new Entry(null, null, null);\r\n header = new Entry(null, null, null, this);\r\n//INSTRUMENTATION END\r\n header.next = header.previous = header;\r\n\r\n // Read in all elements in the proper order.\r\n for (int i = 0; i < size; i++)\r\n add(s.readObject());\r\n }", "com.google.protobuf.ByteString\n getField1148Bytes();", "public Header parseHeader(CharArrayBuffer buffer) throws ParseException {\n/* 445 */ return (Header)new BufferedHeader(buffer);\n/* */ }", "@Test\n public void testDecodeETypeInfoEntryNullSalt()\n {\n\n ByteBuffer stream = ByteBuffer.allocate( 0x0B );\n\n stream.put( new byte[]\n {\n 0x30, 0x09,\n ( byte ) 0xA0, 0x03, // etype\n 0x02,\n 0x01,\n 0x05,\n ( byte ) 0xA1,\n 0x02, // salt\n 0x04,\n 0x00\n } );\n\n stream.flip();\n\n ETypeInfoEntryContainer container = new ETypeInfoEntryContainer();\n\n try\n {\n Asn1Decoder.decode( stream, container );\n }\n catch ( DecoderException de )\n {\n de.printStackTrace();\n\n fail( de.getMessage() );\n }\n\n ETypeInfoEntry etypeInforEntry = container.getETypeInfoEntry();\n\n assertEquals( EncryptionType.DES3_CBC_MD5, etypeInforEntry.getEType() );\n assertNull( etypeInforEntry.getSalt() );\n\n ByteBuffer bb = ByteBuffer.allocate( etypeInforEntry.computeLength() );\n\n try\n {\n bb = etypeInforEntry.encode( bb );\n\n // Check the length\n assertEquals( 0x07, bb.limit() );\n\n String encodedPdu = Strings.dumpBytes( bb.array() );\n\n ByteBuffer stream2 = ByteBuffer.allocate( 0x07 );\n\n stream2.put( new byte[]\n {\n 0x30, 0x05,\n ( byte ) 0xA0, 0x03, // etype\n 0x02,\n 0x01,\n 0x05\n } );\n\n String decodedPdu2 = Strings.dumpBytes( stream2.array() );\n\n assertEquals( encodedPdu, decodedPdu2 );\n }\n catch ( EncoderException ee )\n {\n fail();\n }\n }", "public void insertRXC(RXC structure, int rep) throws HL7Exception { \r\n super.insertRepetition( \"RXC\", structure, rep);\r\n }", "public void fromBuffer(ByteBufWrapper paramhd)\r\n/* 37: */ {\r\n/* 38:44 */ this.a = paramhd.e();\r\n/* 39:45 */ this.b = paramhd.readInt();\r\n/* 40:46 */ this.c = paramhd.readInt();\r\n/* 41:47 */ this.d = paramhd.readInt();\r\n/* 42:48 */ this.e = paramhd.readByte();\r\n/* 43:49 */ this.f = paramhd.readByte();\r\n/* 44:50 */ this.g = paramhd.readBoolean();\r\n/* 45: */ }", "EciesSharedInfo1(String sharedInfo1) {\n this.value = sharedInfo1.getBytes(StandardCharsets.UTF_8);\n }", "protected byte[] onRequest(String topic, String item, int uFmt)\n {\n return null;\n }", "public void readPacketData(PacketBuffer buf) throws IOException {\n this.entityId = buf.readVarInt();\n this.effectId = buf.readByte();\n this.amplifier = buf.readByte();\n this.duration = buf.readVarInt();\n this.flags = buf.readByte();\n }", "protected void read(CCompatibleInputStream is) throws Exception {\n java.util.Vector fieldVector = getFieldVector();\n for (int i = 0; i < fieldVector.size(); i++) {\n Field field = (Field) (fieldVector.elementAt(i));\n Class type = field.getType();\n if (type == Byte.TYPE) {\n field.setByte(this, is.readByte());\n }\n else if (type == Short.TYPE) {\n field.setShort(this, is.readShortReverse());\n }\n else if (type == Integer.TYPE) {\n field.setInt(this, is.readIntReverse());\n }\n else if (type == Long.TYPE) {\n field.setLong(this, is.readLongReverse());\n }\n else if (type == Double.TYPE) {\n field.setDouble(this, is.readDouble());\n }\n else if (type.getName().equals(\"[B\")) {\n is.read( (byte[]) (field.get(this)));\n }\n }\n }", "com.google.protobuf.ByteString\n getField1656Bytes();", "private static byte[] createHeader(int payloadLen, int psecret, int step, int studentID) {\n\t\tbyte[] header = new byte[ServerValuesHolder.HEADER_LENGTH];\n\t\tbyte[] payloadLen_b = new byte[4];\n\t\tbyte[] psecret_b = new byte[4];\n\t\tbyte[] step_b = new byte[2];\n\t\tbyte[] studentID_b = new byte[2];\n\t\t\n\t\t//convert to byte[]\n\t\tpayloadLen_b=ByteBuffer.allocate(4).putInt(payloadLen).array();\n\t\tpsecret_b=ByteBuffer.allocate(4).putInt(psecret).array();\n\t\tstep_b=ByteBuffer.allocate(4).putInt(step).array();\n\t\tstudentID_b=ByteBuffer.allocate(4).putInt(studentID).array();\n\t\t\n\t\t//copy to header\n\t\tSystem.arraycopy(payloadLen_b, 0, header, 0, 4);\n\t\tSystem.arraycopy(psecret_b, 0, header, 4, 4);\n\t\tSystem.arraycopy(step_b, 2, header, 8, 2);\n\t\tSystem.arraycopy(studentID_b, 2, header, 10, 2);\n\t\t\n\t\treturn header;\n\t}", "com.google.protobuf.ByteString\n getField1603Bytes();" ]
[ "0.6526943", "0.5624061", "0.551443", "0.54653734", "0.5399825", "0.5108613", "0.4914542", "0.4873771", "0.48684084", "0.48629382", "0.4817701", "0.47874045", "0.46898833", "0.4684696", "0.46716046", "0.46701705", "0.4660694", "0.46547654", "0.46300262", "0.4627113", "0.45568392", "0.4536798", "0.44964415", "0.4495153", "0.4490556", "0.4472311", "0.44698325", "0.44646072", "0.44305488", "0.44239464", "0.4420504", "0.44200462", "0.43969262", "0.43882266", "0.43667418", "0.43431097", "0.4323049", "0.4303275", "0.42946288", "0.42935812", "0.42918965", "0.4288037", "0.42815414", "0.42813575", "0.427767", "0.42735964", "0.42731172", "0.42728642", "0.4272593", "0.42714033", "0.42500132", "0.4241192", "0.42301825", "0.4229951", "0.42183015", "0.42134085", "0.420022", "0.4189262", "0.41833836", "0.41774917", "0.41634443", "0.41622707", "0.4160008", "0.4159014", "0.4154555", "0.41512313", "0.4150589", "0.41410032", "0.41298786", "0.4129531", "0.41279152", "0.41249487", "0.41197965", "0.41185218", "0.41178194", "0.41138002", "0.41124666", "0.41095376", "0.4109522", "0.41080138", "0.410663", "0.41037077", "0.410211", "0.40847075", "0.4083846", "0.40836132", "0.40734503", "0.40724394", "0.4069569", "0.40695566", "0.40686604", "0.40625542", "0.40619615", "0.40579602", "0.40575093", "0.4056768", "0.4054106", "0.4053981", "0.40529072", "0.40463257" ]
0.5484672
3
Return the length in bytes of the actual "data" portion of this SECSItem.
public int getLengthInBytes() { return lengthInBytes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getDataSize() {\n\t\treturn (int)this.getSize(data);\n\t}", "public int getLength() {\n\t\treturn data.length;\n\t\t\n\t}", "public int dataSize() {\n\t\treturn data.size();\n\t}", "public long dataSize() {\n return this.dataSize;\n }", "public final int length() {\n return this.data.remaining();\n }", "public long getDataSize() {\n return dataSize;\n }", "public int getLength(){\n\t\treturn data.length;\n\t}", "public int length() {\n return data.length;\n }", "public int getSizeOfData() {\n\t\treturn sizeOfData;\n\t}", "public int length() {\n return data.length;\n }", "public int size() {\n return dataSize;\n }", "public int numberOfBytes() {\n return this.data.size();\n }", "public int getLength() { return dataLength; }", "public int size() {\n\t\treturn data.length;\n\t}", "public short getDataLength() {\r\n //Add the size of the header also\r\n //Header length contains the header+data length\r\n final int lpadding;\r\n if (_padding != null) lpadding = _padding.length();\r\n else lpadding = 0;\r\n return ( (short) (_len + lpadding));\r\n }", "public int size() {\n return data.length;\n }", "public int getLength() {\n if (data instanceof String) {\n String string = (String) data;\n return string.length();\n } else if (data instanceof StringReference) {\n StringReference stref = (StringReference) data;\n return stref.getLength();\n } else if (data instanceof Value) {\n Value val = (Value) data;\n return val.getString().length();\n } else {\n return data.toString().length();\n }\n }", "public int size()\n\t{\n\t\treturn data.length;\n\t}", "public int getLength() {\r\n\t\treturn messageData.length;\r\n\t}", "@Override public long getInitializedDataLength() {\n return getDataLength();\n }", "public long getItemCount() {\n\t\treturn this.getSize(data);\n\t}", "public int dataSize() {\n\t\treturn _dataSet.dataSize();\n\t}", "public int size() {\r\n return theData.size();\r\n }", "public int getByteLength() {\n return byteLength;\n }", "public int getLength()\n {\n return stream.getInt(COSName.LENGTH, 0);\n }", "public int length() {\n return content.length();\n }", "public int size() {\n return data.size();\n }", "public int size()\n\t{\n\t\treturn _data.size();\n\t}", "@MavlinkFieldInfo(\n position = 2,\n unitSize = 4,\n description = \"total data size (set on ACK only).\"\n )\n public final long size() {\n return this.size;\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 int getLength() {\n return mySize.getLength();\n }", "public int size()\r\n\t{\r\n\t\treturn data.size();\r\n\t}", "public int size() {\n return bytes.length;\n }", "public byte getLength() {\n return this.length;\n }", "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 }", "int size() {\n return data.size();\r\n }", "protected int getPayloadLength() {\n if (data == null) {\n return 0;\n } else {\n return data.length;\n }\n }", "public int getSize()\n\t{\n\t\treturn bytes.length;\n\t}", "public long getSize() {\n\t\treturn this.payloadSize; // UTF-16 => 2 bytes per character\n\t}", "public int getLength()\n {\n return this.m_descriptor[1] & 0xFF;\n }", "public static int totalSize_data() {\n return (480 / 8);\n }", "public int getLength() { return getContents().length(); }", "public int getLength() {\n/* 83 */ return this.m_attrs.getLength();\n/* */ }", "public int getLovDataByteSize() {\n\t\treturn 0; // sometimes first 4 bytes give the length of data + 4 bytes for number\n\t}", "public int length()\n\t{\n\t\treturn contents.length;\n\t}", "protected int getLength() {\n\t\treturn this.length;\n\t}", "public int getLength() {\n/* 301 */ return this.stream.getInt(COSName.LENGTH, 0);\n/* */ }", "public static int elementSize_data() {\n return (8 / 8);\n }", "public int getLength() {\n return length_;\n }", "public int returnSize()\r\n {\r\n \treturn length;\r\n }", "public int size() {\n\t\tif (baos == null || baos.toByteArray() == null) return 0;\n\t\telse return baos.toByteArray().length;\n\t}", "@Override\n\tpublic long getLength()\n\t{\n\t\treturn inputStream.Length;\n\t}", "public SECSItemNumLengthBytes getOutboundNumberOfLengthBytes()\n {\n return outboundNumberOfLengthBytes;\n }", "@Override\n\tpublic long size() {\n\t\treturn this.currentLength.get();\n\t}", "@Override\r\n\tpublic int size() {\r\n\r\n\t\treturn data.size();\r\n\t}", "public int getLength()\n\t{\n\t\treturn (int) length;\n\t}", "public int getLength() {\n\t\treturn this.length;\n\t}", "public long getSize() {\n // a char is two bytes\n int size = (key.length() * 2) + 4;\n\n if (id != null) {\n size += ((id.length() * 2) + 4);\n }\n\n if (content != null) {\n if (content.getClass() == String.class) {\n size += ((content.toString().length() * 2) + 4);\n } else if (content instanceof CacheContent) {\n size += ((CacheContent) content).getSize();\n } else {\n return -1;\n }\n\n //add created, lastUpdate, and wasFlushed field sizes (1, 8, and 8)\n return size + 17;\n } else {\n return -1;\n }\n }", "public int getBytes(){\r\n\t\tint bytes = 0;\r\n\t\tbytes = packet.getLength();\r\n\t\treturn bytes;\r\n\t}", "public long getByteCount() {\n return byteCount;\n }", "@Override\n\tpublic int getSize() {\n\t\treturn datas.size();\n\t}", "public int getLength()\n\t{\n\t\treturn length;\n\t}", "public int getLength()\n\t{\n\t\treturn length;\n\t}", "public int getLength() {\r\n\t\treturn length;\r\n\t}", "public synchronized long size() {\n return IDX_START_OF_CONTENT + (slots * bytesPerSlot);\n }", "public int length() {\n\t\treturn size;\r\n\t}", "public int getLength()\n\t{\n\t\treturn mLength;\n\t}", "public int getLength() {\n return length_;\n }", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\r\n int length = 0;\r\n \r\n Iterator it = collection.iterator();\r\n \r\n while(it.hasNext()) {\r\n length += ((Chunk)it.next()).getSize();\r\n }\r\n \r\n return length;\r\n }", "int getByteCount() {\n\t\treturn byteCount;\n\t}", "@Override\n\tpublic Integer getLen() {\n\t\treturn this.len;\n\t}", "public int getDataCount() {\n return data_.size();\n }", "public int getDataCount() {\n return data_.size();\n }", "public int getDataCount() {\n return data_.size();\n }", "public int getDataCount() {\n return data_.size();\n }", "public int getDataCount() {\n return data_.size();\n }", "public int getDataCount() {\n return data_.size();\n }", "public int getDataCount() {\n return data_.size();\n }", "protected int getLength() {\n return length;\n }", "public int getLength() {\n return this.length;\n }", "public int getLength() {\n return this.length;\n }", "public static int size_infos_size_data() {\n return (8 / 8);\n }", "public int getLength() {\n return length;\n }", "public int length() {\n\t\treturn length;\n\t}", "public int length() {\n\t\treturn length;\n\t}", "public int getLength()\n {\n return encryptionDictionary.getInt( \"Length\", 40 );\n }", "public int getLength() {\r\n return length;\r\n }", "public int getLength() {\r\n return length;\r\n }", "public int getLength() {\r\n return length;\r\n }", "public int size()\n \t{\n \t\treturn getLength();\n \t}", "public long length() {\n return length;\n }", "public int getRemainingData() {\n return remainingData;\n }", "public int length()\n\t{\n\t\treturn length;\n\t}", "public int getDataCount() {\n return data_.size();\n }" ]
[ "0.7481205", "0.73426986", "0.7335534", "0.73313916", "0.7300455", "0.72814876", "0.72659296", "0.7253849", "0.72347105", "0.7212397", "0.7035199", "0.70283586", "0.7027778", "0.7026475", "0.6955051", "0.69305634", "0.69023865", "0.68954355", "0.6843266", "0.6813565", "0.67711306", "0.67472035", "0.67285246", "0.6726871", "0.6715795", "0.66895896", "0.6677178", "0.6675917", "0.6650111", "0.6630951", "0.6626345", "0.6615392", "0.6605626", "0.65826523", "0.65824604", "0.6566936", "0.6556889", "0.6549891", "0.6538666", "0.65381515", "0.6522427", "0.6507806", "0.6500669", "0.6477742", "0.64654624", "0.6462869", "0.6451164", "0.6437107", "0.64319915", "0.64166313", "0.64040804", "0.63963956", "0.639568", "0.638591", "0.63856524", "0.63564014", "0.6350531", "0.6350286", "0.6349748", "0.6347549", "0.6345146", "0.634125", "0.634125", "0.6333988", "0.63275194", "0.6327374", "0.6322797", "0.6318578", "0.6313032", "0.6313032", "0.6313032", "0.6313032", "0.6313032", "0.6313032", "0.6302661", "0.6301992", "0.6271686", "0.6269726", "0.6269726", "0.6266633", "0.6266633", "0.6266633", "0.6266633", "0.6266633", "0.62606424", "0.6256386", "0.6256386", "0.6256029", "0.6249123", "0.62476856", "0.62476856", "0.6246063", "0.6241635", "0.6241635", "0.6241635", "0.6232939", "0.62315655", "0.62265235", "0.6222475", "0.621785" ]
0.667396
28
Returns an enum indicating the number of length bytes used in the wire/transmission format data this SECSItem was constructed from.
public SECSItemNumLengthBytes getInboundNumberOfLengthBytes() { return inboundNumberOfLengthBytes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SECSItemNumLengthBytes getOutboundNumberOfLengthBytes()\n {\n return outboundNumberOfLengthBytes;\n }", "public int getLength()\n {\n return stream.getInt(COSName.LENGTH, 0);\n }", "public int getLength() {\n/* 301 */ return this.stream.getInt(COSName.LENGTH, 0);\n/* */ }", "public int getLength()\n {\n return this.m_descriptor[1] & 0xFF;\n }", "public int getSize() {\n int size = 5; // 1 (code) + 2 (data length) + 2 (# of constants)\n try {\n for (Iterator<String> i = constants.iterator(); i.hasNext();) {\n size += (i.next().getBytes(\"UTF-8\").length + 1); // Unicode, null-terminated\n }\n } catch (UnsupportedEncodingException e) {\n // UTF-8 should be available..\n }\n return size;\n }", "public int getLength()\n {\n return encryptionDictionary.getInt( \"Length\", 40 );\n }", "public int getLength()\n\t{\n\t\treturn (int) length;\n\t}", "public int getSize() {\n\t\tif (type == Attribute.Type.Int) {\r\n\t\t\treturn INT_SIZE;\r\n\t\t} else if (type == Attribute.Type.Char) {\r\n\t\t\treturn CHAR_SIZE * length;\r\n\t\t} else if (type == Attribute.Type.Long) {\r\n\t\t\treturn LONG_SIZE;\r\n\t\t} else if (type == Attribute.Type.Float) {\r\n\t\t\treturn FLOAT_SIZE;\r\n\t\t} else if (type == Attribute.Type.Double) {\r\n\t\t\treturn DOUBLE_SIZE;\r\n\t\t} else if (type == Attribute.Type.DateTime){\r\n\t\t\treturn LONG_SIZE;\r\n\t\t}\r\n\t\t\r\n\t\treturn size;\r\n\t}", "public int getLength() {\n return mySize.getLength();\n }", "public int getLength() {\n \t\treturn lengthAsBits;\n \t}", "public int size() {\n return 4 + value.length + BufferUtil.paddingLength(value.length, 4);\n }", "public int getLength() {\n/* 83 */ return this.m_attrs.getLength();\n/* */ }", "public long getSize() {\n\t\treturn this.payloadSize; // UTF-16 => 2 bytes per character\n\t}", "public int getLength() {\r\n\t\treturn length;\r\n\t}", "public Integer getLength() {\n return _length;\n }", "public Integer getLength() {\n return _length;\n }", "public int getLength() {\n if (data instanceof String) {\n String string = (String) data;\n return string.length();\n } else if (data instanceof StringReference) {\n StringReference stref = (StringReference) data;\n return stref.getLength();\n } else if (data instanceof Value) {\n Value val = (Value) data;\n return val.getString().length();\n } else {\n return data.toString().length();\n }\n }", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength()\n\t{\n\t\treturn length;\n\t}", "public int getLength()\n\t{\n\t\treturn length;\n\t}", "public byte getLength() {\n return this.length;\n }", "public int getLength()\n\t{\n\t\treturn mLength;\n\t}", "@MavlinkFieldInfo(\n position = 2,\n unitSize = 4,\n description = \"total data size (set on ACK only).\"\n )\n public final long size() {\n return this.size;\n }", "public short getLength() throws ToolkitException {\n byte[] buffer = getAPDUBuffer();\n short length = (short)(buffer[(short)(currentTLVOffset + 1)] & 0xFF);\n return length;\n }", "public int getLength() {\n\t\treturn length & 0xffff;\n\t}", "public int length() {\n\n\t\treturn numItems;\n\n\t}", "public int getLength() {\r\n return length;\r\n }", "public int getLength() {\r\n return length;\r\n }", "public int getLength() {\r\n return length;\r\n }", "public NM getNumberOfItemsPerUnit() { \r\n\t\tNM retVal = this.getTypedField(14, 0);\r\n\t\treturn retVal;\r\n }", "public NM getPsl14_NumberOfItemsPerUnit() { \r\n\t\tNM retVal = this.getTypedField(14, 0);\r\n\t\treturn retVal;\r\n }", "public int getLength() {\n return length;\n }", "public int getLength() {\n return length_;\n }", "public int length() {\r\n int length = 1 + 2 + deviceToken.length + 2 + payload.length;\r\n final int marshalledLength = marshall().length;\r\n assert marshalledLength == length;\r\n return length;\r\n }", "public int getLengthInBytes()\n {\n return lengthInBytes;\n }", "public int length() {\n\t\treturn length;\n\t}", "public int length() {\n\t\treturn length;\n\t}", "public short getValueLength() throws ToolkitException {\n byte[] buffer = getAPDUBuffer();\n short Lc = (short)(buffer[OFFSET_LC] & 0xFF);\n short TLVOffset = getLastTLVOffset(buffer, Lc);\n if (TLVOffset >= Lc) {\n ToolkitException.throwIt(ToolkitException.UNAVAILABLE_ELEMENT);\n }\n return (short)(buffer[(short)\n\t\t\t (TLVOffset + 1)] & 0xFF); // return the length\n }", "public int getLength() {\n\t\treturn this.length;\n\t}", "public int getLovDataByteSize() {\n\t\treturn 0; // sometimes first 4 bytes give the length of data + 4 bytes for number\n\t}", "public int getLength() {\n return length;\n }", "public int getLength() {\n return length;\n }", "public int getDERLength() throws TLVEncodingException {\r\n\t\tint length;\r\n\t\tint i = 1;\r\n\r\n\t\tif ((buffer[cursor] & 0x80) == 0x80) {\r\n\t\t\ti = buffer[cursor] & 0x07;\r\n\t\t\tcursor++;\r\n\t\t}\r\n\r\n\t\tif (cursor + i > limit)\r\n\t\t\tthrow new TLVEncodingException(\"Invalid DER length field\");\r\n\r\n\t\tlength = 0;\r\n\t\tfor (; i > 0; i--) {\r\n\t\t\tlength = (length << 8) | (buffer[cursor++] & 0xFF);\r\n\t\t}\r\n\r\n\t\treturn length;\r\n\t}", "public int length()\n\t{\n\t\treturn length;\n\t}", "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 int getLength(){\n\t\treturn length;\n\t}", "public int getLength(){\n\t\treturn length;\n\t}", "public int getPacketLength() {\n return TfsConstant.INT_SIZE * 3 + failServer.size() * TfsConstant.LONG_SIZE;\n }", "public int getLength() {\n\t\treturn data.length;\n\t\t\n\t}", "@Override\n\tpublic Integer getLen() {\n\t\treturn this.len;\n\t}", "protected int getLength() {\n\t\treturn this.length;\n\t}", "public int returnSize()\r\n {\r\n \treturn length;\r\n }", "public int length() {\n return numberOfItems;\n }", "public int getLength() {\n return length_;\n }", "public int getLength()\n {\n\treturn length;\n }", "public int length() {\n\t\treturn size;\r\n\t}", "public int getNumberOfBytes() {\n\treturn this.type.getNumberOfBytes();\n }", "public static int getByteLength() {\n return RRCLASS_BYTE_LEN;\n }", "public int getLength() { return length;\t}", "@Override\n\tpublic long size() {\n\t\treturn this.currentLength.get();\n\t}", "public double getLength() {\n return count;\n }", "public int getSize()\n\t{\n\t\treturn bytes.length;\n\t}", "protected int getLength() {\n return length;\n }", "public int getLengthInBytes()\n \t{\n \t\treturn FormatableBitSet.numBytesFromBits(lengthAsBits);\n \t}", "@Contract(pure = true)\r\n public int getLength() {\r\n return length;\r\n }", "public int getLength() {\r\n\t\treturn messageData.length;\r\n\t}", "public int length() {\n return length;\n }", "public int length() {\n return length;\n }", "public int length() {\n return length;\n }", "public static int size_length() {\n return (8 / 8);\n }", "public int getLength(){\n\t\treturn data.length;\n\t}", "public int getLength()\n {\n return length;\n }", "public int size() {\n return bytes.length;\n }", "public long length() {\n return length;\n }", "public int getLength() {\n return this.length;\n }", "public int getLength() {\n return this.length;\n }", "public final int length() {\n return this.data.remaining();\n }", "public long getItemCount() {\n\t\treturn this.getSize(data);\n\t}", "public int size() {\r\n return length;\r\n }", "protected int getLength() {\n int length = super.getLength(); //see if it is defined in the ncml\n if (length < 0) {\n double[] t = getTimes();\n if (t != null) length = t.length;\n else length = 0;\n }\n return length;\n }", "public int getSize() {\n throw new OurBadException(\" Item '\" + this.serialize() + \"' is not an array.\");\n }", "public int size()\n \t{\n \t\treturn getLength();\n \t}", "public long getLength();", "public long getLength();", "public org.python.types.Int __len__();", "public int length() {\n return size();\n }", "public final int getStructLength()\n\t{\n\t\treturn length;\n\t}", "public static int size_dataType() {\n return (8 / 8);\n }", "public int getStructureSize() {\n if (structureSize < 0) {\n structureSize = calcStructureSize();\n }\n return structureSize;\n }", "public int getDecodedStreamLength()\n {\n return this.stream.getInt(COSName.DL);\n }", "public int getLength() {\r\n int length = 0;\r\n \r\n Iterator it = collection.iterator();\r\n \r\n while(it.hasNext()) {\r\n length += ((Chunk)it.next()).getSize();\r\n }\r\n \r\n return length;\r\n }", "public int getLength() { return dataLength; }", "public int length() {\n \treturn length;\n }", "public int length() {\n return data.length;\n }", "int getByteCount() {\n\t\treturn byteCount;\n\t}" ]
[ "0.7107141", "0.69061273", "0.68967277", "0.6862134", "0.6795485", "0.6776869", "0.6739462", "0.67341375", "0.6715814", "0.66697073", "0.66639185", "0.6654374", "0.6643088", "0.66411555", "0.66354305", "0.66354305", "0.6632811", "0.6628921", "0.6628921", "0.6628921", "0.6628921", "0.6628921", "0.6628921", "0.66268754", "0.66268754", "0.66226226", "0.6605788", "0.65824294", "0.6580626", "0.6580113", "0.65297", "0.6527307", "0.6527307", "0.6527307", "0.6524113", "0.65237975", "0.6520038", "0.6515339", "0.65110767", "0.65078694", "0.6493962", "0.6493962", "0.6482157", "0.64806765", "0.64799905", "0.64772874", "0.64772874", "0.6475467", "0.64606476", "0.64551574", "0.64528185", "0.64528185", "0.64520204", "0.6449722", "0.64357376", "0.6434486", "0.64324975", "0.64144266", "0.6413713", "0.6405613", "0.6398609", "0.63810676", "0.63806415", "0.63786954", "0.6374959", "0.63747734", "0.6371977", "0.63677526", "0.6367485", "0.6367479", "0.6366909", "0.63505244", "0.63505244", "0.63505244", "0.63497907", "0.6346989", "0.63465506", "0.6343577", "0.63341594", "0.63320833", "0.63320833", "0.632599", "0.63173616", "0.63114417", "0.6306369", "0.6306348", "0.6303025", "0.6296609", "0.6296609", "0.62728894", "0.6272595", "0.6267424", "0.6258784", "0.62547", "0.62545097", "0.6248937", "0.62431383", "0.62413585", "0.6224155", "0.6223204" ]
0.7031625
1
Returns an enum indicating the number of length bytes that will be used when creating the wire/transmission format data from this SECSItem.
public SECSItemNumLengthBytes getOutboundNumberOfLengthBytes() { return outboundNumberOfLengthBytes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SECSItemNumLengthBytes getInboundNumberOfLengthBytes()\n {\n return inboundNumberOfLengthBytes;\n }", "public int getLength()\n {\n return this.m_descriptor[1] & 0xFF;\n }", "public long getSize() {\n\t\treturn this.payloadSize; // UTF-16 => 2 bytes per character\n\t}", "public int getSize() {\n\t\tif (type == Attribute.Type.Int) {\r\n\t\t\treturn INT_SIZE;\r\n\t\t} else if (type == Attribute.Type.Char) {\r\n\t\t\treturn CHAR_SIZE * length;\r\n\t\t} else if (type == Attribute.Type.Long) {\r\n\t\t\treturn LONG_SIZE;\r\n\t\t} else if (type == Attribute.Type.Float) {\r\n\t\t\treturn FLOAT_SIZE;\r\n\t\t} else if (type == Attribute.Type.Double) {\r\n\t\t\treturn DOUBLE_SIZE;\r\n\t\t} else if (type == Attribute.Type.DateTime){\r\n\t\t\treturn LONG_SIZE;\r\n\t\t}\r\n\t\t\r\n\t\treturn size;\r\n\t}", "public int getLength() {\n/* 301 */ return this.stream.getInt(COSName.LENGTH, 0);\n/* */ }", "public int getLength()\n {\n return encryptionDictionary.getInt( \"Length\", 40 );\n }", "public int getLength()\n {\n return stream.getInt(COSName.LENGTH, 0);\n }", "public int getLength()\n\t{\n\t\treturn (int) length;\n\t}", "public int getSize() {\n int size = 5; // 1 (code) + 2 (data length) + 2 (# of constants)\n try {\n for (Iterator<String> i = constants.iterator(); i.hasNext();) {\n size += (i.next().getBytes(\"UTF-8\").length + 1); // Unicode, null-terminated\n }\n } catch (UnsupportedEncodingException e) {\n // UTF-8 should be available..\n }\n return size;\n }", "public int getLength() {\n return mySize.getLength();\n }", "public byte getLength() {\n return this.length;\n }", "public int getLength() {\n/* 83 */ return this.m_attrs.getLength();\n/* */ }", "public int getLength() {\n \t\treturn lengthAsBits;\n \t}", "public int size() {\n return 4 + value.length + BufferUtil.paddingLength(value.length, 4);\n }", "public int getLength() {\r\n\t\treturn length;\r\n\t}", "public int getLength() {\n\t\treturn length & 0xffff;\n\t}", "public Integer getLength() {\n return _length;\n }", "public Integer getLength() {\n return _length;\n }", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength()\n\t{\n\t\treturn length;\n\t}", "public int getLength()\n\t{\n\t\treturn length;\n\t}", "public int getDERLength() throws TLVEncodingException {\r\n\t\tint length;\r\n\t\tint i = 1;\r\n\r\n\t\tif ((buffer[cursor] & 0x80) == 0x80) {\r\n\t\t\ti = buffer[cursor] & 0x07;\r\n\t\t\tcursor++;\r\n\t\t}\r\n\r\n\t\tif (cursor + i > limit)\r\n\t\t\tthrow new TLVEncodingException(\"Invalid DER length field\");\r\n\r\n\t\tlength = 0;\r\n\t\tfor (; i > 0; i--) {\r\n\t\t\tlength = (length << 8) | (buffer[cursor++] & 0xFF);\r\n\t\t}\r\n\r\n\t\treturn length;\r\n\t}", "@MavlinkFieldInfo(\n position = 2,\n unitSize = 4,\n description = \"total data size (set on ACK only).\"\n )\n public final long size() {\n return this.size;\n }", "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 static int getByteLength() {\n return RRCLASS_BYTE_LEN;\n }", "public int getLength()\n\t{\n\t\treturn mLength;\n\t}", "public int getLength() {\n return length;\n }", "public int getLength() {\n return length_;\n }", "public int getLengthInBytes()\n {\n return lengthInBytes;\n }", "public int getLength() {\r\n return length;\r\n }", "public int getLength() {\r\n return length;\r\n }", "public int getLength() {\r\n return length;\r\n }", "public int getNumberOfBytes() {\n\treturn this.type.getNumberOfBytes();\n }", "public short getLength() throws ToolkitException {\n byte[] buffer = getAPDUBuffer();\n short length = (short)(buffer[(short)(currentTLVOffset + 1)] & 0xFF);\n return length;\n }", "public int getLength() {\n return length;\n }", "public int getLength() {\n return length;\n }", "public int returnSize()\r\n {\r\n \treturn length;\r\n }", "public int getLength() {\n if (data instanceof String) {\n String string = (String) data;\n return string.length();\n } else if (data instanceof StringReference) {\n StringReference stref = (StringReference) data;\n return stref.getLength();\n } else if (data instanceof Value) {\n Value val = (Value) data;\n return val.getString().length();\n } else {\n return data.toString().length();\n }\n }", "public int getPacketLength() {\n return TfsConstant.INT_SIZE * 3 + failServer.size() * TfsConstant.LONG_SIZE;\n }", "public int getLength(){\n\t\treturn length;\n\t}", "public int getLength(){\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn this.length;\n\t}", "public int getLength() {\n return length_;\n }", "public int getByteLength() {\n return byteLength;\n }", "public int length() {\r\n int length = 1 + 2 + deviceToken.length + 2 + payload.length;\r\n final int marshalledLength = marshall().length;\r\n assert marshalledLength == length;\r\n return length;\r\n }", "public int length() {\n\t\treturn length;\n\t}", "public int length() {\n\t\treturn length;\n\t}", "public int getSize()\n\t{\n\t\treturn bytes.length;\n\t}", "@Override\n\tpublic Integer getLen() {\n\t\treturn this.len;\n\t}", "public int getLength()\n {\n\treturn length;\n }", "public int length() {\n\n\t\treturn numItems;\n\n\t}", "protected int getLength() {\n\t\treturn this.length;\n\t}", "public int getLength() { return length;\t}", "protected int getLength() {\n return length;\n }", "public int getLovDataByteSize() {\n\t\treturn 0; // sometimes first 4 bytes give the length of data + 4 bytes for number\n\t}", "public static int size_length() {\n return (8 / 8);\n }", "public int length() {\n\t\treturn size;\r\n\t}", "public int length()\n\t{\n\t\treturn length;\n\t}", "public NM getPsl14_NumberOfItemsPerUnit() { \r\n\t\tNM retVal = this.getTypedField(14, 0);\r\n\t\treturn retVal;\r\n }", "public short getValueLength() throws ToolkitException {\n byte[] buffer = getAPDUBuffer();\n short Lc = (short)(buffer[OFFSET_LC] & 0xFF);\n short TLVOffset = getLastTLVOffset(buffer, Lc);\n if (TLVOffset >= Lc) {\n ToolkitException.throwIt(ToolkitException.UNAVAILABLE_ELEMENT);\n }\n return (short)(buffer[(short)\n\t\t\t (TLVOffset + 1)] & 0xFF); // return the length\n }", "public NM getNumberOfItemsPerUnit() { \r\n\t\tNM retVal = this.getTypedField(14, 0);\r\n\t\treturn retVal;\r\n }", "public int getLength()\n {\n return length;\n }", "public int getLengthInBytes()\n \t{\n \t\treturn FormatableBitSet.numBytesFromBits(lengthAsBits);\n \t}", "public int getLength() {\n\t\treturn data.length;\n\t\t\n\t}", "public int getLength() {\r\n\t\treturn messageData.length;\r\n\t}", "public int size() {\n return bytes.length;\n }", "public int getDecodedStreamLength()\n {\n return this.stream.getInt(COSName.DL);\n }", "@Contract(pure = true)\r\n public int getLength() {\r\n return length;\r\n }", "public int length() {\n return numberOfItems;\n }", "public int getLength() {\n return this.length;\n }", "public int getLength() {\n return this.length;\n }", "public int length() {\n return length;\n }", "public int length() {\n return length;\n }", "public int length() {\n return length;\n }", "public int getSize() {\n throw new OurBadException(\" Item '\" + this.serialize() + \"' is not an array.\");\n }", "private int getLength() throws IOException {\n\n int i = in.read();\n if ( i == -1 ) {\n throw new IOException( BaseMessages\n .getString( MQTTPublisherMeta.PKG, \"MQTTClientSSL.Error.InvalidDERLengthMissing\" ) );\n }\n\n // A single byte short length\n if ( ( i & ~0x7F ) == 0 ) {\n return i;\n }\n\n int num = i & 0x7F;\n\n // We can't handle length longer than 4 bytes\n if ( i >= 0xFF || num > 4 ) {\n throw new IOException(\n BaseMessages.getString( MQTTPublisherMeta.PKG, \"MQTTClientSSL.Error.InvalidDERFieldTooBig\", i ) );\n }\n\n byte[] bytes = new byte[num];\n int n = in.read( bytes );\n if ( n < num ) {\n throw new IOException(\n BaseMessages.getString( MQTTPublisherMeta.PKG, \"MQTTClientSSL.Error.InvalidDERLengthTooShort\" ) );\n }\n\n return new BigInteger( 1, bytes ).intValue();\n }", "public long length() {\n return length;\n }", "public static int size_dataType() {\n return (8 / 8);\n }", "@Override\n\tpublic long size() {\n\t\treturn this.currentLength.get();\n\t}", "public long getLength();", "public long getLength();", "public final int getStructLength()\n\t{\n\t\treturn length;\n\t}", "public int getDecodedStreamLength() {\n/* 567 */ return this.stream.getInt(COSName.DL);\n/* */ }", "int getByteCount() {\n\t\treturn byteCount;\n\t}", "public long getSize()\n {\n return getLong(\"Size\");\n }", "public int size() {\r\n return length;\r\n }", "private int getLength() throws IOException {\n\n\t\t\tint i = this.in.read();\n\t\t\tif (i == -1) {\n\t\t\t\tthrow new IllegalStateException(\"Invalid DER: length missing\");\n\t\t\t}\n\n\t\t\t// A single byte short length\n\t\t\tif ((i & ~0x7F) == 0) {\n\t\t\t\treturn i;\n\t\t\t}\n\n\t\t\tint num = i & 0x7F;\n\n\t\t\t// We can't handle length longer than 4 bytes\n\t\t\tif (i >= 0xFF || num > 4) {\n\t\t\t\tthrow new IllegalStateException(\"Invalid DER: length field too big (\" + i + \")\");\n\t\t\t}\n\n\t\t\tbyte[] bytes = new byte[num];\n\t\t\tint n = this.in.read(bytes);\n\t\t\tif (n < num) {\n\t\t\t\tthrow new IllegalStateException(\"Invalid DER: length too short\");\n\t\t\t}\n\n\t\t\treturn new BigInteger(1, bytes).intValue();\n\t\t}", "public int getLength(){\n\t\treturn data.length;\n\t}", "public long getRecordSize ( ) {\r\n\t\treturn 113;\r\n\t}", "public int getLength() {\r\n int length = 0;\r\n \r\n Iterator it = collection.iterator();\r\n \r\n while(it.hasNext()) {\r\n length += ((Chunk)it.next()).getSize();\r\n }\r\n \r\n return length;\r\n }", "public int size() {\n\t\tif (baos == null || baos.toByteArray() == null) return 0;\n\t\telse return baos.toByteArray().length;\n\t}", "public int getSize() {\n\t\treturn _size;\n\t}", "public static byte getSize() {\n return SIZE;\n }", "public int size()\n \t{\n \t\treturn getLength();\n \t}", "protected String getBitLength()\n {\n return bitLength;\n }" ]
[ "0.698171", "0.68478143", "0.68187", "0.67869925", "0.6777389", "0.67592096", "0.67433137", "0.670173", "0.66861695", "0.66717935", "0.66525596", "0.6642848", "0.66291606", "0.65926874", "0.6567425", "0.6560113", "0.65532994", "0.65532994", "0.65522736", "0.65522736", "0.65522736", "0.65522736", "0.65522736", "0.65522736", "0.6536582", "0.6536582", "0.6534765", "0.65039676", "0.64971215", "0.64965767", "0.6489857", "0.64748275", "0.6471486", "0.64705175", "0.64654386", "0.64654386", "0.64654386", "0.6464913", "0.64557165", "0.6418833", "0.6418833", "0.6400901", "0.6400288", "0.63929814", "0.63886166", "0.63886166", "0.63780755", "0.637777", "0.6369315", "0.6368721", "0.63624144", "0.63624144", "0.6356472", "0.63510716", "0.6340706", "0.6335887", "0.6332004", "0.6331587", "0.6315605", "0.63064474", "0.6305006", "0.6304988", "0.63043094", "0.6302797", "0.628971", "0.6285412", "0.62849164", "0.6281424", "0.6279658", "0.62722516", "0.6271105", "0.62691724", "0.62568814", "0.625167", "0.62497747", "0.62497747", "0.6242179", "0.6242179", "0.6242179", "0.62314683", "0.62206143", "0.62165856", "0.62102616", "0.619752", "0.6194303", "0.6194303", "0.61918455", "0.6184669", "0.6179555", "0.6178415", "0.61766696", "0.6165871", "0.6160155", "0.61501515", "0.614367", "0.6143129", "0.6142849", "0.6140954", "0.61382085", "0.6131932" ]
0.7240552
0
This method is used to change the number of length bytes used when this SECSItem is converted to its wire/transmission format. The value the number of length bytes will actually set to is the greater of the minimum required or the number desired.
public void setOutboundNumberOfLengthBytes(int length, SECSItemNumLengthBytes desiredNumberOfLengthBytes) { if (length < 0 || length > 0x00FFFFFF) { throw new IllegalArgumentException( "The value for the length argument must be between 0 and 16777215 inclusive."); } outboundNumberOfLengthBytes = calculateMinimumNumberOfLengthBytes(length); if (outboundNumberOfLengthBytes.valueOf() < desiredNumberOfLengthBytes.valueOf()) { outboundNumberOfLengthBytes = desiredNumberOfLengthBytes; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLength( int length ) { setCapacity( length ); this.length = length; }", "public void setLength(long length);", "public void setLength(long length);", "void setLength( long length );", "private static SECSItemNumLengthBytes calculateMinimumNumberOfLengthBytes(int length)\n {\n SECSItemNumLengthBytes result = SECSItemNumLengthBytes.ONE;\n if (length > 255)\n {\n if (length < 65536)\n result = SECSItemNumLengthBytes.TWO;\n else\n result = SECSItemNumLengthBytes.THREE;\n }\n \n return result;\n }", "@Override\n\tpublic void setLength(int length) {\n\t\t\n\t}", "public void setLength(int newLength) {\r\n\t\tif (cursor + newLength > buffer.length)\r\n\t\t\tthrow new IllegalArgumentException(\"Can't set new length if it exceeds buffer\");\r\n\t\tlimit = cursor + newLength;\r\n\t}", "protected SECSItem(SECSItemFormatCode formatCode, int length, SECSItemNumLengthBytes desiredNumberOfLengthBytes)\n {\n this.formatCode = formatCode;\n lengthInBytes = length;\n setOutboundNumberOfLengthBytes(length, desiredNumberOfLengthBytes);\n }", "public void setLength(long length) { \n this.length = length; \n }", "@Override\n\tpublic void SetLength(long value)\n\t{\n\t\tthrow new UnsupportedOperationException(\"TarInputStream SetLength not supported\");\n\t}", "public void setLength(double newLength) {\n length = newLength;\n }", "void setLength(int length);", "public void setLength(int length)\n {\n this.length = length;\n }", "public void setLength(int length) {\r\n this.length = length;\r\n }", "public void setLength(int length) {\r\n this.length = length;\r\n }", "public SECSItemNumLengthBytes getInboundNumberOfLengthBytes()\n {\n return inboundNumberOfLengthBytes;\n }", "public void setLength(int length) {\r\n\t\tthis.length = length;\r\n\t}", "public void setLengthOfStay(int len) {\n this.length_of_stay=len;\n }", "synchronized void setLength(int length) {\n this.length = length;\n }", "public void setLength(int length)\n {\n encryptionDictionary.setInt(\"Length\", length);\n }", "public void setCurrentLength(long currentLength) { \n this.currentLength = currentLength; \n }", "public void setLength(int length) {\n\t\tthis.length = length;\n\t}", "public void setLength(int length) {\n\t\tthis.length = length;\n\t}", "public void setLength(int length) {\n\t\tthis.length = length;\n\t}", "void setExpectedLength(final int expectedLength) {\n this.vars.put(\"expectedLength\", String.valueOf(expectedLength));\n }", "public SECSItemNumLengthBytes getOutboundNumberOfLengthBytes()\n {\n return outboundNumberOfLengthBytes;\n }", "public void setLength(long length) {\r\n\t\tthis.length = length;\r\n\t}", "public void setLength(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), LENGTH, value);\r\n\t}", "public void setMaxLength(int value) {\n this.maxLength = value;\n }", "public void set_size(int s);", "@Override\n public int getMaxCapacity() {\n return 156250000;\n }", "protected abstract int getMaxDesiredSize();", "public void setLen_cable(java.math.BigDecimal newLen_cable)\n\t\tthrows java.rmi.RemoteException;", "@JsProperty(name = \"length\")\n public native void setLength(@DoNotAutobox Number value);", "public int getLength()\n {\n return encryptionDictionary.getInt( \"Length\", 40 );\n }", "@Override\r\n\tpublic void setSequenceSize(int x) {\n\t\tsizeNum = x;\r\n\t\tupdate();\r\n\t}", "public void setLength(Double newlength)\n {\n length = newlength;\n }", "public void setMaximumPatternLength(int length) {\n\t\tthis.maxItemsetSize = length;\n\t}", "public void setLength( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), LENGTH, value);\r\n\t}", "public void setSize(long value) {\n this.size = value;\n }", "public Builder setServerPayloadSizeBytes(int value) {\n \n serverPayloadSizeBytes_ = value;\n onChanged();\n return this;\n }", "public void set_length(short value) {\n setUIntElement(offsetBits_length(), 8, value);\n }", "public void setKeyLength(int keyLength) {\n\t\tthis.keyLength = keyLength;\n\t}", "public int errorStringLength()\n {\n return frameLength() - offendingHeaderFrameLength() - ErrorFlyweight.HEADER_LENGTH;\n }", "public void setLength(int length){\n\t\tif(length > 0){\n\t\t\tthis.length = length; //this.length is the length were in right now. and = length is the length the object is given\n\t\t}\n\t\t\n\t\t\n\t}", "public void setLength(double length){this.length=length;}", "@Value.Default\n public int getByteSize() {\n\treturn 0;\n }", "public int getDesiredSize()\n\t{\n\t\treturn desiredSize;\n\t}", "public int getLovDataByteSize() {\n\t\treturn 0; // sometimes first 4 bytes give the length of data + 4 bytes for number\n\t}", "public int size() {\n return 4 + value.length + BufferUtil.paddingLength(value.length, 4);\n }", "public int getLength() {\n/* 83 */ return this.m_attrs.getLength();\n/* */ }", "public Builder setLength(int value) {\n \n length_ = value;\n onChanged();\n return this;\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:55:06.822 -0500\", hash_original_method = \"2D2F8FB9FD0DE4D4C70B238FD2D4C88B\", hash_generated_method = \"CFB81A0992BCD18B37272999971C8572\")\n \npublic ContentLength(int length) {\n super(NAME);\n this.contentLength = Integer.valueOf(length);\n }", "public void setCapacity(int newCapacity) {\n\n\t\tif (newCapacity < 1) {\n\t\t\tsendWarning(\n\t\t\t\t\t\"The capacity of a transporter should be changed to zero or \"\n\t\t\t\t\t\t\t+ \"a negative value. The capacity will remain unchanged!\",\n\t\t\t\t\t\"Transporter : \" + getName()\n\t\t\t\t\t\t\t+ \" Method: void setCapacity(int newCapacity)\",\n\t\t\t\t\t\"A capacity which is zero or negative does not make sense.\",\n\t\t\t\t\t\"Make sure to provide a valid positive capacity \"\n\t\t\t\t\t\t\t+ \"when changing this attribute.\");\n\n\t\t\treturn; // forget that rubbish\n\t\t}\n\n\t\tthis.capacity = newCapacity;\n\t}", "public synchronized int getLowerSizeLimit() {\n \t\treturn lower;\n \t}", "public void setLength(int length) {\n\t\tif (length <= 0)\n\t\t\tthrow new IllegalArgumentException(\"length must be > 0\");\n\n\t\tthis.length = length;\n\t}", "public boolean setLength(double Length);", "Long payloadLength();", "public int getLength() {\r\n\t\treturn length;\r\n\t}", "public void setMaxLength(int maxLength) {\r\n _maxLength = maxLength;\r\n }", "void setMaxCharSize(int value);", "public void setLength(long newLength) throws IOException {\n flush();\n this.randomAccessFile.setLength(newLength);\n if (newLength < this.fileOffset) {\n this.fileOffset = newLength;\n }\n }", "private void addLengthToCacheSize(final IndexedDiskElementDescriptor value)\r\n {\r\n contentSize.addAndGet((value.len + IndexedDisk.HEADER_SIZE_BYTES) / 1024 + 1);\r\n }", "protected int getLength() {\n return length;\n }", "public void set_estLength(short value) {\n setUIntElement(offsetBits_estLength(), 8, value);\n }", "public SamFilterParamsBuilder minLength(int value) {\n mMinReadLength = value;\n return this;\n }", "public int getLength() {return length;}", "public int getLength() {\n\t\treturn length & 0xffff;\n\t}", "public int getSize() {\n return this.serialize().limit();\n }", "public void setPackageSize(int size){\r\n }", "public int getLength()\n\t{\n\t\treturn (int) length;\n\t}", "public long getSize() {\n\t\treturn this.payloadSize; // UTF-16 => 2 bytes per character\n\t}", "public void setCvpOperationLength(long value)\n {\n if(__cvpOperationLength != value)\n {\n _isDirty = true;\n }\n __cvpOperationLength = value;\n }", "public void setSize(int value) {\n\t\tthis.size = value;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "@Override\r\n\tpublic int getLength() {\n\t\treturn 0;\r\n\t}", "public void setSizeV(long s){\n\t\tthis.sizeV = s;\n\t}", "public void setSleeveLength(String sleeveLength) {\r\n\t\tthis.sleeveLength = sleeveLength;\r\n\t}", "public int getLength() {\n return length;\n }", "public int getLength() {\n return mySize.getLength();\n }", "public int getLength(){\n\t\treturn length;\n\t}", "public int getLength(){\n\t\treturn length;\n\t}", "public void setChainLength(int c)\n {\n this.chainLength = c;\n }", "public int getLength() {\r\n return length;\r\n }", "public int getLength() {\r\n return length;\r\n }", "public int getLength() {\r\n return length;\r\n }", "protected int getLength() {\n\t\treturn this.length;\n\t}", "public int getMaxChainLength(){\r\n return maxChainLength;\r\n }", "@Test\n public final void testValidGetSize() {\n int expRes = 5;\n int result = ship.getSize();\n assertEquals(expRes, result);\n expRes = 19;\n ship.setSize(expRes);\n result = ship.getSize();\n assertEquals(expRes, result);\n }", "public int getLength() { return length;\t}", "public static int getMaxSize(){\n\t\treturn 2* 4;\n\t}", "public int getPayloadLength() {\n return buffer.limit() - 12;\n }", "public void setLength(double length)\r\n {\r\n this.length = length;\r\n }", "public int getPacketLength() {\n return TfsConstant.INT_SIZE * 3 + failServer.size() * TfsConstant.LONG_SIZE;\n }", "public int getProtocolDelimitedLength();" ]
[ "0.674997", "0.6642027", "0.6642027", "0.64910614", "0.64828855", "0.6452709", "0.6402221", "0.63919556", "0.6380031", "0.6369243", "0.63480693", "0.6338597", "0.62499297", "0.6249434", "0.6249434", "0.62053615", "0.6185654", "0.61693907", "0.615585", "0.6128087", "0.611504", "0.60683894", "0.60683894", "0.60683894", "0.6049145", "0.60474885", "0.604662", "0.60213006", "0.59838873", "0.59603083", "0.5942287", "0.5909696", "0.59008914", "0.58889633", "0.5844469", "0.582618", "0.5819842", "0.5809451", "0.5803626", "0.57962066", "0.5790363", "0.5758337", "0.57511127", "0.57498604", "0.57248867", "0.5719478", "0.57131886", "0.57089424", "0.5705232", "0.5658858", "0.5657563", "0.5656361", "0.5636478", "0.56319773", "0.56266934", "0.5623319", "0.5608147", "0.56071144", "0.56033933", "0.56025374", "0.55886024", "0.55860144", "0.5576859", "0.55747724", "0.5571597", "0.55668956", "0.5563627", "0.55471957", "0.5546649", "0.55425614", "0.5541574", "0.55366373", "0.5535586", "0.55296767", "0.5526961", "0.5526961", "0.5526961", "0.5526961", "0.5526961", "0.5526961", "0.55246645", "0.55118734", "0.55113065", "0.55065626", "0.5505202", "0.5500274", "0.5500274", "0.54995435", "0.5498727", "0.5498727", "0.5498727", "0.54978275", "0.5491242", "0.5488638", "0.5488379", "0.5487521", "0.5483873", "0.5479377", "0.54719114", "0.5471689" ]
0.72443026
0
Returns an enum version of this SECSItem's Format Code.
public SECSItemFormatCode getSECSItemFormatCode() { return getFormatCode(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SECSItemFormatCode getFormatCode()\n {\n return formatCode;\n }", "@Field(0) \r\n\tpublic ValuedEnum<DXGI_FORMAT> format() {\r\n\t\treturn this.io.getEnumField(this, 0);\r\n\t}", "public RMFormat getFormat()\n {\n return getStyle().getFormat();\n }", "public String getFormatCode() {\n if (format == null) return \"MP4\";\n switch(format) {\n case \"Windows Media\": return \"WMV\";\n case \"Flash Video\": return \"FLV\";\n case \"MPEG-4\": return \"MP4\";\n case \"Matroska\": return \"MKV\";\n case \"AVI\": return \"AVI\";\n default: return \"MP4\";\n }\n }", "public int getFormat()\n {\n return format;\n }", "public int getFormat ()\n {\n return this.format;\n }", "public final AdFormat getFormat() {\n\t\treturn impl.getFormat();\n }", "public String getFormatDesign() {\n return (String)getAttributeInternal(FORMATDESIGN);\n }", "public int getAlFormat()\n {\n return alFormat;\n }", "public String getFormat() {\n\t\treturn getAttribute(FORMAT_TAG);\n\t}", "public String getFormat() {\n/* 206 */ return getValue(\"format\");\n/* */ }", "Object getFormat();", "public String value() {\n return formattedCode;\n }", "public String convertEnum()\n {\n \tswitch (pattern.ordinal())\n \t{\n \tcase 0:\n \t\treturn \"Red Cards\";\n \tcase 1:\n \t\treturn \"Black Cards\";\n \tcase 2:\n \t\treturn \"Hearts\";\n \tcase 3:\n \t\treturn \"Diamonds\";\n \tcase 4:\n \t\treturn \"Clubs\";\n \tcase 5:\n \t\treturn \"Spades\";\n \tcase 6:\n \t\treturn \"Twos\";\n \tcase 7:\n \t\treturn \"Threes\";\n \tcase 8:\n \t\treturn \"Fours\";\n \tcase 9:\n \t\treturn \"Fives\";\n \tcase 10:\n \t\treturn \"Sixes\";\n \tcase 11:\n \t\treturn \"Sevens\";\n \tcase 12:\n \t\treturn \"Eights\";\n \tcase 13:\n \t\treturn \"Nines\";\n \tcase 14:\n \t\treturn \"Tens\";\n \tcase 15:\n \t\treturn \"Jacks\";\n \tcase 16:\n \t\treturn \"Queens\";\n \tcase 17:\n \t\treturn \"Kings\";\n \tcase 18:\n \t\treturn \"Aces\";\n \tcase 19:\n \t\treturn \"Single Digit Primes\";\n \tcase 20:\n \t\treturn \"Pairs\";\n \tcase 21:\n \t\treturn \"Sum of Pairs\";\n \tcase 22:\n \t\treturn \"Incrementing Cards\";\n \tcase 23:\n \t\treturn \"Decrementing Cards\";\n \tdefault:\n \t\treturn \"\";\n \t}\n }", "public Class<F> getFormatType() {\n\t\treturn formatType;\n\t}", "public String getFormat() {\n\t\treturn format;\n\t}", "public String getFormat() {\n return format;\n }", "public String getFormat() {\n return format;\n }", "public String getFormat() {\n return format;\n }", "public String getFormat()\n {\n return format;\n }", "public String getFormat() {\r\n return _format;\r\n }", "@Override\n public com.gensym.util.Symbol getFormatType() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.FORMAT_TYPE_);\n return (com.gensym.util.Symbol)retnValue;\n }", "@Field(0) \n\tpublic int format() {\n\t\treturn this.io.getIntField(this, 0);\n\t}", "public String getFormat() {\n\t\treturn formatString;\n\t}", "public static ALFormat getEnum(int value)\n {\n switch (value)\n {\n case AL_FORMAT_MONO8:\n return MONO_8;\n case AL_FORMAT_MONO16:\n return MONO_16;\n case AL_FORMAT_STEREO8:\n return STEREO_8;\n case AL_FORMAT_STEREO16:\n return STEREO_16;\n }\n\n throw new SilenceException(\"Unknown format value: \" + value);\n }", "public String formatTypeName()\r\n {\r\n return mFormatTypeName;\r\n }", "public String getFormat() {\n return this.format;\n }", "String getFormat();", "String getFormat();", "String getFormat();", "public AVT getFormat()\n {\n return m_format_avt;\n }", "public List<Format> getFormats();", "public Format getFormat()\n {\n return (formatControl == null) ? null : formatControl.getFormat();\n }", "Format internalGetFormat()\n {\n return doGetFormat();\n }", "public\tint\tgetTypeFormatId()\t{ return StoredFormatIds.BITIMPL_V01_ID; }", "com.google.protobuf.ByteString\n getFormatBytes();", "public java.lang.Integer getIdeFormato() {\n\t\treturn ideFormato;\n\t}", "public String getEnum() {\n if (model == null)\n return strEnum;\n return model.getEnum();\n }", "@UML(identifier=\"fileFormat\", obligation=MANDATORY, specification=ISO_19139)\n Format getFileFormat();", "public FormatOptions getFormatOptions() {\n return this.formatOptions;\n }", "public com.google.protobuf.ByteString\n getFormatBytes() {\n Object ref = format_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n format_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "NumberFormat getFormat() {\n\t\t\treturn fmt_result;\n\t\t}", "public CodeStyle getStyle(){\r\n\t\treturn m_style;\r\n\t}", "FileFormat getFormat();", "public com.google.protobuf.ByteString\n getFormatBytes() {\n Object ref = format_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n format_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String format () {\n\t\treturn format;\n\t}", "@ApiModelProperty(value = \"Gets or sets Field Index Format.\")\n public FieldIndexFormatEnum getFieldIndexFormat() {\n return fieldIndexFormat;\n }", "public edu.umich.icpsr.ddi.FormatType getFormat()\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.FormatType target = null;\n target = (edu.umich.icpsr.ddi.FormatType)get_store().find_element_user(FORMAT$10, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public ArrayList<String> getFormattedCode() {\n return formattedCode;\n }", "public SurfaceFormat getFormat()\n\t{\n\t\treturn this._format;\n\t}", "public int getTypeFormatId()\n {\n if ( formatId != 0 ) { return formatId; }\n else\n {\n //\n // If you serialize this class outside the formatable machinery, you\n // will lose the format id. This can happen if you pass one of these\n // objects across the network. Here we recover the format id.\n //\n if ( TypeId.BOOLEAN_NAME.equals( unqualifiedName ) ) {\n return StoredFormatIds.BOOLEAN_TYPE_ID_IMPL; }\n else if ( TypeId.BIGINT_NAME.equals( unqualifiedName ) ) {\n return StoredFormatIds.BIGINT_TYPE_ID_IMPL; }\n else if ( TypeId.INTEGER_NAME.equals( unqualifiedName ) ) {\n return StoredFormatIds.INT_TYPE_ID_IMPL; }\n else if ( TypeId.SMALLINT_NAME.equals( unqualifiedName ) ) {\n return StoredFormatIds.SMALLINT_TYPE_ID_IMPL; }\n else if ( TypeId.TINYINT_NAME.equals( unqualifiedName ) ) {\n return StoredFormatIds.TINYINT_TYPE_ID_IMPL; }\n else if ( TypeId.DECIMAL_NAME.equals( unqualifiedName ) ) {\n return StoredFormatIds.DECIMAL_TYPE_ID_IMPL; }\n else if ( TypeId.NUMERIC_NAME.equals( unqualifiedName ) ) {\n return StoredFormatIds.DECIMAL_TYPE_ID_IMPL; }\n else if ( TypeId.DOUBLE_NAME.equals( unqualifiedName ) ) {\n return StoredFormatIds.DOUBLE_TYPE_ID_IMPL; }\n else if ( TypeId.REAL_NAME.equals( unqualifiedName ) ) {\n return StoredFormatIds.REAL_TYPE_ID_IMPL; }\n else if ( TypeId.REF_NAME.equals( unqualifiedName ) ) {\n return StoredFormatIds.REF_TYPE_ID_IMPL; }\n else if ( TypeId.CHAR_NAME.equals( unqualifiedName ) ) {\n return StoredFormatIds.CHAR_TYPE_ID_IMPL; }\n else if ( TypeId.VARCHAR_NAME.equals( unqualifiedName ) ) {\n return StoredFormatIds.VARCHAR_TYPE_ID_IMPL; }\n else if ( TypeId.LONGVARCHAR_NAME.equals( unqualifiedName ) ) {\n return StoredFormatIds.LONGVARCHAR_TYPE_ID_IMPL; }\n else if ( TypeId.CLOB_NAME.equals( unqualifiedName ) ) {\n return StoredFormatIds.CLOB_TYPE_ID_IMPL; }\n //DERBY-5407 Network Server on wire sends CHAR () FOR BIT DATA \n // not CHAR FOR BIT DATA. Keeping the check for CHAR FOR BIT\n // DATA just in case if there is any dependency on that check\n else if ( TypeId.BIT_NAME.equals( unqualifiedName ) ) {\n return StoredFormatIds.BIT_TYPE_ID_IMPL; }\n else if ( \"CHAR FOR BIT DATA\".equals( unqualifiedName ) ) {\n return StoredFormatIds.BIT_TYPE_ID_IMPL; }\n //DERBY-5407 Network Server on wire sends VARCHAR () FOR BIT DATA \n // not VARCHAR FOR BIT DATA. Keeping the check for VARCHAR FOR BIT\n // DATA just in case if there is any dependency on that check\n else if ( TypeId.VARBIT_NAME.equals( unqualifiedName ) ) {\n return StoredFormatIds.VARBIT_TYPE_ID_IMPL; }\n else if ( \"VARCHAR FOR BIT DATA\".equals( unqualifiedName ) ) {\n return StoredFormatIds.VARBIT_TYPE_ID_IMPL; }\n else if ( TypeId.LONGVARBIT_NAME.equals( unqualifiedName ) ) {\n return StoredFormatIds.LONGVARBIT_TYPE_ID_IMPL; }\n else if ( TypeId.BLOB_NAME.equals( unqualifiedName ) ) {\n return StoredFormatIds.BLOB_TYPE_ID_IMPL; }\n else if ( TypeId.DATE_NAME.equals( unqualifiedName ) ) {\n return StoredFormatIds.DATE_TYPE_ID_IMPL; }\n else if ( TypeId.TIME_NAME.equals( unqualifiedName ) ) {\n return StoredFormatIds.TIME_TYPE_ID_IMPL; }\n else if ( TypeId.TIMESTAMP_NAME.equals( unqualifiedName ) ) {\n return StoredFormatIds.TIMESTAMP_TYPE_ID_IMPL; }\n else if ( TypeId.XML_NAME.equals( unqualifiedName ) ) {\n return StoredFormatIds.XML_TYPE_ID_IMPL; }\n else { return 0; }\n }\n }", "String getValueFormat();", "public ServicesFormatEnum(){\n super();\n }", "public String getFormat() throws Exception {\n\t\treturn doc.selectSingleNode(\"/metadataFieldInfo/field/@metaFormat\").getText();\n\t}", "@Override\n public final Integer constTypeCode() {\n return this.manufacture.constTypeCode();\n }", "public String getFormat() {\n Object ref = format_;\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 format_ = s;\n return s;\n }\n }", "public String getFormat() {\n Object ref = format_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n format_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public static Format getFormat(int format) throws IOException {\r\n\r\n switch (format) {\r\n case Order.FORMAT_FLAT: return new FormatFlat();\r\n case Order.FORMAT_TREE: return new FormatTree();\r\n case Order.FORMAT_NORITSU: return new FormatNoritsu();\r\n case Order.FORMAT_KONICA: return new FormatKonica();\r\n case Order.FORMAT_FUJI: return new FormatFuji();\r\n case Order.FORMAT_FUJI_NEW: return new FormatFujiNew();\r\n case Order.FORMAT_DLS: return new FormatDLSStub();\r\n case Order.FORMAT_KODAK: return new FormatKodak();\r\n case Order.FORMAT_AGFA: return new FormatAgfa();\r\n case Order.FORMAT_LUCIDIOM: return new FormatLucidiom();\r\n case Order.FORMAT_PIXEL: return new FormatPixel();\r\n case Order.FORMAT_DP2: return new FormatDP2();\r\n case Order.FORMAT_BEAUFORT: return new FormatBeaufort();\r\n case Order.FORMAT_DKS3: return new FormatDKS3();\r\n case Order.FORMAT_DIRECT_PDF: return new FormatDirectPDF();\r\n case Order.FORMAT_ZBE: return new FormatZBE();\r\n case Order.FORMAT_FUJI3: return new FormatFuji3();\r\n case Order.FORMAT_HP: return new FormatHP();\r\n case Order.FORMAT_XEROX: return new FormatXerox();\r\n case Order.FORMAT_DIRECT_JPEG: return new FormatDirectJPEG();\r\n case Order.FORMAT_BURN: return new FormatBurn();\r\n case Order.FORMAT_HOT_FOLDER: return new FormatHotFolder();\r\n case Order.FORMAT_DNP: return new FormatDNP();\r\n case Order.FORMAT_PURUS: return new FormatPurus();\r\n case Order.FORMAT_RAW_JPEG: return new FormatRawJPEG();\r\n default:\r\n throw new IOException(Text.get(Format.class,\"e1\"));\r\n }\r\n }", "public String getSequenceFormat() {\n return sequenceFormat;\n }", "protected Format doGetFormat()\n {\n return null;\n }", "public java.util.List getStyleCode()\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(STYLECODE$16);\n if (target == null)\n {\n return null;\n }\n return target.getListValue();\n }\n }", "public java.util.List getStyleCode()\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(STYLECODE$16);\n if (target == null)\n {\n return null;\n }\n return target.getListValue();\n }\n }", "public List<ReportGenerator.Format> getFormats() {\n return formats;\n }", "protected int getFMT() {\n\t\treturn this.itemCount;\n\t}", "public String getFormatString() {\r\n if (format == null) { return \"\"; }\r\n if (format.equals(ImportQueueItem.FORMAT_TAB)) {\r\n return FORMAT_TAB_DISPLAY;\r\n } else if (format.equals(ImportQueueItem.FORMAT_XML)) {\r\n return FORMAT_XML_DISPLAY;\r\n } else if (format.equals(ImportQueueItem.FORMAT_DISCOURSE)) {\r\n return FORMAT_DISCOURSE_DISPLAY;\r\n } else {\r\n return format + \" format\";\r\n }\r\n }", "public SDMFormat getSDMFormat()\n\t{\n\t\treturn SDMFormat.valueOf( mMessage.get( B2_SDM_SEGMENT_TRANSACTION_FLAG ), \n\t\t\t\t\t\t\t\t mMessage.getInt( B2_SDM_GENERAL_FORMAT ) );\n\t}", "public RMFormat getFormat()\n{\n // Return format from first binding\n if(getBindingCount()>0)\n return (RMFormat)getBinding(0).getFormat();\n \n // Return null\n return null;\n}", "public java.lang.Byte getNumVersionFormato() {\n\t\treturn numVersionFormato;\n\t}", "protected List<FormatoReporteEnum> getReportFormatList(){\r\n\t\tList<FormatoReporteEnum> formatos = new ArrayList<FormatoReporteEnum>();\r\n\t\tfor (FormatoReporteEnum formatoReporteEnum : FormatoReporteEnum.values()) {\r\n\t\t\tformatos.add(formatoReporteEnum);\r\n\t\t}\r\n\t\treturn formatos;\r\n\t}", "public String getFileFormat()\r\n\t{\r\n\t\treturn this.getSerializer().getFileFormat();\r\n\t}", "public int getDisplayFormat() {\r\n return insertMode ? 0 : intValue(CONTACTS_DISPLAY_FORMAT);\r\n }", "public String getVicarFormat() {\n\t\treturn vicarFormat;\n\t}", "protected NumberFormat getFormat() {\n return this.format;\n }", "public BoundCodeDt<DataTypeEnum> getCodeElement() { \n\t\tif (myCode == null) {\n\t\t\tmyCode = new BoundCodeDt<DataTypeEnum>(DataTypeEnum.VALUESET_BINDER);\n\t\t}\n\t\treturn myCode;\n\t}", "public org.openarchives.www.oai._2_0.OAIPMHerrorcodeType.Enum getCode()\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(CODE$0);\n if (target == null)\n {\n return null;\n }\n return (org.openarchives.www.oai._2_0.OAIPMHerrorcodeType.Enum)target.getEnumValue();\n }\n }", "public BizCodeEnum getCode() {\n return code;\n }", "public int getImageFormat() {\n if (this.cleanedUp) {\n throw new IllegalStateException(\"Tried fetch image format from cleaned up swapchain!\");\n }\n return this.imageFormat;\n }", "public final String getColorCode() {\n\t\treturn colorCode;\n\t}", "public String getLabelFormat() {\n\t\treturn this.labelFormat;\n\t}", "public String getSignFormat() {\r\n\t\treturn this.signFormat;\r\n\t}", "@ApiModelProperty(required = true, value = \"The file type of the file.\")\n public String getFormat() {\n return format;\n }", "public IS getProcessingConsiderationCode() { \r\n\t\tIS retVal = this.getTypedField(20, 0);\r\n\t\treturn retVal;\r\n }", "public String getVicarIntFmt() {\n\t\treturn vicarIntFmt;\n\t}", "public String asString() {\n\t\t\tString enumName;\n\t\t\tswitch(this) {\n\t\t\tcase INDEX:\n\t\t\t\tenumName = \"index\";\n\t\t\t\tbreak;\n\t\t\tcase NAME:\n\t\t\t\tenumName = \"name\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tenumName = \"unsupported\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn enumName;\n\t\t}", "public String getSupportFormat() {\r\n\t\treturn supportFormat;\r\n\t}", "private C0958a m1725b() throws JSONException {\n String string = this.f1890d.getString(\"ad_format\");\n MaxAdFormat c = C1281o.m3104c(string);\n if (c == MaxAdFormat.BANNER || c == MaxAdFormat.MREC || c == MaxAdFormat.LEADER) {\n return new C0959b(this.f1889c, this.f1890d, this.f2745b);\n }\n if (c == MaxAdFormat.NATIVE) {\n return new C0961d(this.f1889c, this.f1890d, this.f2745b);\n }\n if (c == MaxAdFormat.INTERSTITIAL || c == MaxAdFormat.REWARDED) {\n return new C0960c(this.f1889c, this.f1890d, this.f2745b);\n }\n StringBuilder sb = new StringBuilder();\n sb.append(\"Unsupported ad format: \");\n sb.append(string);\n throw new IllegalArgumentException(sb.toString());\n }", "public static String enumItemDecl()\n {\n read_if_needed_();\n \n return _enum_item_decl;\n }", "@Override\n\tpublic String toString()\n\t{\n\t\treturn toString(Locale.getDefault(Locale.Category.FORMAT));\n\t}", "public CSVCustomFormat getCustomFormatData() {\n return csvCustomFormat.getValue();\n }", "@SuppressWarnings(\"unchecked\")\n public <F> ConverterFormat<F> getFormat(Class<F> formatType) {\n ConverterFormat<F> format = (ConverterFormat<F>) formats.get(formatType);\n\n if (format == null) {\n throw new UnsupportedOperationException(\"The format \" + formatType + \" is not supported.\");\n }\n\n return format;\n }", "public com.microsoft.schemas.sharepoint.soap.UpdateViewFormats getFormats() {\r\n return formats;\r\n }", "public String getColorStyle() {\n return colorStyle;\n }", "public static String enumPatternItemCase()\n {\n read_if_needed_();\n \n return _enum_pattern_item_case;\n }", "public static String enumPatternItemDecl()\n {\n read_if_needed_();\n \n return _enum_pattern_item_decl;\n }", "public int getMailFormat() {\r\n return insertMode ? 0 : intValue(CONTACTS_MAIL_FORMAT);\r\n }", "protected String getDataFormat() {\n return this.dataFormat;\n }", "public List<String> getParserFormats();", "public String getChangeFileBeginFormat() {\r\n \t\treturn properties.getProperty(KEY_CHANGE_FILE_BEGIN_FORMAT);\r\n \t}", "@RestrictTo(Scope.LIBRARY_GROUP)\n public int getImageFormat() {\n return mImageFormat;\n }", "public String getFormato() {\n\t\treturn formato;\n\t}" ]
[ "0.8160138", "0.69669867", "0.6797673", "0.66895336", "0.6564709", "0.6459871", "0.6399129", "0.63804394", "0.6323754", "0.6268567", "0.6260365", "0.6231562", "0.6213056", "0.61948776", "0.61824983", "0.6162961", "0.6154006", "0.6154006", "0.6154006", "0.61342514", "0.6121089", "0.6109025", "0.6100104", "0.60793865", "0.60782486", "0.60462165", "0.6018206", "0.60071903", "0.60071903", "0.60071903", "0.5991747", "0.59819597", "0.5940884", "0.5912359", "0.59050936", "0.59009075", "0.5889747", "0.5880403", "0.5872", "0.5860868", "0.58585525", "0.5843641", "0.5829674", "0.5817251", "0.58156234", "0.5814612", "0.57960534", "0.5784935", "0.57690924", "0.5745753", "0.5744409", "0.5739602", "0.57324594", "0.569435", "0.5692267", "0.56737304", "0.56637824", "0.5661331", "0.5651834", "0.5651208", "0.5637144", "0.5637144", "0.5609069", "0.56059444", "0.5588414", "0.5587581", "0.5578967", "0.5564713", "0.5542932", "0.55365217", "0.5527384", "0.55204475", "0.551405", "0.5512394", "0.55110335", "0.550766", "0.5476038", "0.54743373", "0.5424776", "0.5415082", "0.5414207", "0.540854", "0.5390042", "0.5387773", "0.53761595", "0.5373118", "0.53631425", "0.53488654", "0.5343687", "0.5339212", "0.53385127", "0.5337049", "0.5327644", "0.53258747", "0.532478", "0.53194", "0.5319348", "0.53174925", "0.5298894", "0.52973807" ]
0.7657815
1